Treat English as Just Another Programming Language

The hard things to do is, using simple English model for every time we write code. Have to think thrice to find out the best name for a method or variable or class or even description for spec.

Some of the time, when I looked at my previous code in the past, I couldn’t even know what the purpose of the class and the method as well. The message is not clear and I didn’t have any clue what is that.

“Simple English” – that’s how we should write our code. In Chapter 8 Pragmatic Programmer book, section 44, there is subject special for it. “It’s All Writing”.

Simple English should be implemented in the documentation as well. The documentation should be simple to understand, straightforward, and represent what code does. When there’s a discrepancy between documentation and code, then the code is what matters. So make sure that the code is easy to read by another developer and if you have a spec, make sure that it tells the story about the code as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.