Problem solving technique #1: Taking a mental break

Developers are modern day artists whose masterpieces are not hung on walls but stretched out thin on web servers all over the world, yes that is very poetic, but I really try to look at developers as artists and puzzle solvers. To become better developers your skill-set must include creativity and problem solving skills and of course a artistic touch.

Writing a piece of code is an ever evolving process and never ending, its a puzzle. Let’s think of it in modern terms, writing a code is like solving a level in Angry Birds, your primary objective is to get it done and working, i.e. solve the level and go on. But it does not stop there, you often do not get it perfect on the first try, so you need to go back and do more work on it, make it perform better, use less memory, its like going back to that level in Angry Birds and trying to get a 3 star rating.

Somewhere along this process you will run into every artist’s greatest fear, the mental block. Once you hit a problem you often get to a point that you have so exhaustively thought of why and how to solve it that it simply becomes impossible to find a solution while still looking at that code. This is where the “mental breaks” come in. A different activity, to most its the simple act of going to get coffee or water, taking a stroll outside in the fresh air, some like sports, some like games.. everyone has their escape valve.

I once worked with a good friend and an incredible developer and problem solver, he went simply by the name of “Chester”. It was really interesting to see how he worked a problem mentally and I had some of my best whiteboard coloring brain jamming sessions discussing architecture with him, but his block solving strategy was even cooler. Whenever he got stuck and brain crunching failed to find the solution he simply stopped and picked up a bucket of lego blocks. He sat there building whatever came to his mind until he came to that Eureka moment and the solution came up.

This strategy is something I see more and more in various development companies, like Google, Microsoft and so many others. The colorful rooms with beanbags, video games, or just plain outdoor places, little parks, sport courts and toys. Nerf guns, lego, desktop catapults, iPads with games these are just some of the examples that are out there. All of these have the same purpose as that bucket of building blocks my friend used, get your conscious mind off the problem and let your subconscious take a whack at it.

While this may not work for everyone or they may not be responsible enough to handle it, I believe advanced and competent developers are a perfect match for this, why? Firstly, the developer needs to be mature and responsible, otherwise all of the above are distractions from work, not breaks to solve problems. This is very crucial, if your developer is working to have a break and not taking a break to be able to work more, you have a team with low productivity or even worse with crappy code quality. Their minds are not in it, the code is now an obstacle in their way of the “free time”. Be careful to understand your team and select the right distraction, maybe lego’s will be productive and video games disruptive, or maybe its the other way around, there is no recipe, its all about knowing who works with you.

I truly believe in this process and have had some of the best professional years of my life in companies that understand the importance of this break and the flexibility of time in the office, right now we have a Lego NXT and an iPad and they work great for me whenever I hit a wall in my code. Does it work for you? Is your company in on this? Leave your comments.

One thought on “Problem solving technique #1: Taking a mental break

  1. In my case, the 'mental break' is quite often just "Going and checking my personal email" or "Browsing Amazon for those few supplies I need" …

    Though honestly, the BEST mental break for me, is one that is often harder for an employer to understand/allow. It's getting up, leaving the computer, and going and doing some mundane tasks. Grocery shopping, picking up supplies for some home project I was working on, buying new clothes for my kid, etc.

    Getting out and doing these tasks, not only gives me 'solitude' (as in, away from 'work concerns'), and therefore lets my mind wander around on the problems. But, it serves another purpose as well. Chances are, if my mind is currently obsessed with: "Oh yeah, I gotta get groceries today", then it's NOT focusing on work. So going ahead and doing that, is a double-win. Not only do I get the mental solitude to have solutions present themselves to me. But as soon as I start on the grocery trip, my mind immediately erases that, and let's other things shine through.

    Unfortunately, it's not something that many office environments (even remote-work ones as I've been in recently) is supportive of. They want you in that office from 9am to 5pm (or whatever hours it is). Even when working remotely, often there is an implicit understanding that you will be online, connected, for a set core 8 hours. And disappearing for 2 hours in the middle of that because you needed a mental break, and to take care of some other stuff at the same time….

    Even if it makes you MORE productive. Ends up getting you negative statements.


    • Yes, unfortunately very few companies are able to properly understand communication/presence and how to measure that in a remote gig. Being Geek has a very nice chapter about communication in remote jobs.

      For me that break needs to involve getting of the computer most often, looking at twitter, email etc.. is almost second nature already to me.

      thanks for the reply

  2. Heh, thanks for the kind mention! I also miss the whiteboard brawl at the coffee/gaming lounge :-) Anyway, I kept the Legos (and Fafa, the rubber chicken) around! But I would try pretty much anything that allows you to get out of the mental dead ends – as long as it does not completely drive you away (I'd never solve Sudoku puzzles or play Go, for example, in such a situation)

    • Yes, i agree there are breaks and breaks.. sometime you need a complete brain reboot, then you need things that drive you away, but for solving a issue at hand you need to stay in a certain "zone"

      Thanks for the reply

  3. My 'mental break' happens when I leave the computer and completely forget about what I was doing. Go get coffee… take a walk outside… anything but being in front the computer.
    I lost count on how many times I was stuck for minutes trying to calve a solution and when I go to get coffee the solution comes up…

    You know what… thinking more about it, I think the coffee maker is just smarter than I.

    • Yeah .. one day we are all going to stop hiring devs and start hiring the water coolers and coffee machines that do the real work.

      Definitively the walking and getting coffee is a great way to solve problems. Thanks!

  4. It took me a year or so to convince my boss that the best work I do is not on the computer; I simply put the insights I already had on file. Now he doesn't care where or when I work, just that I get the job done when it needs to be.

    I make two attempts at any given problem. If no solution is found I just let it be. The longest time has been about two weeks and then it was solved overnight. The hardest part is trusting your subconscious to solve it.

    • That's quite an achievement, its easier when management was once developer so he understands this scenario, usually they just believe its "bs".

      Yeah, even I would be anxious with my subconscious if it took it 2 weeks to solve the problem, but eventually it always come through for us.

  5. Fly fishing is the solution for me. Just like you said, … Sometimes the brain doesn't work and I need a fly fishing session to "fix" it. After few days I can solve almost any problem…

Comments are closed.