laziness, impatience, and hubris | |
PerlMonks |
(Ovid -- Programming style - Off topic) Re: Silly code reviews and shiftby Ovid (Cardinal) |
on Jan 18, 2001 at 22:08 UTC ( [id://52802]=note: print w/replies, xml ) | Need Help?? |
tilly, when we started discussing this earlier, I was going through some of my posts on this site to realize something very interesting. I am a huge fan of structured design. I typically use Warnier-Orr to design my programs. If I'm rushed or given poor specs, I tend to forget about that and put out code that can be read from top to bottom with relatively few functions. This is not good, but I noticed that it seems prevalent in many of my posts here.
By contrast, one program I have has the first few lines of code being the following (I stripped the comments): That's pretty much the entire logic of the program. Yeah, you can go down into my functions and into their functions, and so on and so on, but you already have a decent idea of what I'm doing. If you view the output of the program, the above code is crystal clear. It's just a matter of filling in the details. I wonder if other monks have a tendancy to post code that answers a question but demonstrates poor programming style. I think, in future posts, I'll try to focus better on code quality in addition to accuracy.
Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In Section
Meditations
|
|