Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Need Bad Code

by SleepyJay (Beadle)
on Nov 15, 2007 at 20:33 UTC ( [id://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.

Replies are listed 'Best First'.
Re: Need Bad Code
by goibhniu (Hermit) on Nov 15, 2007 at 21:45 UTC
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 Joost (Canon) on Nov 15, 2007 at 23:28 UTC
Re: Need Bad Code
by ww (Archbishop) 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 eyepopslikeamosquito (Archbishop) 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 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 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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-20 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found