Bad Tools vs Bad Programmers

davorg on 2002-07-05T15:23:47

This afternoon I was given the URL of an Open Source project that we're thinking of using at work. So I go off and download it.

It's basically a web front end to a database, so the developers have chosen to implement it in a combination of PHP and Javascript. I know a bit of each of them so I start to look at the code.

Doesn't take me long to realise that the code is really nasty in oh so many ways. Even their HTML is so crufty that half the pages don't work on Mozilla.

I start to have a bit of a rant about this on the #london.pm IRC channel. "Why is all Javascript and PHP so nasty?", I ask, "and why can't people use a proper language?"

But then I stop as I realise something.

If you find a random web application that is written in Perl, you will almost certainly find exactly the same thing. Badly designed applications and nasy hacked-together code. The vast majority of Perl code out there is appalling. I've said that before.

So anyone coming to Perl in the same way that I'm coming at PHP and Javascript would have exactly the same experience. It's not that the authors of this are using bad tools (they may well be, but that's not the issue here) it's that they are bad programmers. And that means they'll write bad code no matter how good the tools they use are.


Not alone anymore!!!

darobin on 2002-07-05T15:46:53

Hey, cool, I'm not alone anymore!!! I've been saying that EcmaScript (formerly known as JavaScript) is actually a pretty decent language if you use it properly and have a good implementation (say, the Mozilla engine that also powers Adobe's SVG viewer).

I wrote a bunch of large GUI apps in EcmaScript and quite frankly it was all clean and well done, and worked really well. For sure, I would have preferred it to be Perl but overall I can't say that it made much of a difference.

Now the problem is, how does one explain to a DreamWeaver Kiddie the importance of clean code...

Re:Not alone anymore!!!

jdavidb on 2002-07-05T16:26:44

Doing it properly has to include "using it for proper purposes." I've seen way too many simple form-based applications that failed to work for me because they tried to do something special with JavaScript when a straightforward, copy out of a textbook CGI program should have been used.

quick hacks can work

TeeJay on 2002-07-06T15:29:00

.. and sometimes that is what matters most.

I have used a load of misclaneous tools that are both proprtoatary and open source and they could all be quick hacks as long as I can get the job done.

Of course if they don't get the job done then shoddy workmanship is adding insult to injury.

The thing is most people don't look under the bonnet as it were, until the car has stopped. Thats why matts script archive was so popular.

Unfortunately it means re-working all of freshmeat to remove the bad perl now that NMS is finished  ;)

Easy to use tools

IlyaM on 2002-07-09T20:37:48

No wonder that easy to use tools and languages like Perl, PHP and JavaScript attract inexpreenced programmers. Have you ever seen web designer programming in C++ or in Java for example? But many of them are capable of writting some Perl. Obviously one should not expect high quality code from them.

This is why I think percentage of "good", say, Java code is higher than percentage of "good" Perl code. It is not because Java is better. It is because Perl is easier to learn and program in.