http://www.perlmonks.org?node_id=513868


in reply to "Baby" Perl versus "Bad" Perl

Let's say you have two children. One is 8 and the other is 3. They both exhibit the same kinds of behavior - drawing on walls, throwing tantrums, willful disobedience, and the like. Which is bad and which is the baby?

On one level, both are behaving badly and, as such, shouldn't be taken to a restaurant. However, that kind of behavior is expected for the 3yr old and not expected for the 8yr old. Why? Because the 8yr old is expected to have matured and (mostly) grown out of that phase. And that is the difference between "baby Perl" and "bad Perl." If you are a newbie, then your Perl is baby Perl. If you are a supposed expert (as all authors are supposed to be), then your Perl is bad Perl. Neither would be allowed on my boxes in a million years, but one is expected behavior and the other is not.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: "Baby" Perl versus "Bad" Perl
by sauoq (Abbot) on Dec 04, 2005 at 23:09 UTC

    I don't think your criteria is very good. You seem to be saying that whether Perl code is "baby" or "bad" depends on the experience of the programmer. I don't think that's true. "Baby Perl" can be distinguished from "Bad Perl" without asking the developer how long he has been coding.

    I think that there are things that mark code as bad. Incorrect code is bad. Insecure code is bad. Code with significant performance problems is bad. Code that is difficult to maintain is bad.

    But there can be "baby" Perl (or any programming language) that exhibits none of those problems. It might be simplistic and lacking in idiomatic expression. It probably doesn't use any "advanced" language features. But none of that makes it bad.

    BTW, I'd much rather deal with a junior programmer who is writing "baby" Perl (good or bad) than any programmer writing bad but "advanced" code. ;-)

    -sauoq
    "My two cents aren't worth a dime.";