Wednesday, July 18, 2012

Naming is the source of most confusion

If you take the source code of working software and rename all the variables, methods, properties, classes to something meaningless (something like A1, A2, B1 B2 and so on) and rebuild it, you will find it works as it did before. To the compiler, the naming makes no difference.


However, to programmers it makes a huge different. It would be a nightmare to work on the source code with meaningless identifies.  


Martin Fowler was quoted in book of “Microsoft .NET: Architecting Applications for the Enterprise”, “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” I would like to follow-up by saying “when it comes to readability of the code, naming is the source of most confusion and only the program that can be understood by human can be accepted as commercial software.”

No comments:

Post a Comment