posted 19 years ago
Hi Mike
I don't know about whether the code you present is one line or four (comment, code, space, code). I vote for four! Space is important...(It's also ASCII 032--code!).
I think that environments that try to make object-oriented developers feel guilty because they haven't produced a certain number of lines of code are 1) incoherent and 2) evil. I had a CIO who was interested in that once.
I stress _had_.
One can get 6 or 7 lines of code out of an if/else block or 1 line that does the same thing using the ternary operator. So it's not something I think about.
But I did get worried that I was doing too much when I saw (I think on Sun's site) that 3000 lines of code should be about right. I turned out to have about 10000 lines in 75 or so classes. I know a guy who passed with 20 or so classes.
Of course, Sun also says that it shouldn't take more than 100 hours. I spent far longer on it than that.
[ June 24, 2004: Message edited by: Eben Hewitt ]
Eben Hewitt. SCJP, SCWCD, SCJD, SCJWSD for JEE 5, TOGAF 8 Certified Architect, author of Java SOA Cookbook (O'Reilly, 2009) and contributor to 97 Things Every Software Architect Should Know