in reply to Code for readablity or fewer lines?
This really reminds me of the comment in Amadeus: "too many notes".
Seriously, why should your boss care about the number of lines? Did you complete the code in time? Does it work? Is it properly documented and tested? Can it be maintained easily? Those are the important questions.
Now if he doesn't like your coding style maybe he should sit down with you and do a code review, pointing the constructs that he thinks would be improved by being shorter This would give you a chance to learn but also to justify why you chose a more line-consuming method. Then your next project would be better.
But frankly, 300 lines is really a small project and I have no idea why anybody would care. The only reasons I can think of is that either your boss knows that there is a module around that would have cut your code to 20 lines or that he needs to show his boss that Perl is really powerful (in which case it should have let you know in advance).
|
|---|