Archive for the ‘Commenting’ Category

Code Biography

Code Commenting

Code CommentingCode CommentingCode CommentingThroughout school (any major with programming really) there are many basic rules when coding like, keep things modular, use version control or comment your code. I want to mention a few bits about commenting:

First off, self commenting/documenting code is bs-99% of the time it is barely self documenting to the person who wrote it. Yeah, I might get flamed about this if people (the noob coders in general – *benjamin adds fuel to the fire) read my blog but I have not run into any code, save hello world tutorials, that was easily readable when uncommented. I have heard quotes of people, students in particular, who have claimed that not commenting is a great way for job security, which totally makes me ill-but again reiterates my thoughts.

Secondly, projects barely leave time for commenting. Yes, you could do it along the way, but if you had code/design which you did not have to re-visited hen you had too much time for a project or you were writing that hello world tutorial.

Thirdly, yeah this seems like a bitch and moan post, but there is something I do like about the little commenting that is done within a project. The best part about it is the personal notes which are put into the code, I know I do it all the time. Funnier quotes are those which claim a function isn’t working correctly and you don’t know if the function isn’t working or it wasn’t ever taken out-be it you or code you are maintaining. The error messages which state “Please Contact your Administrator” are always good for a laugh if you are not tearing your hair out atm. In web programming I have had my share of angry (now humorous) comments with browser compatibility, but I won’t name names (cough…IE…).

So, in closing-I think the left over comments are great fun seeing the life of a project (good luck maintaining them), perfect comments for the easy code that was written the first week of development, shifty-sometimes outright wrong comments for the majority of the code and those special functions that don’t ever seem to work right /* son of a #@*#@# i hate this &*!^@%# job*/.

Benjamin Willis

P.S. Overcommenting is teh suck.

P.S.S. Teachers don’t understand industry (yes, i did generalize the entire educational world)