Hacker News new | ask | show | jobs
by noonespecial 4907 days ago
I think part of the problem with JavaScript, php, perl, etc is that is there, by default, everywhere. A great many beginners do some very ugly things with it because it's already on the system they have and there's tons of not so good examples on the Internet to cut and paste. I'd bet there are plenty of people creating web sites who aren't entirely clear on where HTML stops and JavaScript starts.

Ruby, for example not only has to be installed on most older systems, you'd have to know that you wanted ruby in the first place. This alone acts as a giant filter. Anyone who knows they want to use ruby is already going to produce better code.

Edit: Please s/ruby//g with anything slightly more obscure than perl/php like python, go, object-pascal, etc. I'm not trying to be a ruby elitist here. It was just an example.

4 comments

They are not "already" going to produce better code. I have nothing against Ruby, but its devs are not endowed with better programming practices.

I do agree with you that it acts as a filter of sorts, but only for now. Anything that is not mainstream tends to act this way.

I've seen a lot of silly Ruby / Java / Scala code to buy this line of argument.
PHP is most likely not on the system they have.

I don't know about OS X but it doesn't come with any popular Linux distro and it doesn't come with Windows either. Neither does Perl.

PHP comes with every hosting provider out there for a few dollars a month. Has been the trend for a few years now :-). PHP is cheap to support for a host.
Most people don't try to host their first web site on their windows box. They likely get a shared host for $3 a month somewhere. This probably has a little sample site with a few lines of PHP and some JavaScript on it.

When I started, I did not know the difference between PHP, JavaScript and HTML. I thought it was all "web markup".

> Most people don't try to host their first web site on their windows box.

Most people dont host their first web site period. I never heard of anyone who didn't learn PHP offline, on a local Apache server.

PHP is available on OS X

    computer-4:~ justin$ php -v
    PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012     17:45:44) 
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
That doesn't sound elitist at all...
I don't mean it too. I produced the most awful, unreadable, barely functional drek you can imagine for far longer than I should have as a beginner with perl. The point is, that it might not be a failing of perl and JavaScript that makes so much code written in it so ugly. Its accessibility might actually be a good thing, with this simple side effect.