Readable Code without Prescription Glasses | Ocasta

I saw Daniel give a talk at Async where he compared linguistic rules with code style:

We find the prescriptive rules hard to follow, irrespective of how complex they are, because they are invented, arbitrary, and often go against our intuition. The descriptive rules, on the other hand, are easy to follow because they are instinctive. We learned to follow them as children by listening to, analysing and mimicking speech, armed with an inbuilt concept of the basic building blocks of grammar. We follow them subconsciously, often without even knowing the rules exists.

Thus began some thorough research into trying to uncover a universal grammar for readable code:

I am excited by the possibility of discovering descriptive readability rules, and last autumn I started an online experiment to try and find some. My experiment on howreadable.com compared various coding patterns against each other in an attempt to objectively measure their readability. I haven’t found any strong candidates for prescriptive rules so far, but the results are promising and suggest a potential way forward.

I highly recommend reading through this and watching the video of the Async talk (and conference organisers; get Daniel on your line-up!).

Readable Code without Prescription Glasses | Ocasta

Tagged with

Responses

3 Shares

# Shared by Eduardo Rabelo on Saturday, February 2nd, 2019 at 11:59pm

# Shared by getify on Sunday, February 3rd, 2019 at 12:05am

# Shared by Nana B on Sunday, February 3rd, 2019 at 2:22am

16 Likes

# Liked by Enrique Soto on Sunday, February 3rd, 2019 at 12:02am

# Liked by Alvaro Rabelo on Sunday, February 3rd, 2019 at 12:02am

# Liked by Ally Mih on Sunday, February 3rd, 2019 at 12:38am

# Liked by Cassie Evans on Sunday, February 3rd, 2019 at 12:38am

# Liked by Dan Rubin on Sunday, February 3rd, 2019 at 12:38am

# Liked by getify on Sunday, February 3rd, 2019 at 12:38am

# Liked by Dimitri Van Heucke on Sunday, February 3rd, 2019 at 1:34am

# Liked by #NoCode dev 🇲🇽 on Sunday, February 3rd, 2019 at 2:30am

# Liked by Arin Ghazarian on Sunday, February 3rd, 2019 at 7:10am

# Liked by Milan Dzenovljanovic on Sunday, February 3rd, 2019 at 7:10am

# Liked by David Lacourt on Sunday, February 3rd, 2019 at 1:04pm

# Liked by Daniel van Berzon on Sunday, February 3rd, 2019 at 4:12pm

# Liked by Donovan Hiland on Sunday, February 3rd, 2019 at 5:16pm

# Liked by Eduardo Costa on Sunday, February 3rd, 2019 at 9:18pm

# Liked by Milton Takamura on Sunday, February 3rd, 2019 at 11:51pm

# Liked by Aashish Nagpal on Monday, February 4th, 2019 at 6:33am