Some say that you do not need comments and your code need not be readable if you are a professional.
To be more specific, the Facebook post by my employer, 99X Technology and the subsequent discussions in the comments section got me thinking. So here’s what I think.First and foremost, that statement is just wrong, as wrong as driving on the wrong side of the road!
In my opinion, properly commented and readable code should be the hallmark of a professional. I first started writing code in Grade 9, some VB here and some HTML there. At that time, I was more interested in seeing the result on the screen. As you can imagine, it was barely documented and was for the most part, spaghetti code.
Et voilà! (this is just one function, but you get the gist)
As you can see, the above snippet is quite interesting, dotted with magic numbers, oddly named variables and commented lines of code. I spent 2 hours trying to make sense of the code I had written but to no avail, sadly I ditched my plan to make my app great and proceeded to make my way to the local watering hole.
I personally feel that the above mentioned practises have helped us deliver a quality product to our customer.
In my humble opinion, writing comment less, barely readable code is a right of passage from novice to expert. For instance, when you are an undergraduate learning to program for the first time, your code can afford to be unreadable as long as it works. However, your code writing has to evolve, much like we humans evolved.
Well, that was my 2 cents worth!