The facts is there arn’t any, as I found in this excellent post. Kudos to WordPress (again) for their dashboard which directed me to this post.
Back to the post. I can’t agree more with it. The reply to The Seven Secrets of Sucessful Programmers is nothing short of a no brainer. All the seven Rules needs is a title change and a change of perspective: they are tips, not royal decrees (or NFL rules).The Seven rants highlights this differnce of perspective.
The Seven Rants post is rather good, condensing and updating the gist of Code Complete.
Don’t take me wrong. I don’t think there’s anything evil in trying to convey hard won lessons in little capsules. Otherwise, i wouldn’t be writing these musings in the first place. It’s just that i dislike oversimplifications; they go hand in hand with the notion that programming is just something to be done by underpaid coding monkeys, or that it should be as easy as clicking around with a mouse.
Which is, belive it or not, somthing that most people outside the programming world think. I’ll ask around and get more on this but, thats generally it. The truth is the total opposite of that. Programming is far, far from easy. Found that out myself last year. Both my projects for Semester 2 had so many bugs in them that I couldn’t bother fixing them. The programs should have worked like dreams ( one of them did, nearly) but didin’t for no reason I could ever figure out.
I was wondering myself about commenting. Self documenting code gets even easier to write in Visual Basic 2005. Why bother commenting?
In my experience, the need to explain what a snippet of code is doing with a comment is a sure indication of bad coding. Good code is self-explanatory and needs few, if any, comments. Otherwise, you did something wrong, be it bad naming or poor function breakdown. Not to mention the issue of keeping comments and code synchronized during rewrites. So here’s my secret number 2: comment seldom, write self-documenting code instead. This will make your programs not only easier to understand and maintain, but of better quality.
Of course, aside from naming variables and bad code, Visual Basic takes care of most of this for you. Indenting is automatic by default. Exceptions are easy to handle. Scope is done by default. Its pretty good. Its the coding part that brings you up short time and time again. Even for the simplest subroutines it can take a while. I once wrote a Pythagoras Function ( to work out return right angles). I had to get my high school textbooks out and give WikiPedia a look. It took time to get the code right to work in all cases.
Pure programming is a rare thing. Programmers work with real world concepts ( abstracted, maybe) and getting computers to do the same is essentially our job. And we need every good tool that we can get our hands on .
Another blog to add to my blogroll.
Update: Here
The secret to investing is “buy low, sell high”. (Also, the secret to carpentry is “measure twice, cut once” ) – this doesn’t mean if you only do this you will be a successful investor (or carpenter) but rather that if you are a successful investor (or carpenter) you will do this as a habit.
This is what i was aiming for with the 7 secrets article – although much subsequent reading (it was written about 5 years ago) has convinced me that hungarian notation is not a good thing at all, and the comment often, comment well paragraph needs to be rewritten but I still stand by the article as a whole.
The self commenting code argument is addressed here: http://www.irishdev.com/blogs/merrion/archive/2006/09/17/2346.aspx
Thanks, I’ll have a look at it