Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Confessional: why I wrote bad Perl code.

by sfink (Deacon)
on May 20, 2002 at 20:55 UTC ( [id://167963]=note: print w/replies, xml ) Need Help??


in reply to Re: Confessional: why I wrote bad Perl code.
in thread Confessional: why I wrote bad Perl code.

Very similar to not knowing any better:

Because I am a crappy programmer
If a good programmer thinks things through carefully before starting, then I'm not a good programmer. If a good programmer carefully reviews CPAN for existing implementations before beginning anything new, then I'm really not a good programmer. And if a good programmer implements just the features needed at a given time... well, maybe I should pick another profession.

But that's just a small taste of how bad I am. I'll switch to a slower algorithm to avoid using a temporary variable. I abbreviate variable names to make things fit on one line. I do things in strange ways just because I heard about them or thought "I wonder if you could...", and I use the result in production scripts. I parse HTML and XML with regular expressions. Often. I write code that I know won't work when given filenames with spaces. I'll sometimes keep using code because I'm proud of how little time it took me to write the initial (almost) working version. I'll use C instead of C++ because C compiles faster (so I can get back to gdb faster). I'll use Inline::C for something that would be easier to write as straight C, just because I feel like using perl. I'll spend two hours optimizing code that I plan to run once, where the initial version would have finished in half an hour. I'll rewrite efficient, elegant code because I couldn't understand the algorithm in the original, and end up with a sloppier version of the same algorithm. And then I'll use my inferior version when the time comes to plug it into the rest of the system.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://167963]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found