Forgot your password?

typodupeerror

Comment: Yes, good comments are good, but (Score 1) 472

by cc1984_ (#41261577) Attached to: Comments On Code Comments?

In my opinion, a two pronged approach of good commenting in the code and extensive testing make for a much more attractive package.

Is there some code that looks odd but accounts for edge case x? Write a simple comment saying as much, but write a test with the edge case in it. That way if someone hoses it, a test will fail.

You even have things like cucumber (http://cukes.info/) for ruby which creates documentation with the tests.

Life is like an onion: you peel it off one layer at a time, and sometimes you weep. -- Carl Sandburg

Working...