Pick any two

When writing up a detailed introduction to some answer code for a competition, I came up with a variation of the “good, fast, or cheap – pick any two” in relation to programming for the web, which is that you have a choice between clarity, compatibility, and size – pick any two.

This is because there are a number of different factors competing for your attention. If you want the code to be clear and understandable, and you want the code to also be compatible across multiple web browsers, then you must accepted that has to come at the cost of size, because in order to maintain the clarity and compatibility, you’re going to also need some libraries of code to help manage such things.

If you want clarity and a small coding footprint, then it’s only going to work on the more modern web browsers, and won’t be compatible with older ones.

If you want code with a small footprint to also work across multiple web browsers, then you have to use older coding techniques that aren’t as expressive or clear as more modern techniques.

Thanks to breaking things down in such a manner, I can figure out before I begin that I’m not interested in writing unclear code, and because I like to try to maintain communication with older browsers, I can approach what I write with an eye towards those priorities.

JavaScript Objects

I was working on a project to help you explore programming objects, but someone has beaten me to the punch with the Definitive Guide to Object Oriented JavaScript which is an incredibly well put together website that helps to educate on virtually all aspects of such objects, and also provides a playground in which you can easily explore the detailed makeup of them too. It’s everything I was wanting to create, and more.

Advertisements