Web programming, unnecessary evil

I started doing a lot a web programming recently. I've done some before on and off, but never really in anger. I never fully appreciated the concentrated evil that awaits the unwary web programmer, until now. How many bloody languages do you need to learn to pull off a decent web site? In my day, C++ was enough for any man to do any thing. In the web world, you need to know HTML, CSS, Javascript, MySQL, PHP and AJAX in order to produce anything more than a standard templated site. The brainache is ridiculous.

This site in particular caused many headaches with a lot of hard work going into the production of the clean lines that greet you at the front end. For all of the smooth simplicity that you see here, there are many thousands of lines of code behind it all making it appear as seamless as it is.

Web Programming

To make matters even worse you cannot debug this stuff in the traditional way. If things go wrong, and they will, you have to deduce what the problem is by going over the code line by line rather than having a friendly debugger show you the way. Some debugging aids are available separately it has to be said, but it's not the cricket that traditional programmers play, not the same cricket at all.

What is really, really annoying though is the completely unnecessary syntactical differences between Javascript and PHP. They are very, very similar languages, both very close to the C of old to be honest. However, the number of times my PHP fails because I've used Javascript's + operator rather than PHP's . operator beggars belief. These operators both do the same thing, but the + operator is so much more intuitive and works great in Javascript, yet PHP rolls in a different direction. How hip of it.

Just the separation between client and server side functionality is a bit of a head f#ck. When programming games and the like, you mostly have no concept of different machine spaces, your code just runs on one machine with total control over the environment. In the Javascript / PHP world, both languages are used to construct web pages and you often forget which side of the equation you are on at the time you are writing the code. It's a jolt to the confidence when you realise that the reason your code isn't working is because it's on the wrong side of the bloody internet divide! How can you be unaware of something so fundamental when engineering systems like this?

It really does take a whole new mindset to get into this web programming world properly. And that, despite the frustrations, is actually what makes web programming so interesting. In my career so far, programming new systems has mostly just been an evolution of what I already know. But on this occasion, web programming has been a whole new departure. And that rush of new knowledge, really quite refreshing. For all of the pain, I'm glad I've branched out in this direction and learned all that I have. Building this site in particular has been difficult, yet satisfying at the same time.

But one last stench that continues to fill the nostrils is that of browser compatibility problems. How can several leading companies with a firm specification delivered by a third party get their rendering wrong? Browsers have been around for more than a decade now, they should surely have it nailed at this point in the web's evolution? But they haven't, and it sickens me. Your work which renders flawlessly on one browser, looks disjointed and broken on another (hello IE you sack of sh#t, great browser, with horrible rendering flaws) I know I'm not doing anything wrong and that it should work just fine, but sometimes it just doesn't and it leaves you pulling your hair out trying to come up with some "hack" that forces it to work without breaking other browsers at the same time. What is really quite inexplicable though is that a lot of browsers share the same Mozilla rendering core, so they should all render the same way!

God love you Internet, and God knows we'd be lost without you, but can you please get your sh#t together once and for all? Thank you.

[Posted 05/11/2010]

This comment will be permanently deleted. Are you sure?

This comment will be accepted and published openly. Are you sure?

Submitting comment, please wait ...

Your comment could not be submitted to the server at this time. Please try again later.

Applying for subscription, please wait ...

Your subscription could not be processed on the server at this time. Please try again later.