[Chicago-talk] Sharing my pain

Michael D. Stemle, Jr. manchicken at notsosoft.net
Sat Oct 14 06:57:07 PDT 2006

ANYBODY who's ever worked at a college or university that employed cheap 
student labor has seen **NASTY** things that no human eye should ever have to 
see in the form of code.  I've seen **NASTY** Java, C (much nasty C), COBOL, 
Perl, PHP, bash, Python, and yes, even Ruby.  I saw one guy who worked in all 
four of Perl, PHP, Python, and Ruby.  He fancied himself an "expert" and many 
others shared this view.  One day, I was looking at his code and saw this 
this (the following code is a reproduction.  Actual names have been changed 
to protect the innocent)....

my $output = `psql studentdb -c "SELECT * FROM students WHERE 
my @students = ();
while (split(m/\n/,$output)) {
	my ($id,$name) = split(m/ \| /, $_);

He was **USING A SHELL ESCAPE TO HIT THE DATABASE!!**  That would have been 
bad enough had he done it in only one place... but no.  He did it EVERYWHERE, 
in all four Perl, PHP, Python, and Ruby.

I can only conclude that people will undoubtedly be idiots no matter what 
langauge they're using.  Shell escapes to postgres' CLI and parsing the 
output is the WRONG way to do any DBMS interaction, but the guy did it 
successfully in four different languages.  My heart goes out to the language 
zealots who incorrectly point the finger at Perl claiming it is somehow 
inferior.  I hope that they somehow, in the future, gain some clue... as for 
now, they're a bit lacking.

On Friday 13 October 2006 15:49, Jim Thomason wrote:
> > Yeah.  Ok.  My question was actually: What about this code makes this
> > make people want to use Python?
> Shhhh! That's the secret you're not supposed to let out!
> There are people that legitimately argue that python or lisp or ruby
> or smalltalk or whatever are much better because you can only write
> things one way, so it's easier to maintain, so when the maintenance
> programmer comes out and determines you're a schmuck it's immediately
> obvious to him what you were doing and he can re-factor it easily.
> This is, of course, a total crock. Bad programmers are bad programmers
> and can screw up things like you wouldn't imagine regardless of the
> language.
> Admittedly, there's a lot of bad perl code out there, but all this
> tells me is that a lot of bad programmers use it. But, also, a lot of
> programmers are just bad. There may not be statistically more bad perl
> programmers than in other languages, you just may see more of the
> code. Perl is available all over the internet. How much open source
> cobol do you look at on a daily basis?
> -Jim....
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk

~ Michael D. Stemle, Jr. <><
(A)bort, (R)etry, (I)nfluence with large hammer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20061014/b47cd7cf/attachment.bin 

More information about the Chicago-talk mailing list