Monday, September 18, 2006

Problem-solving in the shower

I've been working like a crazy person this week, which is why I haven't had a chance to update my blog for a few days. I reckon my job as a web developer is the best job in the world, and it suits me perfectly. It's a great mixture of creativity and cold hard logic, which I don't think you find in many careers.

Each website I build is a one-off, and each comes with its own challenges in terms of the build. A couple of years ago I started building sites in pure CSS instead of using tables for layout, and that's meant a whole new set of techniques (and bug fixes) to figure out.

The site I've been working on for the past couple of months is pretty darned complicated, and it's really stretched my brain at times. Lots of layout trickiness, which, as usual, has thrown up a whole bunch of bugs that have to be fixed and sometimes even hacked. Yeah Internet Explorer, I'm looking at you...

Honestly, I reckon that IE (in the three or four versions that we still build for) can add 50% longer to build times, because of the many ways in which it doesn't comply with CSS standards. There are so many ways in which it has to be forced to do the right thing, while making sure your fixes aren't breaking the site in any other browsers.

Lucky I love problem-solving eh? It's such a big part of my job that I don't think I'd get very far if I didn't like it. I use a mixture of logic, lateral thinking, my knowledge of the techniques and tricks, creative thinking, unending perseverence (because I never, ever give up) and a regular dose of inspiration.

I realised a long time ago that inspiration is most likely to strike when I'm not even thinking about it. Like when I'm sleeping, for example - or at least when I'm falling asleep or just waking up. That's the moment when I'll get the flash of an idea that will lead to a solution.

And I'm not alone in that, either. Recent research has shown that when subjects were asked to make a complex decision while being distracted by another task, they did much better than those subjects given time to think about the decision without distraction. Interesting! You can read more about it here: Trust your instincts.

Dijksterhuis [the researcher] points out that consciousness is good at following precise rules - arithmetic, solving anagrams, etc - but has only limited capacity for handling more complex problems. He proposes the "deliberation without attention" hypothesis, whereby complex problems are best solved by the parallel-computing capabilities of the unconscious mind.
...which I suppose is exactly what I'm doing when I have a cigarette break and watch the world go by, when I take a moment to make a fresh cup of coffee and peruse the paper while I'm at it, or when I simply stare into space and let my mind wander for a minute or two.

Here's an example - I was sitting on the bus this evening, gazing out of the window, thinking about nothing in particular, and it suddenly occurred to me that the layout problem I've got with Opera might just be solved if I try a width: 100% on an outer div, rather than the one I can't use 'cos it breaks in Firefox... We'll see tomorrow...

And as for problem-solving in the shower - well, that's just about the perfect place to sort out the toughest of layout problems - as long as you're not actually thinking about them, that is!

Think about it - you're still half asleep, you're concentrating on getting your bits clean rather than that fiendish float you've got waiting for you at work, it's a new day, the sun's shining through the window, and even though in some ways you'd (I'd) much rather just go back to bed, there's a new challenge waiting... (which, remember, you're not thinking about).

Get all those factors together, add the cats waiting for their breakfast and the stress of having got up late and ohbuggernowI'mgoingtobelateforworkagain and that's the moment when inspiration is bound to strike. It always does.

And if it doesn't strike today, there's always tomorrow...

Technorati tags: , , , , , , .


Johnny-johnny said...

I remember being told about the four B's of creativity - bed, bath, bus, and ...

I can't remember the fourth but these are the places where ideas happen and problems become solved... it's important to have pen and paper in each of those spots :)