Archive by Author

Web development is a sack of shit

There are some developers out there who feel like they need to know the answers to everything before they can get started on even thinking about starting a project. For the most part, they’re right – but there are times in development when you just don’t know. Is it important to know that there will be exactly 7 links on a page? I argue that (from a development point of view), the only thing you need to care about is that it’s more than one and less than ‘lots’.

Sack of shit?

A few days ago I was talking to a designer and we realised that in a lot of cases, it’s not really important to know the exact technical details of how it will be done, just that its shape is roughly X. As she quite nicely put it, they’re just sacks of shit (shit meaning stuff in this instance rather than bad) – and that in order to design, she just needs to know that it’s possible. She doesn’t care about, need to know or even have the ability to know whether the thing will get its content via XML or JSON – just that she can get the data. Should we be applying the same thinking to development? Or more specifically, do we need to quiz designers to death about the exactnesses of their widget when all they know is that it will grab something from a Twitter feed? I don’t think we do.

As another example, let’s think about building a site in (say,) WordPress which will let the user add images to their page in some place that’s not the content area (hence ruling out the option of placing the images using the page editor). All I need to know before building this is: Will it be one image or will there instances where there might be more than one? It doesn’t matter to me whether the more than one is two or thirteen, just that it’s more than one. This lets me decide which of the sacks of shit I can put the problem into; should I use a string or an array?

A big sack is made of smaller sacks.

When a project is starting, all you really know is that there are pages, and some of the pages might do something special. Some of these something specials might need to talk to each other somehow. All of those somethings are important to know, but the somehows are irrelevant; you just need to know the general shape of the things, not the exact details of what makes them tick. At this stage, you need to be thinking on a level similar to this:

  • Twitter feed
  • Calendar of events
  • Contact form
  • Gallery of images
  • etc, etc…
Refine

The general shape of the things helps you to then organise your big sack into a set of smaller sacks which live inside the big sack. A little later in the project, a time will come where you need to then open each of the smaller sacks and peer inside, investigate, have a play and see exactly what the bag contains – or sometimes just add some teeny-weeny bags into the small sacks. You might now be getting to the stage where you can think about breaking high level items down into implementation details:

  • Twitter
    • Grabbing the latest tweet
      • JSON?
      • XML?
      • Client side? (JS)
      • server side?
        • Cache the tweet? Database or file system?

If you want to go with the list analogy, each bulleted point is a sack. Each sub-bullet is a sub-sack. (It’s also easier to present to clients and bosses if you present it as a list rather than taking the metaphorical sacks to a meeting.)

Recycle

Don’t discard the larger sacks – you may no longer need them, but other people will. Does your client need to know that you’ll be caching their tweets on the file system or database and the ramifications of each? Or do they just need to know that you’ll be doing something clever to make the website faster, and that might mean that new tweets can take a few minutes to appear? The choice should be obvious – the bigger and more loosely defined sacks are for clients/designers, and the smaller bags are for developers – and should be completely invisible to everyone else. A designer simply doesn’t care that in order to have two you need to use an array; they just need to know that it’s possible. And it’s our role as developers to do our job, do our job well, and do the irrelevant technical wotsits without inundating the designer or client with irrelevant and boring details. When was the last time your mechanic took apart the gear box to explain what’s inside?

There are different kinds of sack

After a while, you’ll start to notice that some of these sacks start to have a similar smell. Some might not, and some might only have a faint whiff of their neighbours – but this is ok – knowing that one of the bags contains nothing similar to the others is just as, if not more, useful than knowing that two bags are the same.

Siamese sacks of shit

Often, you’ll find that some of these bags have a magical (and sometimes invisible) tie to each other – and finding a solution to one problem can accidentally solve another. One of the most important traits of a good developer is that he can see these loose connections – even though he doesn’t know the exact implementation details. The realisation that both Twitter and Flickr can provide data through the API in the same way should make you want to do the woohoo dance. Why? DRY, that’s why. Write it once, use it twice. Which brings me onto the next topic…

Long lost identical sacks of shit

You should build up an arsenal of sacks which you keep with you in your head at all times. Remember that Twitter and Flickr go into the same top-level sack – they’re the same, but don’t bore yourself with the nitty-gritty of each service. Remember the top level stuff, remember that the lower level bits exist, and then research/revise the techniques required for the really deep lower level technologies as and when you need them. At this stage, the sacks are the same.

Also remember the ways that the bags link. Remember that PHP has some library for dealing with XML. Remember that jQuery deals with XML really nicely. Remember that although these two technologies are in different sacks, there is a strong tie between them, but again, don’t get too detailed with the implementation.

