Clinton Montague

Developer, learner of things, functional programming enthusiast, hacker, and all round inquisitor.

2 Javascript lectures you need to watch

June 13, 2009

I can’t believe that I’m actually building one of those ‘XXX things you XXX about XXX’ lists, but I am. Although I’m letting myself off because this is not just (what I consider to be) filler material, but some links to some lectures which have genuinely improved my understanding and use of Javascript.

Flash and the z-index problem, solved

March 24, 2009

I was always told that Flash would render on top of everything else. That’s it. There’s no way around it. It meant that whenever I had a design using, say, suckerfish menus, I’d have to be careful to ensure that there was enough space below the menu to accommodate for Flash’s nasty little habit. It turns out that the notorious they were wrong. Again. It’s amazing just how many times ‘they’ don’t get it quote right, and that the majority of people still believe them.

Using a for loop, print the numbers from 0 to 5

March 16, 2009

I’ve been training for a ZCE certification, and found myself getting quite annoyed with some of the more obvious questions. One of the questions in the beginning of the test was which of the pieces of code would output the numbers 0 to 5 using a for loop. I mean, come on! I present some of my more creative and twisted ways of completing said task.

Operator precedence – what does (i=1)*i– – –i*(i=-3)*i++ + ++i equal and why?

February 22, 2009

I was looking at some code from a number of years ago and was horrified by the amount of ‘clever code’ in there. After decoding it, I immediately rewrote it. Then I set myself a challenge. Write the dirtiest expression ever to besmirch a hard-drive, then decode it in a blog post. I present to you with the fruit of my labour.

How to stop pesky spam by blocking IP addresses from visiting your blog

February 9, 2009

I had a lot of spam from a particular IP *cough* *cough* so I wanted to stop access to the site from the IP. Using only 3 lines in my htaccess file, I managed to cut down my spam by 4 an hour!

January 28, 2009

Quickly find the answer to one of the most important questions of all – is it the weekend yet?! It’s completely pointless, made by yours truely, and so easy to use that you just have to load the page to find the answer.

Creating your first jQuery plugin

January 26, 2009

It sounds like something that only javascript pros could do – make a plugin for jQuery. It took me a while before I even looked into it for the same reason. Around a year ago I tried it, and I want to show you just how easy it is.

AJAX is easy, but remember accessibility

January 18, 2009

AJAX is easy. It’s just javascript talking to your server to grab a little bit of content instead of the browser grabbing the whole thing. With this in mind, let’s get to work and build a simple AJAX application that will work with javascript turned off. We’ll do this by assuming that there is no javascript in your user’s browser, then use jQuery to change the DOM to add in the behaviours.

Better, faster and more robust rollovers with CSS sprites

December 9, 2008

Learn how to create faster, standards compliant, javascript-less and accessible buttons using only CSS. Even the most hard-core of javascript programmers will admit that actually, they might have done this by mistake. And I promise to show you how, and if you’re lucky explain why.

I’ll even tell you what a sprite is.

Create cool slidy drawers with jQuery

November 16, 2008

In this tutorial, I will show you how to make cool sliding content using jQuery. And the best part is that if javascript is disabled, the content will still display very nicely.