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.
Good analogy (Score:2)
I never realized how much this influences my coding style until I was recently in front of 30 people at a client location, writing some complex code in real time for them. I'd write three or four lines of code, run the program, then either rewrite those three or four lines if they didn't do what I expect, or I'd write three or four new lines if they did.
While this was "normal" for me (even before all this XP craze), it was pointed out to me about my "radical way of programming".
Maybe that's why I never understood why people spend all that time in debuggers. I've never needed one. I just don't outwrite my brain, and always have something to test after a few minutes more work. If I need, I add YAML (formerly Data::Dumper) and dump a data structure that seems odd.
Of course, in the process, I build a lot of scaffolding that I later tear down, but that's no problem because my overall progress seems far faster than doing it the "hard" (to me) way.
Reply to This
Re:Good analogy (Score:2)
I sometimes use a debugger as a way to graphically represent complex data structures that I don't understand and I'm not sure how deeply nested they are (i.e. where print statements won't necessarily work).
But on the whole, yes, they can make you lazy.
Re:Good analogy (Score:1)
In a way it resembles the way of writing HTML: write, save, switch to the browser and reload in a quick sequence.
So using a language which takes longer to compile, like C++ in a lot of cases, breaks the cycle, forcing you to write more and more code to justify a compilation (thereby verifying that you didn't outwit yourself).
Re:Good analogy (Score:2)
It's amazing how comforting it is to know that if you find a problem, changes are really good that you caused it within the last few minutes, and that you only have to take one step back.
Re:Good analogy (Score:1)
I'm think I'm about to get involved in that in the near future, and I'd appreciate any practical tips and tricks.