NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Yes! (Score:1)
His argument was that the commented-out code, for a feature we were removing, would probably be needed again soon. He was expecting the feature to be re-added again. I pointed out that:
1) Predicting the future is hard, and every time you're wrong you just clutter up the code
2) The old code still existed in the old versions i
for loops (Score:1)
for( my $up = 1; $up = $height; $up++ ) {
be more easily read if it were written as:
for my $up (1
?
Re:for loops (Score:2)
Re: (Score:1)
ACK.
I do this a lot, temporarily, when I’m hunting bugs or when I just want to try something else. But as soon as I’ve decided which version I need, the commented crap goes out the window.
What I find particularly jarring is finding entire sections of code or complete routines commented out in someone else’s source. It doesn’t particularly inspire trust in the codebase to see that someone is littering it with his failed experiments…
better than #ifdef (Score:1)
I have a co-worker who always changes the code that he fixes by wrapping it in #ifdef tags, like
#ifdef _BUGS_
...old broken code
#else
...new working code
#endif
This drives me crazy, but he won't change, and no one here with authority wants to enforce anything against, this, so I just take them out when I get a chance to work on the affected files.
Re:better than #ifdef (Score:2)
It'll drive him nuts for hours.
In our non-perl code base (Score:1)
Just ignore it (Score:2)
It works well enough when you're starting out on an existing codebase. At the end of the day, 3-year old (and incomplete) edit histories aren't that important, and commentary on why something changed into its current state is useless, because you're not likely to see the conditions that triggered the change way back when.
Additionally, focusing on just the code helps you fo
Fluff (Score:2)
--
xoa