Black bags of shit

Of course there are also bags which won’t fit into any of the sacks no matter how hard you try. Maybe the bag is bigger than the sack. Maybe the bag is square but the sack is round. Maybe even one day the bag will get upgraded to a sack (AJAX, anyone?). And that’s ok – sometimes things are totally unrelated to anything else you do and you just have to learn new things. But remember the sack and bag analogy – take out the contents of this black bag and cut it up until the peices fit into well defined sub-bags.

Back to reality

Apologies to the metaphorical wankery and no doubt disappointment of the content of this post – I just needed an attention grabbing title. There are too many developers out there who insist on telling everyone everything about what they’re doing in so much detail that most people don’t have any understanding of what they are being told. Too many projects are delayed or built in a rush badly because a developer must know every exact detail before he will begin. It’s not necessary. Granted, in some cases you will need to know everything, but leave that bit of the project until later – build the independent pieces while you are waiting for the requirements of the data-sensitive parts.

Learn to cook in your hotel room

Comedian George Egg gives us a lesson in how to cook an impressive looking meal in your hotel room.

Alan? Alan? Alan?! ALAN!

Drum and bass remixes of classic TV themes

Dad’s army

Antiques roadshow

Diagnosis murder

Oops! Building demolition fail!

What happens when building demolitions go wrong!

WebAIM: Screen reader survey results

Web accessiblity in mind (WebAIM) have published results of their screen reader survey. While reports are often boring, they are often very useful, and this is one of those reports. Screen reader use is often forgotten during the build of a website in the jungle of SEO and the like. The report graphs things like how people browse sites (i.e. whether headings are useful), how often they find skip links and how often other usability good-practices are encountered. Give it a read and improve your web build process.

Google to launch a new operating system

Google is developing an operating system (OS) for personal computers, in a direct challenge to market leader Microsoft and its Windows system.


BBC news – Google to launch operating system (8th July 2009)

I’m not entirely sure that this is a direct challenge to Windows 7 – but I do think that in the beginning, it will be a great OS for netbooks etc. I don’t see this being a replacement for my main OS any time soon; I will install it though, but I would imagine that would be for internet browsing and testing purposes only.

Two things that I can definitely be sure of is that a) it will be lightning fast, b) it will be more secure than the queen’s bedroom.

Defenders in tights

What?

The first advert that I’ve seen for Google’s browser, Chrome is entitled Defenders in Tights. Previously, we’ve seen little nudges suggesting that people might want to try a new browser at the top of YouTube, but they’re hardly convincing now are they.

While this video in my opinion will still only get the geeks – at least a bit of time, thought and money has gone into producing what I consider to be quite a cool ad. And heroes in tights are always entertaining.

Lights, camera, action!

Have I been thick?

Have there been previous ads for Chrome that I’ve missed out on? Is this a series of ads? What’s the best/worst ad that you’ve seen? Psst… feel free to slate the desperate Microsoft IE8 ads that are going around at the moment (Ten grand is buried here, the O.M.G.I.G.P. ad (which got pulled) or the Browser for the better campaign to guilt trip people into downloading it).

One final question

Will it go viral?

Announcement: New section on the site

If you’ve been keeping up with the posts on slightlymore, you might have guessed that there was a new section appearing on the site. It has now been born, and is called light relief. It’s intended to be a place where I can put the every day bits and pieces which I find and would like to post for the rest of the world to see. I didn’t feel that the belonged on the website before, and it was quite disappointing and annoying.

So roll on down and have a look. As mentioned in the previous announcement – I’ve set up an RSS feed specifically for this section, so if you find that you like what’s on there, please subscribe to have the entrails of my mind appear in your feed reader.

Announcement: RSS reshuffle! Are you subscribed to the correct feed?

I’m currently giving slightlymore a bit of a restructure and have decided to split up the feeds into more sensible chunks. I now offer four feeds for your pleasure:

  • Everything – this includes posts by me, external links, frequently googled questions and a new light relief section. If you subscribed to my feed before 20th June 2009, this will be the one you are subscribed to. The only difference you’ll notice is the new light relief section.
  • Just the blog posts – this pretty much does exactly what it says on the tin. It will provide only content which has been written by me.
  • Just the links – this will give you the links off to other websites which I often post. This feed will be very useful for sparks if you’ve got Shaun Inman’s new RSS reader – Fever.
  • Just the light relief – will provide you with only the content from the light relief section. This will include jokes, youtube clips, funny pictures and other entertaining thingies and wotsits.