Friday, October 23, 2009

Excellent Blog On Code Smells...

This is a really good/short blog that highlights some code smells that everyone should look out for. It's not a complete diary or anything but when I read it I felt like it could have been written by me.


He also has a follow on which I agree with.


3 comments:

NineMirrors said...

I don't agree at all. Non-trivial code needs comments. Especially if you are working with multi-threaded code and concurrency issues (and, let's face it, today, who isn't?).

Steve Harris said...
This comment has been removed by the author.
Steve Harris said...

My opinion is that if one writes a method that has a few "Stanzas" in it like.

Grab the door nob
turn it
pull the door open
enter the room

Rather than having comments that say those things with code that follows each comment one should have methods with those names. See my blog on "programming via wishful thinking" for more detail.

If one has a coding style where they highlight lock holders via a comment I have no issue with that