The 5 Hallmarks of Excellent Code
I mean, it’s easy to get taken in by the word “the best.” The problem with the “the best” is that what’s best for somebody might not be all that good to you. In fact, it might turn out to be quite horrible. It really all boils down to our personal set of circumstances. Everybody’s different. Everybody has distinct experiences.
So, how exactly do we come up with excellent code? In the many years I’ve been struggling with this issue, I’ve learned to quickly separate objective from subjective elements. The subjective elements of terms like “excellence” or “the best” are already covered above. What follows are objective hallmarks you should use in determining whether you’ve cranked out excellent code or not. Now, this is probably not going to be enough to satisfy purists but be as it may, it at least gives us a workable starting point.
A 1960 Comedy
The first coding job that I got I felt like Jerry Lewis in those 1960s comedies. He was just like a bumbling fool because the code that I came up with was almost like the Koran, it was so long; or the Iliad by Homer. My supervisors were laughing at me because they were telling me, “Why did you choose to write a novel? If you wanted to be a writer, you didn’t have to get into software.” I got the joke quickly.
I was intimidated by the project, so I went overbroad. I’ve always been big on tight code because of my first computer. It was a broken notebook that didn’t have enough resources, but since I was working for this huge corporation, and the project was big, I figured that I can go crazy on the code. Bad move. If you want to be viewed as a professional, use light code. The less lines and fewer objects, the better.
Knock it out
Finally, if you do a good job with all the other qualities above, chances are you would’ve already knocked this out. If software is light on code, it’s normally and also automatically light on resources. Unfortunately, this doesn’t play out immediately so pay close attention to this because it can go a long way in enhancing the overall value of the code you produce.