DEV Community

Discussion on: Let's get one thing straight: Code is read by humans, interpreted by machines

Collapse
 
tqbit profile image
tq-bit

I wouldn't really say it's purely subjective. There are traits to well-readable texts that code shares with posts or newspaper articles.

Studying guides like Microsoft Writing Guidelines, Clean Code and The Pyramid Principle of Writing helped me to take a lot of the subjectivity away. Even though these concepts come from somewhat different domains, they sound similar on many points:

  • The Pyramid Principle employs argument contexts. Those feel a lot like function contexts or classes
  • 'Write like you speak', 'Get to the point fast' and 'Be Brief' from the MS guide feel a lot like 'Write Readable Code For People' and the 'Single Responsibility Principle (SRP)' from Clean Code
  • SRP also reminds me a lot of the already mentioned, isolated argument contexts.