Archive by Author

New site – devbytes

If you used to like the more tutorial based posts on slightlymore then this website might be for you. I will be posting snippets of code which will be highly tagged to try to create a personal delicious-esque code library. This is taken from the (quickly and badly written!) about page (or go straight to devbytes now!):

Welcome to devbytes. I want to build up a personal collection of useful code snippets, programming sayings, paradigms and ‘gotcha!’ moments (like when you first understand the JavaScript closure) for future reference. A bit like an ever evolving personal textbook, library, reference and cook-book.

I decided to put it into blog format because I know how useful it is to stumble across that page which has the solution to my problem on it. Now I’m not imagining for a moment that this will be anywhere near as good as many of the resources out there – but if it helps one person solve one problem then being a public blog rather than a private notebook then it’s all worth it.

Plus, at the end of the day, a blog is far more searchable than paper ;) For this reason, I intend to over-tag each of the posts too (it helps me search through delicious because I super-tag everything on there) but keep the categories relatively tight to separate the posts into things such as thoughts, design patterns, programming philosophy and other distinct types. But I guess I’m not really doing anything groundbreaking there, am I? It’s just that I use the categories in such a ridiculous way in all of my other blogs!

Anyway, I believe that I’ve waffled enough for now – I present to you devbytes.

As mentioned – this is designed as a personal reference – but if you find it useful or interesting too – then all the better! Naturally, it has a twitter account which will auto post when a new byte is posted (@devbytes) or you could subscribe to the RSS feed if that’s more your cup of tea.

Go to devbytes →

The place that’s halfway between blogging and microblogging

Imagine, if you will, a strange and wonderful place where the world is made up of postings and status updates that are longer than 140 characters yet shorter than a blog post. Imagine that this place was easy to get to, required no sign up and just worked. Easy. Believing that this exists must mean that I’m slowly turning insane, drunk, dreaming, or very, very high. Or I may have finally given in to the brilliance that is Posterous.

There’s so much cool stuff that happens that you just forget about – the classic one liner that you say and know will never be penned, the priceless photo of your aunt falling off her chair or the genius idea that you had while half asleep last night and can’t remember any more. Twitter isn’t enough to save these items to — plus it’s too volatile; a tweet will be alive for days (if it’s lucky). On the other hand, a blog post just seems a bit too formal (for me at least). Which is why Posterous is rather good. Just send it an email, and it will get added to your ’site’.

You can see and follow the crap that falls out of my head that’s too long for Twitter and too short for slightlymore at http://iblamefish.posterous.com/; or, if you’re feeling lazy and want a save a few keystrokes, iblamefish.com will take you there too :)

Why I won’t be buying the Rage Against The Machine single before Christmas

Christmas number one used to be a special thing. Artists saved up their best and released it at Christmas for the ultimate prize. Songs released at Christmas used to be about Christmas. Rage against the machine just don’t get this. Their heavy music doesn’t encapsulate the spirit of Christmas — and that’s one of the reasons they’re such a great band; they’re in it for the music, not novelty.

Christmas number one is not suited to a rock band like Rage Against The Machine. That is why I’ll be holding out until December 28th to buy my copy.

And buying a copy of the most Christmassy song out next week.

Why this post has a cheesy image in it


I’ve just installed a WordPress plugin called Freebie images which adds in a new panel to the post editing page. It lets you search for free images which you can use on your posts – all you have to do is search for a keyword, then click on the picture you want to use. It’s really quite good.

But unfortunately, most of the images are American cheese with handshakes, people in meetings, and people with grins so massive that you fear that their face might fall off. Which is why I choose the picture for this post.

Redesigning slightlymore and a fun side project

My close friends will know two facts about me (probably more, too): I work a lot and I love roller coasters. I’ve already confessed to the near death of slightlymore in its current incarnation (more on this in a sec!) and after getting back from a holiday to Spain to a theme park, I have decided to write a book to give me something to do in the evenings instead of work.

I have been into roller coasters for as long as I can remember. In fact, one of my first memories is asking if I can go on a massive looming structure which I later worked out was a roller coaster. I’ve always wanted to write a book. So what better way to improve my writing skills, write a book and create something physical which I can say I designed than to write a book about roller coasters? Happily, there is a web site – BobBooks – which produces quality books of your design. So I’ve decided to create a roller coaster annual of 2009 (and hopefully follow it up each year with another – how cool would that be?!)

Which (via a bit of a tangent) brings me on to the redesign and rethink of slightlymore. Up until now, it has always been a kind of portfolio, tutorials and, well, impersonal. It’s my web site, so why not make it an online representation of me. That makes sense. As mentioned in my previous post I want a place where I can write whatever I want to write, not just write about web development. Why do I need a site which shows off my knowledge as a developer and not who I am as a person – it’s not like I’m looking for a job!

The new design is coming along quite nicely, and I should have it done by the end of the week. It will be a lot simpler than slightlymore currently, and it will be a lot more playful, which I think will encourage me to post more frequently. Under the hood, I am going to play around with just how little presentation I can get from virtually no markup. No unnecessary divs here or classes there. It’s going to really shine on the bleeding edge browsers yet still render nicely in older ones.

