Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Need Bad Code

by SleepyJay (Beadle)
on Nov 15, 2007 at 20:33 UTC ( #651068=perlquestion: print w/ replies, xml ) Need Help??
SleepyJay has asked for the wisdom of the Perl Monks concerning the following question:

I'm taking a programming interview soon. I know there will be some Perl debugging. I'm a little bit rusty in Perl--actually, my head is currently filled with C++ instead.

So, I was hoping to find a resource for buggy Perl code. NO! Let me rephrase that...I'm looking for something like the book "How NOT to program in C++" (http://www.bookpool.com/sm/1886411956). I'm fairly certain nothing like that exists for Perl, but maybe there is some web tutorial someone knows about that has some examples to work through?

Maybe there's a Monk out there who feels like creating a few for me...? Or pointing out some on SOPW that were pretty good but straight forward examples? I'll be hunting cool Perl books later tonight, too, so any suggestions are welcome.

And if any of my interviewers are reading this, please ignore the question. 'K? :)

Thanks
jason.

Comment on Need Bad Code
Re: Need Bad Code
by philcrow (Priest) on Nov 15, 2007 at 20:44 UTC
    Peter Scott has a book, Perl Medic:Transforming Legacy Code ISBN 0201795264. I haven't read that one.

    Phil

    Update: corrected book's author, thanks to perrin for pointing out the error.

    The Gantry Web Framework Book is now available.
      I have. Highly recommended!

      /J

Re: Need Bad Code
by goibhniu (Hermit) on Nov 15, 2007 at 21:45 UTC
Re: Need Bad Code
by ww (Bishop) on Nov 15, 2007 at 21:54 UTC
    Have you considered going through Worst Nodes?

    Some will be worst for lack of effort; recalcitrant blindness; etc., but I'd bet a nickle that some are there because they contain code with horrendous gaffes.

Re: Need Bad Code
by Joost (Canon) on Nov 15, 2007 at 23:28 UTC
Re: Need Bad Code
by CountZero (Bishop) on Nov 16, 2007 at 07:29 UTC
    Doesn't Perl Best Practices have examples of how not to do things?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Need Bad Code
by eyepopslikeamosquito (Canon) on Nov 16, 2007 at 09:22 UTC
      <tongue_in_cheek>

      Wow, that is some bad code ... it doesn't properly account for leap seconds

      </tongue_in_cheek>
        Someone in the comments section of Daily WTF actually said that. I'm not sure it was tongue-in-cheek there.

      <office_space voice="samir">that is...terrible, terrible code Peter</office_space>

      meh.
Re: Need Bad Code
by Anonymous Monk on Nov 16, 2007 at 14:05 UTC
    bad code? any of these should do

      Haha awesome :-)

      meh.
Re: Need Bad Code
by sir_lichtkind (Friar) on Nov 16, 2007 at 18:42 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://651068]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2014-09-02 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (30 votes), past polls