isn't quite ashamed enough to present

jr conlin's ink stained banana

2006-06-28

::Beat To Death With a Rosetta Stone

i know a lot of languages.

No, not the sorts of languages that could actually get me a salad without being beaten black and blue by some normally nice lady in Lisbon, i'm talking about the aberrations known as "computer programming languages". While in theory these are all based off of some form of English, as anyone who's ever written a single line of code can tell you, they're more likely to resemble the ramblings of someone with a severe head trauma than they are to anything else.

A fair portion of modern languages are based off of a venerable beast called ALGOL. This is a little like saying that Spanish, French, and portions of English are based off of Latin, though. In English, the Latin bits generally involve bathtubs and sticking things with pointy sticks. English 'tis a silly language, and i'm rambling. ALGOL, like Latin, has since pretty much vanished from the face of the earth having inflicted enough damage and therapy bills to last generations.

ALGOL based languages have a few things in common, but basically you learn one, you learn 'em all. Well, except for the actual commands. Oh, and some key syntax. Oh yeah, and the framework. Ok, the actual letters, numbers and symbols? They're the same.

Thing is, each language brings it's own set of "weird" along for the ride. Lately, i've been dealing with a lot of what are considered "scripting" languages. These are the languages created because folks looked at stuff that came before it, realized they sucked and became dead set on fixing them. (Note: By "fixing" it usually meant making new things that sucked more, but that's beside the point.)

The languages i'm currently dealing with most are Perl, PHP and now Javascript.

A colleague of mine writes in C++ (which in the ancestral tree of programming languages, occupies the sturdy branch where you tie off one of the ropes for the swing. C is the elder, sturdier branch of which C++ spawns from which hangs directly in the path of the swinger, meaning that one has to make sure one moves their head over to the right on the back swing). He considers Perl to be "unclean but necessary" in the same way that one considers sewage treatment plants an occasional requirement. He has no love of PHP since he feels it's too "hacky".

i fear his reaction should he ever see Javascript.

Now, let me be clear, seeing how i deal with all these languages.

Perl, for better or worse lets you do whatever you want, however you want. While it's possible to write clear, concise programs in Perl, it's equally loaded with obscure, arcane terms which Perl programmers seem unduly attracted to. That's fine, except for the few times someone read a few lines of Perl code out loud and accidentally summoned an Elder God. i understand that there's an entire branch of CPAN dedicated to the Egyptian god of Chaos, Set.

PHP, is a tad different. While slightly more structured in syntax than Perl is, the language was "organically grown". No, it doesn't mean that Rasmus was fed only on pure water and sunshine while he fermented the language, it means that stuff sorta popped up everywhere and some of the earliest things that went into making it happen were shi– uhm… less well thought out. While the language is admirable in what it can do and performs exceptionally well, the general programmer is constantly trying to remember if it's pregreplace() or preg_replace() and where the hell the haystack is.

Finally, there's Javascript. i'll note that in spite of the name Javascript, it has nothing to do with Java. It is, however, a very strong Object Oriented language that has grown significantly in recent years. The language itself is very simple, with only a few easy rules to remember and a very minimal set of core commands and syntax. Learn them, and you're pretty much good to go.

Well, unless you actually want to USE Javascript for anything.

You see, while Javascript, the language is nice and easy, it requires tying into a beast called the Document Object Model. That model is provided by the browser vendor, who hates you. Trying to get the browser to do anything is akin to trying to get an elephant to swan dive. Using only verbal commands. Consisting of vowels. That change depending on which direction you're looking at the elephant from.

When you hear of web developers saying awful, hurtful things toward the sick, twisted individuals responsible for making their lives hell, you have to understand a few things:

  1. Yes, actually, it is easier to write this stuff in Perl, PHP, Python, C/C++, Pascal, Fortran, 8088 Assembler running on a TI-80 with bad memory, because those things are fairly consistent. Think of it like having to convert your beautiful C++ program to Logo because your customer want's to run things on a VIC-20 every second Tuesday, oh yeah, and you customer also steals a random digital device to run things on every Wednesday, so be sure things can run on that too.)
  2. DOM designers are sociopaths, personally, morally convinced that they are the sole genius that will save the planet. That or they just never talk to each other. Either way, they're taking it out on the web developer guy.
  3. It took 10 minutes to make it work on the first browser, it took the other three days to make it work on the other browser. Getting it to work on anything else may require a soul. They already gave. So, any plans on how you'd like to spend the afterlife?
  4. You are not superior because you know C++ and Java. You just took the easy way out. Coward.

Seriously, anyone who doesn't think of the guys writing Javascript and AJAX as programmers need to be escorted from the building and beaten with a shovel. That, or forced to actually write some cross browser Javascript.

Either way, they'll wind up a bloody babbling mess, and that will be a drastic improvement.

Alice
2006-06-28 - 23:47:17

I'm reminded of this post by Brad Fitzpatrick of Livejournal, who is a fairly well known perl hacker and I admire his work a lot, but knowing he thinks JS is tough makes me feel a little better about swearing at $browser.


JIM
2006-06-29 - 11:53:23

Hey, I find it hard enough to write CSS that renders consistently on different browsers. I can't imagine trying to write an actual code that does the same.

It would be nice if you could just bypass the damn browser, you know?


steveo
2006-06-29 - 18:01:28

One of the very reasons that I have avoided getting into AJAX too deeply, despite being the Javascript ninja and being very much in love with the language, is because we are now deeply entrenched in Browser War II. I'm very thankful I'm not in web dev anymore. I get to sit back and wait for the next big thing to arrive and settle in before I have to go and spend $65 on another encyclopedia-sized language manual. I also get to laugh at the stupid names for the intermediary steps between here and there.


Callous
2006-06-29 - 19:44:35

This makes me sad. It makes me sad to think that a collection of bad design has once again grown to punish everyone in the industry, costing untold amounts to work around as everyone who wants to be a player has to haxor around some crap that didn't even need to exist.

PHP is bad enough that I feel my soul has been darkened by using it. The JS/browser mess I looked at and simply refused to go there. I get to do that, because nobody pays me to put up with it, so I can pretend to have morals.

However, you aren't alone in your suffering. In my domain – process control – a few bad decisions about thirty years ago – and progressed through subsequent designs – have crippled the North American manufacturing industry with the bastard son of a thousand maniacs. There are no numbers, but I'm confident that something around a billion dollars a year would be appropriate accounting for lost production.

More people need to be lazy enough to do it right the first time.


Blogs of note
personal that's my blog
(The Official Blog of the Internet)
memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org Henriette's Herbal Blog lynne ydw i slumbering lungfish
geek Y!Cool Thing jeremy z
(The Official Website of the Internet)
dave's picks ultramookie Josh Woodward derek balling simon willison
news ars technica search engine watch

experimental

Firefox search plugins for Yahoo!

My Living Room media box config

The Official "Official" Registry of the Internet

Powered by WordPress
Hosted on Dreamhost.