The Design of Everyday Things, and writing code

Our client recommended me to read this book “The Design of Everyday Things“, which is about Human Factors and not specifically about software nor GUI design. As a software developer though, I actually find some intriguing parallels in writing code:

“If a design depends upon labels, it may be faulty. Labels are important and often necessary, but the appropriate use of natural mappings can minimize the need for them. Wherever labels seems necessary, consider another design.”

The author’s talking about stoves, and how user unfriendly the switches are sometimes. But it makes sense for writing code and comments too: wherever comments are necessary, consider another design. If the method is too long and complicated that it needs comments, consider breaking it into several shorter methods. Comments needed to describe three lines of code? Consider naming the variables and methods to be self-explanatory.

I now realized that other devs who read my code are users of my code. I’d want to make code user friendly because I’m actually the most likely to become a user of it.

discussion by DISQUS
Add New Comment