Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • "I will show less mercy in my refactoring" would be a good New Year's resolution for any programmer.

    Yes, but how merciless will you be?

    A good friend of mine, let's call him "George", would get deeply involved in some code he was writing, and would occasionally get tired of chasing the odd bug. His response was the famous three step process:

    $ rm *.[ch]

    wait 15 minutes

    Tell the boss, "Oops. I accidentally deleted all my source code. Guess I'll have to rewrite it now."

    Now, George wasn't cavilie

    • I'm not quite that merciless, and I'm not quite sure I'd want to be! Then again, I've gotten merciless enough in that direction to get some funny looks, following my reading of chromatic's writing on "Integrate Often," something like this here [extremeprogramming.org].

      As is normal, I try to commit after every (write-test; code-code; pass-test) cycle, and I try to keep those cycles smallish. I refuse to leave my CVS checked out overnight, and delete it if it isn't committed. Some people think this is bizarre enough, but I've found that going further is better: frequently, the next morning, I realize that the reason I couldn't get that last hour's work checked in is because the previous seven hours were conspiring to make it more difficult than it had to be. I check out 24 hours earlier, and start over. Re-doing eight hours of work usually takes about an hour, and leaves me feeling much better.

      It's like refactoring, after razing the first factor down and dancing on its grave!

      Still, deleting all the code? I don't think I'm that hardcore.
      --
      rjbs
      • If nothing else, I suspect you'd generally want to keep the tests so that you can verify that the "refactoring" didn't break anything. So, starting the project over, completely from scratch, is a bit extreme in a non-XP sort of way.