Thursday, September 20, 2007

Surprising tip

I was taken aback by the tip A Very Simple Way to Skip Part of Code Without Using Comment Symbols duly linked from http://java.sun.com. It is a surprise way of inserting return statements in the middle of the code to test only the functionality upto the point of return.

Commenting out code and testing, or creating appropriate test harnesses so that all cases can be covered is surprisingly not advocated. Nor is the need for modular methods and further breakdown of code logically.

What is next, Goto ?

Labels: ,

0 Comments:

Post a Comment

<< Home