The Pomodoro debugging technique
When debugging, it is easy enough to get lost down a rabbit hole whilst trying to pinpoint the cause, and especially so on a new platform like Magento 2. When everything is a learning curve, how can you stop yourself from falling down like Alice?
Our Technical Director, Tony Brown, has been adopting a new style of working, and a way to manage his debugging workflow; he presented the following as part of his recent presentation at Mage Titans Italia.
Tony recommends taking a step back from the code during the debugging cycle to reduce the time you spend on debugging in general. He has been using the Pomodoro technique (as chance would have it, an Italian word) which involves setting up a time frame, of usually 25 minutes. Developed by Francesco Cirillo in the 1980s, the method is based on the idea that frequent breaks can improve mental agility. During problems with debugging Tony sets the timer and at the end of each 25 minutes he takes a step back and re-analyses exactly where he has got to; and whether or not he is going in the right direction.
Breaking your time up like this ensures that you don’t pass two hours without taking a breather; sometimes your judgement and action can be clouded by endless research and code review, when the trees blend into the forest. The regular breaks also assist with keeping your attention and awareness fresh and active.
Take a moment to reflect and review. If you have gone in the wrong direction it is only 25 minutes (or less) that has been spent and it may have been worthwhile for an accompanying issue. Be wary not to meander from the issue at hand, stick to one goal at a time. If required and sure that you are on the right path to conclusion, a break can be skipped in favour of staying ‘in the flow’.
You can use the old fashioned kitchen timer, or you can download one of many apps available online, which might be a little kinder to your colleague’s ears. I have been experimenting with Pomodoro Time (as I am a fan of the to-do list), whereas Tony himself uses the Tomighty application. Best of luck staying on-track.
Want to catch up on Mage Titans Italia? View Tony’s talk from the day here.