Code is for humans

2 min read Original article ↗

Khalah Jones - Golden

A friend of mine once told me that understanding people should be the most paramount, because everything around us is made for humans. It may be hard for us to see this because we are the humans the things are made for. But truly, the phone you’re reading this on, the shoes you wear, the lights that guide your way, and especially the code we write all were created to make people’s lives easier.

Sometimes software engineers forget that code isn’t made for the computer, it is made for the human. As such we tend to write code for machines, instead for future people (including ourselves) that will be manipulating the software. Instead of writing code so that people understand, by being verbose, we write “clever” code so the computer gets .01ms of speed. Most of the time the human time spent adjusting the code will be way more costly than the time that is lost by the speed gain.

Sometimes the code has to be complicated, all codebases I have ever seen, there is always some portion of the code where the “magic” happens. All science, however, when not properly understood might as well be magic. Be sure your code is always understood (well commented). Make it paramount that the “future you”, and anyone else will have no problem following the code.

Just like how the code itself is for the human, so is the resulting software that the code orchestrates. Always remember that all problems you’re trying to solve at their core are the problems of fellow humans, and thus ask yourself; how you can reduce the complexity in their lives while also introducing a new tool (the crux to ux development). Most of the time the answer is to use the tools people are already familiar with, and to mimic patterns they already use. This is why, I suspect, frameworks like React are so popular, it requires minimal specialized knowledge.

Remember that the computer is the machine, and it should be doing the heavy lifting, not the human, so keep your code simple, and more importantly ask yourself and your team, does the code even need to be written?