I’ve recently been thinking of what differentiates a good from a bad programmer. Often people have used words like “elegant” and “simple” as ways of describing attributes of a good programmer. Though surely we can come up with a physical analog to draw a better comparison. Personally, I’ve found the analog to be cooking because it’s easy to tell a bad (or junior) cook from a good one.
Previously I was training in the military as a cook, so I’ve taken several courses that taught various skills such as organization, discipline and of course; how to work in a kitchen. Much of the kitchen work heavily revolves around how one treats their workspace. Of course this is important to ensure that the kitchen is safe and that there is no contamination, which can lead to extremely disgruntled clients. While my profession has drastically changed, I still take those lessons from my culinary experience and apply it to my own kitchen.
When it comes to my own kitchen I’ve noticed a pretty big disparity between how my partner and I prepare our meals, that being while she’s really good at creating the end product, the side-effects of her cooking are rather… messy. Anyone can be a good cook, it just takes a bit of discipline and the desire to keep your space as clean as possible. This of course includes things like having a sink full of hot, soapy water so that in between steps you can clean the tools you just used.
So you’re probably wondering what does any of this have to do with programming? Well if we compare how a good and bad programmer works, it’s quite similar to working in a kitchen. We all start with a clean slate and start combining the pieces to create the end product, though the good programmer will continue to return to their code and find ways to improve upon it. This can be anything from modularizing code, to simply taking a piece of code and making it simpler to follow.
A bad programmer on the other hand will leave their solutions because “it works” and they’ll get back to it eventually. The problem with this is your workspace gets more and more cluttered, increasing your chances of having your code contaminate other parts of the codebase and before you know it, your system is sick. Now you’re stuck with a semi-working system that they cannot understand because of all the short-cuts and bad decisions that were made but never taken care of.
Now, I do believe that like a bad cook, a bad programmer can be taught the proper way to build things. Just like trades people need to spend several thousand hours as an apprentice, developers also need to do this. Without the correct mentorship we are never given the guidance we need to grow into a good developer. Well, perhaps that isn’t entirely true, you’ll still have the chance to grow though it will take a bit longer and you may also build up some bad habits.
