Quantcast
Channel: puremango.co.uk » code
Browsing latest articles
Browse All 10 View Live

Fast PHP – effective optimisation and bottleneck detection

PHP is not the fastest language on earth. That honour probably goes to machine code. But like many high-level languages, PHP provides some handy abstractions, like named variables, hashmaps...

View Article


XKCD Colour Survey – a 3D visualisation

Randall Munroe (of XKCD) has been running a “name the colour” survey for the last few months and today released the data. The results are broken down by gender, and he makes some fascinating...

View Article


Caching in Javascript with Cachejs

Here’s a useful open-source (MIT license) javascript caching object I developed for my job at GG.com, the best horse racing site on the net. (I am contractually obliged to say that every time I mention...

View Article

Fast PHP array_unique for removing duplicates

PHP’s native dedupe function, array_unique, can be slow for large amount of input. Here I’m going to talk about a simple function that performs the same task but which runs a lot faster. Often, people...

View Article

Some thoughts on JavaScript

I don’t know about you, but I grew up doing image rollovers in JS and other groundbreaking “dhtml” stuff. Since then CSS has evolved, web standards and browsers have evolved, and things are much much...

View Article


Some tweetable #js1k demos

JS1k is consuming me at the moment. I saw this entry by strager and it inspired me to push for a tweetable (<=140 byte) demo based on his. By dropping the save/restore and alpha blending features, I...

View Article

JS1k Winners – Top Ten Entries

So, the JS1k contest is over and the winners are finally in! What a fantastic event this has been, massive thanks to all the organisers and judges, and to all the entrants for putting on a great show,...

View Article

Overloading in PHP

Murray Picton wrote up a blog post today on overloading functions in PHP. Overloading is a useful feature of many languages. Murray gives a nice definition in his post: Overloading a function is the...

View Article


Poking holes in PHP object privacy

PHP provides a decent model of class member visibility, with public, private, and protected members to help you define tight APIs for your objects and show other developers how your object is supposed...

View Article


Three Neat JavaScript Tips

JavaScript is a great language. It really can power your entire web stack from animated effects on the frontend to ajax calls for faster user experiences, to backend JSON APIs written in NodeJS. It’s...

View Article
Browsing latest articles
Browse All 10 View Live