Code should read like poetry
Code should have certain patterns and rythms that make it easy to read and understand.Good code should be easy for people to read. As Martin Fowler says: “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
How do you know if humans can understand your code?
A good friend once told me: “Good code should read like poetry.”
I guess poetry itself is subjective, but I like this idea. When you read your code, it should have certain patterns and rythms that make it easy to read and understand.
Short functions, descriptive names, consistent formatting.
Now it almost sounds like I’m describing Haiku…?