All posts in Web Development

Screenshots of an iPhone showing the broken background and the working background
Updated: 22nd Feb 2010
I experienced a slightly odd bug in the latest version of mobile Safari on iPhone where it was shrinking large background images applied via CSS to fit within the confines of the screen. Not finding anyone else who has written about this problem I thought I’d share my findings.

Firstly a bit of background, the company I am working for at the moment recently released a real-time CSS editor (of sorts) which I built that allows customers to style their sites using nothing more than uploaded images and some UI controls – for more details on that you can see a video of it in action on this blog post and some of the amazing results that customers have been able to achieve with it.

Yesterday one customer reported an issue where a large background image (1800×2520) was being shrunk on the iPhone. I did quite a lot of investigation and to cut a long-ish story short I discovered that there is a tipping point where the total pixel-area of an image causes mobile Safari to resize the image. This tipping point appears to be at 2,000,001 pixels.

Read on for a bit more of a breakdown of my experiment results.
Continue reading this entry »

No IE for You!
The title of this post was going to be:

If Microsoft Insist On Making It Nigh-on Impossible For Us To Test IE Effectively Then Why Do They Think We Should Bother Supporting It?

But I decided that was a bit too long, so I took inspiration from the soup kitchen chef instead, it’s more to the point.

Anyway the reason I’m back writing about adventures in IE testing land is I have a week of some horrid IE browser testing of my current, JavaScript heavy, project coming up if the first quick check through all versions of IE is anything to go by. Yes I know I should have been testing as I went along, but having to refresh 9 browsers with every change really kills my buzz (especially when 3 of those are IE).

So I did some initial browser testing last week and got zero issues in 6 browsers, but each version of IE threw up massive amounts of JavaScript errors — absolutely all over the place — and we all know how annoying debugging JS is in IE. This combined with my aging (and decidedly creaky) Windows XP Virtual Machine (running in Parallels on a Mac Pro with more than enough grunt to run multiple VM’s all at once) meant that tonight I decided to look for new alternatives (as multiple versions of IE on a single VM have never been great anyway).
Continue reading this entry »

It’s been a long time since I released an update to the JavaScript Image Cropper UI (for reference v1.2.0 was released on 30th Oct 2006!).

However it is still going strong and a couple of things prompted me to release this update to bring it to v1.2.1.

The first thing was Tom Hirashima (sorry Tom, wasn’t sure if you have a site you want me to link to) sent me an email last week with an update to the code to allow it to work with the latest versions of Prototype & script.aculo.us out of the box (1.6.1.0 & 1.8.2 respectively). Although the last time I tried the cropper with the latest versions of them both it worked fine, you just had to change the bundles that script.aculo.us included, Tom has made some further changes. This is a good thing as for the past couple of years I’ve pretty much been out of the prototype & script.aculo.us loop having moved to MooTools and now jQuery (which I hated at first, but that’s another story).

The second thing was that the cropper was mentioned (and my how old does this site design look to me now) in the latest (and as usual excellent) Railscast, Cropping Images.

As a part of integrating Tom’s changes I decided to tackle a load of bugs from the bug list to try and reduce the list so I can keep on top of it better going forward (a long list of open bugs is never conducive to getting any of them fixed).
Continue reading this entry »

Just a very quick post to let you all know that my community-driven music recommendation site Where to Start With has just left private beta. Not only that but we have launched what we think is a killer new feature, there is a lot more detail (and a screencast) in the blog post over at our Where to Start With blog.


Screenshot of the Where To Start With homepage
I’d like to introduce to you my brand new site Where to Start With, which I have been working on in my spare time for a while (more on this in future posts).

The elevator pitch for Where to Start With goes like this:

Where to Start With helps you when you’re trying out new bands and artists by providing community-powered recommendations written by die hard fans.

If that new band you want to try has 10 CD’s out, then Where to Start With will give you… well, where to start with them!

The whole idea behind this site came from a need me and my friend found ourselves having; many times we would hear a song or read about a band that sounded interesting but then when we did go to try that band we would find they had a handful of releases out already. Where is the best place to start with them? Traditionally unless you got a specific recommendation for an album you would just try the lucky dip approach and hope you found a winner. If you got lucky you might have just found your new favourite band, however if you picked a rotten egg you may dismiss your potential new favourite band based on your opinion of one of their poorer releases.
Continue reading this entry »

I’ve just come across this post on dead simple task scheduling in Rails by the guys at intridea. It looks like a really nifty way to setup scheduled tasks in your Rails app, previously I had my tasks in rake files which I would then hit with cron.

While that is working perfectly adequately for my current setup it does have one downside, when I setup a new server I will have to setup the crontab file too. With this method when I deploy my app my scheduled tasks would get deployed and be running out of the box. Nice.

For the past 10 minutes or so every search I have performed on Google (.co.uk) has brought up the “This site may harm your computer” warning page on almost every result (except for Google owned sites, like YouTube). Just take a look at this search for the term “Something”:

A screenshot of Google search results

I also tried on different browsers and get the same issues – is anyone else getting this? Either way it’s a little disconcerting that a bug like this can find its way into Google, but also in its own way a little reassuring that everyone has bugs.

Update: Yep it appears to be everywhere, this TechCrunch story covers it.

Update: The BBC have a bit more detail, seems an import of data from Stopbadware.org flagged everything as dangerous – do you think someone updated the query recently and missed out the WHERE id = [id] part, I know I’ve done that on in dev more than once. :)

At one of my previous jobs we had a massive amount of CSS to handle; we had the global styles, then section/page specific styles and on top of both of those we had different styles for various versions of the application (as the same application and content ran many sites).

The solution we came up with was not too dissimilar to the one discussed in this months A List Apart article Progressive Enhancement with CSS and that article is well worth a read. But I also thought I’d write a little about the setup that we came up with and how it worked out for us.
Continue reading this entry »

Pleasefixtheiphone.com screenshot
I just came across this great site via Techcrunch called "Please fix the iPhone". It’s basically a list of issues which people are having with the iPhone and allows you to vote on ones you’d like to have fixed.

It’s quite a nice idea and really well executed. What I really liked is the fact that they’ve obviously spent a little time designing this thing (both from a UI and functionality point of view). It’s really quite refreshing to see something like this appear in an era when most simple ideas I see like this end up running on a blog or a wiki platform.

So if you’ve got an iPhone head over there and vote, if you haven’t head over and take a look at the design.

I was asked a question a while back over IM. The question and my subsequent answer made me think about my coding style, decision making process and evolution over the years and I decided that I would share those thoughts with you (aren’t you lucky).
Continue reading this entry »