I have some really bad TV to watch now, so tata for now ;)

slightlymore is dead – long live slightlymore!

So it appears that my blogging activity at slightlymore has slowly but very surely ground to a halt. This wasn’t intentional – I set up the site with very specific goals; to own a website which was a great resource for developers with some great tutorials on it. I just don’t have the time to write that kind of content.

I’ve thought about the purpose of the site quite a few times, and remedied the lack of posting problem by introducing new sections. But that’s not the way to save a site. It might seem like it, but it’s not. The only thing that will create is a monster of a site with no purpose which is confusing to everyone except me. What I really need to do is start again, redefine what I want the site to do for me, and build it up from there.

I have decided to make the site much less faceless and much more personal. I want to write posts about what I think, not only what I do on a day to day basis. This way, I’ll be more willing to post whatever I want instead of being constrained by the rather tight requisite of a post being useful to the developer community. Essentially what I’m saying is that I’m going to stop taking the site so seriously (in the sense of making it look like a well-respected professional resource and all that nonsense), have a bit of fun and give the site a personality more in-keeping with my own.

The good news

If you’re one of the people who comes here for development tips and tricks, I’ll still be writing them every now and again. That’s the beauty of the new ‘mission statement’, if you will. I’m redefining slightlymore as a place for me to write about things I want to write about in a way that I want to write about them and to the length which I want to write to. That means that in the long run, I will be writing more stuff. And more interesting stuff too.

Also…

Everything which has currently been written will remain here clearly labled as archived. So if you have a particular article which you find useful and refer to, you’ll still be able to get to it and use it.

You won’t see much posting over the next month or so (not much change there, eh?!) as I’m having a bit of a redesign to accommodate the new structure of the site. But rest assured, if you’re an RSS subscriber or follow me on twitter you’ll be the first to know when the new site is ready and live!

Shameless pluggery

In the mean time, if you’re looking for something to read, why not try out OxfordBloggers or Diary of Things? Go on… you know you want to ;)

Google Chrome Frame. Saviour of the internet?

It’s a brilliant idea – and it’s simple to get working. Add this line of code into the head of your code…

<meta equiv="X-UA-Compatible" content="chrome=1">

…and Internet Explorer will render the page as if it were being viewed in Google’s Chrome.

Why it won’t fix the internet

  1. It’s a plugin which needs to be installed on the user’s computer. If they don’t want to/can’t upgrade their browser, why/how would they install a plugin
  2. It will only ‘turn on’ when the website author has put the meta tag in their code
  3. It might give the impression of a ‘broken internet’ when people view a website in one location with IE6 and Frame, then go home to view the site in their vanilla IE6 and the site being slow, not working and looking different

Having said that, I’m all for it, and I think that I might start using the tag; if people actively want a better internet but are stuck with IE, give them what they’re asking for – it’s the polite thing to do.

Diary of things

I’ll just tell you – you probably already know anyway. I’m a lazy blogger. I don’t seem to have time to write as many articles as I’d like for slightlymore. I know what the problem is – I don’t write enough because I have this strange inability to put small or waffley articles on it – I’d rather that it stayed as a blog devoted to development and internet related things.

I present you with my diary of things which I intend to use as an outlet for the frustrated writer in me who wants to write short snippets about cool stuff. That’s not the aim of the site, however. The aim of the site is for me to write about ‘that interesting thing’ which I found. I am planning on writing something every day (wish me luck on that!) but because it’s really only a microblog I hope that it will happen. And I reckon that a happy side effect of all of this will be that in the end I find it easier to write here because I will have already expunged the crap from my head :)

I’m not really sure what content will be going on to the site – I don’t even know what will be going on it tomorrow until I find it. All I can tell you is that if you’re a little bit nerdy, like me, then a lot of the content should be quite interesting and relevant. Be sure to follow @diaryofthings on Twitter to see when something new has been posted.

Or subscribe to the RSS feed if that is more of your cup of tea.

oxfordbloggers.com

It was around 9 or 10 in the evening in the Jam Factory. After a very successful Ox Tuttle, Ben Walker (@ihatemornings), Colin Mercer (@colinmercer) and myself came up with one of those genius drunken ideas. oxfordbloggers.com is it.

The aim is simple – to create a place to collect the thoughts and ramblings of Oxfordonians to give an idea of the general flavour of the local part of the blogosphere (man, I hate that word!)

The rules are also very simple. Live in Oxford? Have a blog? Want to be part of a relatively active nerd/geek/blogging community? Answer yes to those and you’re fully qualified to get your blog put on there too :) A rough outline/overviewy kind-of-thing reads something similar to this:

  • We’re not going to put advertising on the site, or make money in any way.
  • All content is fully attributed to the blog authors.
  • All links go directly back to the original blogs.
  • We’re not enabling comments – if you want to comment, go to the blog.
  • We’re only doing this to get some more people to read blogs that we think deserve it.

Taken from the about page of oxfordbloggers.com

It’s still early days (less than 24 hours from conception to go-live) so excuse us if you manage to break something or you get a splinter from a badly sanded edge.

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.