Clinton Montague

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

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!