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 cavilier about this. He'd invest a decent amount of time in his code. Occasionally, he gets to a point where his understanding of a problem is much deeper now than it was when he started coding. For George, deleting all his code on a project[*] (or sub-project) was something to do when he was tired of dealing with yesterday's bugs and wanted to code it up the way he should have written it in the first place. Classic example of "throw one away".

    You can't get much more merciless than that. ;-)

    *: For best results, temporarily forget about the backups and CVS revisions before you rewrite the code you just accidentally deleted. ;-)

    • 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 fou
      --
      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.