Home > Articles > Programming > Visual Basic

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Live and Let Live

Don't go looking for trouble where none exists. If a throwaway prototype does its job, leave it alone. Trying to clean up the code won't help if you're going to throw the code away after the prototyping phase, anyway, and you're just as likely to cause problems as to fix them.


In one of the first large prototypes I helped build, all of the developers provided two levels of commenting. We included a normal set of comments explaining key lines of code. We provided another set of comments starting in the code's 80th column. Normally when you looked at the code or printed it, the second set of comments was chopped off so you saw only the first set of comments. If you were confused by a piece of code, you could reduce your display font size or print the code on extra wide paper to see the more detailed second level of comments.

For some reason, the final development group that took over the prototype believed that too many comments were distracting. They had an official policy that prohibited all comments that were not absolutely necessary to understanding the code. After we gave them the prototype code, they removed our second-level comments.

About a month later, they discarded a large part of the prototype's code and replaced it with an off-the-shelf tool. They then spent another couple of months learning how to use the tool and reimplementing the prototype's features using it. The reason they discarded the prototype code was that they couldn't understand it. They couldn't understand it because they had removed 80 percent of the comments.

If it ain't broke, don't fix it!

  • + Share This
  • 🔖 Save To Your Account