As a web developer I spend far too much time surfing the net and playing with websites; so when I find something really good (or bad) I write about it here.
10 Nov 2011
A set of plugins for wildfire & phpwax that handle common tasks
11 Nov 2010
As one the of big parts of our php wax framework we recursively scan over a set of directories and find all the php files. This can be seriously slow if you're not careful. As part of a set of improvements coming to wax we took another look at this and found the wonderful RecursiveRegexIterator.
10 Nov 2010
At some point in time you always end up having to write a regular expression to parse something. In the web, it's normally because the site/service you want to use doesn't provide and API, so you end up scrapping the page and having to rip the data out. Sometimes you need them for something simple, like finding links inside a block of plain text.
The common problem, I can never remember them and end up redoing them each time, so I'm listing some here.
15 Oct 2010
A new feature of phpwax that we've been working on is a handy new way of handling the layout cache. With the new method, the user should only ever get 1 slow request to a page, after that point the cached version is always served.
15 Sep 2010
With quite a few of our more recent sites (a couple of biggies in the works...ssshh) speed and load distribution is very important. When you have 100 people a second trying to view a page every ms counts.
Although there are more elaborate ways (normally expensive, sometimes tech issues) which can provide blistering speed we use a good open source alternative.
15 Feb 2010
I've gone for recycling per region during 2005/2006 in 1000s of tonnes and plugged in a few different chart types. When I get a bit more time will improve this.
23 Jan 2010
Amazon have set up version control on their S3 system ; it is currently in Beta (isn’t everything?) but looks like it could be very handy.
Having a scan over it the main problem I see is that instead of storing diffs between the versions of file they are storing the entire file again as a new object. As storage on s3 is insanely cheap anyway, you wouldn’t think its that big a deal, but think about it for a second.
If you are editing a high res video and storing it on s3, you could see your bills sky rocket. Lets say the video is 1gb, and you need to make lots of amends and get client approval for each one. With normal version control (something like dropbox I think is a suitable comparison here) you’d only be saving the changes between the original file and the current one. With s3 it’s an entire new file.
That is where you could easily end up using 10gb of storage by just amending a single file a few times. I can understand why, storing entire copies is easier then trying to figure out a diff engine capable of handling obscene file sizes.
15 Jan 2010
As I never seem to have the time to blog about much any more; it’s taken me far too long to mention this.
WAA used to have a reasonable website (I didn’t like all the pink). It was, most importantly, a valid XHTML site with only a single bit of flash. This version of their site had plenty of content, was updated regularly (until Chris Tomlinson left) with a really good page rank in google (If memory serves it was a 6).
What replaced it (not long after I left) was an abortion of a flash website, which I have already berated in an earlier post. Flash websites can still do well, if content is exposed properly. Theirs wasn’t. The number of times it was updated you could count on a single hand and they had removed pretty much every single article that had ever been written for that site. This is old ground; I’ve already moaned about it many times.
Towards the end of last year (2009) they launched a new website; and it wasn’t flash! Instead it is a good quality html website with some fresh content. A positive move for a change; lets see what happens.
12 Jan 2010
Last year I moved my blog over to use git hub pages which makes use of liquid & jekyll to compile your website to a static version.
Git hub pages have now become my choice for any simple project website (just like my little front end to google’s closure optimiser) and to that end I’ve found a whole bunch of useful resources which will hopefully save digging around in the future.
So now I know how to use them well; just need to make a better design for this blog!
10 Nov 2009
Naming issues aside, the library offers a whole host of functions (like all the other major libraries) for dom manipulation, event handling, asynchronous calls etc. There are a couple of nice extras that it does have over other libraries.
Instead of loading the entire library in (which would be huge) you can just load the bits you need using the require call. Nice start, but it gets better....
22 Oct 2009
I got bored with my site design a few months back, finding it to fiddly and image heavy; so time for a change. Something simple this time, clean, plain, and a scatter in a few bright colours for contrast.
After searching around for a while I found the rather cool abstract vector image (sitting on the left ) over at pink moustache – strange name, cool image.
Mainly just something to break the whiteness and introduce the colour scheme used to signify categories.
I think this is about the 5th iteration of my site, switching platforms and designs along the way. My site is now sitting over on github – just need to add an external comments system …
EDIT (January 24 2010): Well that version was short lived, it was very ugly so changed it this weekend! Much better this way.
01 Sep 2009
Ooo, the very cool github that handles all your GiT repository needs has now introduced ‘pages’. This can be an entire repo or a single branch (called gh-pages).
22 Jun 2009
Great way to start a Monday!
06 Jun 2009
Although I covered this once before, many updates of OS X have come and gone, so it is about time to re write the post!
This new post will cover how to setup and install all the bits you need to get a good working environment for a LAMP developer, click though to read it in full!
29 Apr 2009
Ok, so I’ve just discovered another wonderful way to trigger this bug. Apparently putting html comments inbetween floated containers makes the last character repeat! The joys of IE….
28 Apr 2009
Ok, so I’ve just discovered another wonderful way to trigger this bug. Apparently putting html comments inbetween floated containers makes the last character repeat! The joys of IE….
18 Feb 2009
Recently I came across a very strange issue while converting an existing website. As I’m just porting it over to our framework no design or styling work was required, so I’d just been copying the header and footer files into our layout system when I noticed something.
This site was using HTML 4.01 and all the stylesheet links had a title attribute, this trigged an obscure issue I had never encounted before. According in the HTML 4 spec setting a title attribute converts the stylesheet to a preferred stylesheets and only one of these can be loaded in at any time. This meant a whole bunch of styling would disappear even though its clearly visible in firebug etc. For more information take a look at this article.
20 Oct 2008
Flash has its place; it’s great for adverts, playing movies and anything that really, really needs smooth animation, but whole websites? I think not
I’ve always had an issue with Flash being used in such a fashion. Yes, google can now index some of it, but only if it’s been coded properly and in a search engine friendly way. During a recent project (for the Impreza S microsite) we had several discussions about how best to present the creative we had for this site
In the end flash won, but with lots of consideration towards how google et al. Firstly, not all of the site is in Flash (yey!) the navigation is HTML and interacts with the flash. A few other things like sitemaps help the site to be friendly. p. The reason for our decission to go with Flash is mainly due to the colour changer. Regardless of how good the ajax libraries are (jQuery in particular) they currently don’t handle image switching quite so smoothly. The final reason was the page transition; I still find it somewhat unusual and a bit disorienting, but a good effect.
On the whole I feel the site is nicely done (good job Sheldon!) and considering the timeline for it, it is a sterling example of how flash sites should be handled.
On the other hand, some flash sites worry me. Certain so called ‘creative’ agencies who decide that just because they’re creative they need their site to be ‘creative’ – which to them means Flash. In most of these cases you will find that the reason for the entire site being flash is something stupid like ‘we want our logo to be animated and interesting’
There are many such sites out there, you just have to look for them. When you find them ask this question: ‘Is that silly little logo / animated character / smooth page transition / custom font worth the issues with accessibility, maintenance, readability etc’
25 Jun 2008
If like me you have to test your work for the mass market (that means windows) and cater for the majority (yes, that means IE6 and 7) but you are of more discerning tastes and don’t enjoy viruses, malware and endless updates (in other words, you don’t use windows) then you probably use a Mac (yes I do!). So how do you get around the problem? Simple answer, virtualisation.
Basically this means that you can install a piece of software of your machine that lets you emulate another operating system. Most of the established solutions cost money, not much (around £40), but still more than nothing.
After trying both VMware and parallels found them to be very very useful, but at the same time memory and processor hungry. For example, say I have the infamous double margin IE display bug and I’m trying to find the right container to add the display attribute to. I Have textmate open, photoshop (as I’m still working on the design), firefox, safari and VMware; switching to and from applications becomes sluggish.. There is a better way..
VirtualBox, developed by Sun, is faster and smoother than the others I have used and has an OpenSource version! Goodbye VMware!
The only draw back is that the free download doesn’t have support for wireless cards on macs, but otherwise it’s brilliant. Supports lots of operating systems (almost every flavour of linux I can think of) and is very fast. Great example of this, full reboot of plain windows xp (with service pack 2) in under 1 minute…
16 Jun 2008
Firefox, the developers best friend, is due to get a big update tomorrow… A shiny new version will be let lose on the world. Yes I do know about the release candidates, betas and alphas but they don’t really count; when was the last time your mother downloaded something like that?
Anyway, to mark the release they are planning to break the world record for most downloads of a single piece of software in one day. Good luck, I for one will be downloading it, lets just hope their servers can cope!
Take a look at Spread Firefox website for more details.
20 May 2008
The time is almost here for the Multipacks semi regular (hopefully will be regular, this will be the 2nd time) summer time extravaganza; Geek in the Park!
As previously the event is aimed at geeks and their families with the day being split in to two; the afternoon picnic and the evening talk
The afternoon picnic last time was a resounding success with lots of people from all over the country coming down to point and laugh at us trying to play football… The only downside being a lost Frisbee and an almost lost ball (this time we’ll try not to play by the river, honest!). Thanks again to the rowers for rescuing the ball
This years evening talk is aimed at being a bit more interactive and we should have some great speakers (once its all confirmed). So keep an eye on the website and come on over for some geek fun in the sun (hopefully!).
11 May 2008
Your mac is set up and ready to go, but how exactly do you go about setting Apache up in OS X Leopard these days? Well it's it a bit more like linux now with the demise of Network Manager (I think thats what it was called, been a while since I used tiger), but its not too hard, honest!
Firstly decide what suffix your going to use for your local machine, be sensible and use something meaningful like .local or .dev. Dig out your apache vhost file (httpd-vhosts.conf) and set up the file.
Click on though to read more on how to get it up and running.
01 Apr 2008
Ok, play time for all the web geeks.. Best of the best so far..
- BBCs Flying Penguins!
- YouTube rick rolling everyone
- Google goes to outer space
- Tux makes a new friend.
- WoWs new hero class – The Bard
- Gmail’s time travelling emails
- New WoW expansion pack – Molton Core
- Search the future with Google Austrialia
29 Mar 2008
Having recently received my lovely new work Macbook Pro and have been setting it up for some serious PHP and MySQL development. Some of these stages were seriously difficult to find and it took myself and Sheldon Els (also on his shiny new Macbook Pro) a while to figure out; so we thought we would share..
28 Mar 2008
Inside every geek/nerd lies the heart of a gamer; whether its a fast paced FPS or an all encompassing RPG sprites and polygons make our strained eyes twinkle. Harking back to the good old days is becoming more popular as the simplicity is appealing.
29 Feb 2008
As of the 1st of March 2008 Netscape is officially dead and buried. That date is the last day parent company AOL will support the browser.
Netscape was one of the first modern generation browsers with, at it’s peak, over 90% of people using it (in the days of 4.7!) but has recently slumped to a miniscule 0.6%. This huge swing in fortune was the decisive factor and the end of Navigator was set last year by the various boards and management at AOL.
Netscape Navigator was a very important piece of software laying down the ground rules for almost every other browser including the IE series and will go do in history.
In spirit it will on in the form of Firefox, Flock and various other Mozilla based browsers. The Mozillia foundation was created by former Netscape staff who were made redundant in 2003; since then they have once again had large scale success with Firefox now corning over 20% of the worlds browsers.
01 Feb 2008
After coming across this really annoying bug many times I thought it was about time I made a note of it somewhere.
When you starting mixing floated containers with non floated containers the IE 6 only parameter hasLayout triggers to -1 causing all sorts of chaos in your layout; most notably tail characters repeating themselves. This is a big pain in the ass and is a little devil to fix.
To get your layout working again you have to get hasLayout back to 1. This can be done in several ways but the most successful seems to be by adding display:inline onto the containers (and sometimes the items inside) style declarations and crossing as many body parts as you can (for luck).
Other methods for fixing this is to set margin-right:-3px or to change which parts are floated (if your layout allows).
31 Jan 2008
Like many web developers I find myself creating more interactive pages with ajax elements and lots of imagery. When these images come from things such as flickr pools or rss feeds the load time can be dramatically increased leaving big blank sections on your page.
The best way to still load all your remote content in and inform the user of what is going is to use a loading image. I can never find a a decent one when I need it most, so this site I came across is great! You can select a suitable style, background colour and foreground colour and the site creates a gif for you!
24 Jan 2008
Maybe I spoke to soon when I congratulated the IE8 development team on creating a browser capable of passing Acid2 as it now looks as though they have thrown away all their hard work be being stupid.
With the switch between older versions of IE they implemented a malformed doc type detector to enable what was commonly known as ‘quirks mode’ so the site would render using the previous engine. At first look you’ve got to think that this was bad as you could end up with thousands of broken sites which relied on the old, faulty engine. And thats the point.
The only way to get old sites which only worked with faulty / flawed rendering engines is to make sure that when the users of the site install a new browser the site breaks. After all these users start complaining making the site work correctly suddenly appeals a lot more.
This is NOT what has happened with IE 8.
Instead MS and their development team decided to flout previous acceptable methods and create a meta tag to signify the site should use then newly compliant engine. So why exactly would anyone spend time and money turning their old site? As far as they are concerned the site works, who cares if its standard compliant.
Yes its tough being the browser that most people use and with such a bad record of adhering to standards a big switch to a compliant engine and site that was made for your old engine wont work and your stuck answering thousands of email complaints. Is this a goog enough reason… I don’t think so; grow some balls and break the sites are meant to be broken!
If you want to see opinions of world renowned web experts on this stupid decision, take a look at opera watch.
18 Nov 2007
Several months ago the amazingly popular website Flickr opened up its service and functionality to the general public by means of an impressive API. Of course a large proportion of the internet users don’t know what an API is never mind feel the need to use one.
However, as part of the php-wax framework development I created a very basic plugin to use the Flickr API. You can see an example of its use on the front page of this website. Once the framework has been released and out of beta I will write a proper article about its uses with code examples.
17 Nov 2007
Recently I had an unusual but intriguing question posed by a work colleague. Could I create some sort of bot to scan sites relevant to some keywords and market area specified by a client so the client could keep an eye on current events in their field. On first look I almost dismissed it, then i thought about it for a while…
How about a facility inside their CMS which would let them list these keywords and then some how from these keywords pull back a list of appropriate websites. Then from this list (and of course allowing users to add some more of their own) search for pages containing another set of keywords and then using some statics track the rise and fall of these keywords over a set duration.
Not a bad idea i thought, so i looked into implementing it and came across another great utility provided by yahoo. Yes it’s another api, but this one is useful. The web search REST service allows anyone to query yahoo’s search engine, specifying all sorts of parameters and retrieve the results in multiple formats including serialised php and xml.
Great! Now all I need is the client to agree to it and I’ll be making a meta search engine.
10 Nov 2007
One of my regular online reads along with the long standing Dilbert is a web comic called xkcd. It’s very geeky, but lots of fun. Recently they have just produced some of the funniest issues ever in the shape of a 5 part monster about the way of the hacker.p. Anyway, the links are:Part 1Part 2Part 3Part 4Part 5
16 Oct 2007
After many months of putting it off and getting distracted (dam WoW!) I have finally put some time in and got my new site sorted… Well, mostly
Lets start at the beginning; I am one of the developers working on a new php framework called php-wax. I won’t get into details in this post (please see another post – when i write it!) but basically it does what rails did for ruby. Once the framework got to a certain point we started to develop a CMS system to go with it to allow simple updating of content and make everyday minor updates simple.
This new site is an example of how flexible these can be and lots nicer then messing around trying to hack wordpress to do something new. Two big changes to the standard combination are the custom comments module and an alteration to how the content is found, allowing categories to be used in a similar fashion to the sections list
Anyway, where was I… The comments module is a custom module inserted into the CMS, hopefully I will get round to tidying it up and convert it into a plugin to make future use nice and easy.
That is one of the great features of php-wax, the fact you can run one simple command and do lots of great things. This ranges from installing plugins to deploying the website onto a live server. Anyway, thats enough talk about the technology of the site and time to move onto its purpose
As with every web developer I’m only as good as my last site, so I’ll be adding a portfolio section to showcase what I’ve been working on along with the usual sport and hobbies.