I’ve been thinking a lot lately about what I strive for in my own code, what I respect in that of my colleagues, and what I look for from potential intern candidates. I can’t say I know very much about programming or have very much experience in the field, as I’ve only been coding since May of last year. So, knowing next to nothing about programming, two qualities I truly value in my current stage of development are simplicity and precision.
One of the most frustrating things as a developer is to inherit code that requires line-by-line reading or, worse yet, a verbal explanation from its creator on how the method in question works. The more I write code, the more I notice that a lot of programming consists of repetition and reorganizing of standard practices. More often than not, there is no need to reinvent the wheel; the majority of problems can be solved with a very basic understanding of the library.
An hour spent trying to find your footing in someone else’s code is an hour lost getting a new feature deployed. I respect those that can write stable, well-tested code using simple and well-known methods. There’s usually no need to bust out an obscure method from the depths of the Ruby library. It really should be absolutely necessary (or easy to understand after RTFMing), otherwise you’ll end up wasting the time of the next person that comes along to look at that line.
On a similar note, I have related qualms about meta-programming, which is all the rage among RoR developers as it is so easy to do. There’s a time and a place for it, but don’t get all meta for the sake of showing the rest of your team how slick you can get. You’ll just end up causing headaches for whoever has to build a feature related to that method in the future.
Oh man, do I love a programmer that can go in and solve a problem with a few lines of code. I like hackers that think like surgeons, who treat their code like a scalpel. Coding really is about finding the perfect tool, the perfect combination of callbacks and methods and solving a problem in a clear and concise manner without any collateral.
TL;DR I suck at coding so stop fucking confusing me.