5 Tips I Use to Gain "Intense Focus" When I Code
Focus is the most important thing when you are coding. It allows you to achieve from end to end (idea > experimentation > measurement) little parts of your product efficiently. If you never manage to focus, you should not code.
By focused I mean :
- high achievements
As you’ll see, I’m not saying that I never read my emails or check my twitter. Just that by following and by compelling myself to the following tips, I manage to achieve features from end to end, tested, and deployed in less time than when I’m not in the following dispositions, for whatever reason.
- I am alone, or with someone never talking to me for at least 45 minutes.
- This is really important. If someone interrupts me before, I have to regain focus all over again. And this is also the most complicated part. In a small structure, where I code and decide what to code with my collegue, we have always something to share.
- I know exactly what I want to achieve
- I set the problem I want to solve, the solution/experimentation chosen, and how i’ll measure the success. This allow me to stay driven.
- I somehow know it will take me less than the day/2 days
- Somehow means : by experience, “because I broke it enough into small pieces”.
- I compartmentalise the problems and anticipated solutions for each part
- I Box each technical problem. Either by Stack Layer (async > fat models > controller > HTML/CSS/JS is the way I do it when using ror, xib > model > controller when using objective-c ) or any other way. It doesn’t matter. The important here is to take small problems one by one with the “big” picture in mind. Test Driven Development is insanely useful to achieve this.
- When I feel the rush, I pause. If I detect a rush twice in the same hour, I head back home.
- What I call the rush is when I’m starting to “tilt”. I’m speeding up, typing a lot of code, trying to “jump” from parts of the stack to another, trying to keep track of too many things in my mind “to remember” to change in the tests, well, breaking all the aforementioned rules =)
Hope this can help you. What are your tips to focus?