Perfect Vs. Good

heusserm on 2003-10-23T11:44:26

In Unix Vs. MIT cultures, one of the recurring themes is "The Right Way" Vs. "The Good Enough Way." Another way to put this is "The Perfect is the Enemy of the Good."



Pyscologists have a term for someone who expects too much: A Perfectionist. The Perfectionist's dilemma is that they can't every get started on anything until they have it planned, and planned perfectly. As a result, it's nearly impossible for them to move from planning to actually implementing (doing).



What does this have to do with Perl? In class last week, we were talking about 5th generation langauges - declarative languages that understand the context of your words and can figure out meaning, instead of relying on syntax. Dr. Leidig said that the ideal programming language would be able to parse english sentances. Not quite to the level of a turing test, in that it doesn't have to reply in english, but pretty close.



So, of course, ProLog and LISP come up, and Bill Day says something like "Any Language with a DWIM (Do What I Mean) command has got to be another generation." We discuss how ProLog and LISP truely are AI languages that can truely understand context - but not english context.



Of course, I mention Perl. The professor's response is something like "Yes, Perl was an ugly, early attempt at grokking context." (Ok, he didn't say Grok, but that's what he meant.)



So here you have this computer language that no one in class has been formally trained on, yet several of us have used to create large, complex, mission-critical applications. And you have LISP, that several people have been formally trained on, and yet pretty much none of them have written more than two or three lines of code in. The first language is Good, the Second is Perfect.



To borrow a line from Joel Spolsky, "What's going on here?"



Well, the Perfect is the enemy of the Good here, and Good is certainly Good Enough. "Learning LISP" has been on my to-do list for several years, but i've never had the time. "Learning Perl" wasn't even on my to-do list back in 1997, but I needed a quick program to grep some data, and the code was so trivial that I didn't have to "learn it."



Doing a google search, I found this explanation of how Good can be better than best - simply put "getting to best usually gets complicated."



More searching nets the original quote to Voltaire. Anyone have any additional insight into this?


practicality

mary.poppins on 2003-10-23T13:35:52

I think the reason perl is so useful is that it came not from academia but from "real life." It solves problems that people actually have. An interesting counter-example is ocaml, which is IMO a fantastic application programming language and compiler (static typing, polymorphism, type inference, and native code generation). The maintainers, however, are French academics, who can't be bothered to do things like set up CPAN, implement a good standard library, generate helpful compiler error messages, etc.. So ocaml is great for writing compilers, theorem provers, and so on -- but is not a replacement for perl.

I was surprised...

jordan on 2003-10-23T20:45:11

that nobody has yet mentioned mentioned this classic essay. Make sure to check out the references therein. Really interesting stuff.

Oh joy! In looking up a reference to the above, I find this fascinating looking piece. In fact, there appear to be several interesting essays here .

I've always found Richard Gabriel to be one of the most thoughtful writers on software issues.