Kill Tree, Save Code!

We at Wildbit are very passionate about our code. That’s why we always do refactoring: making our code faster, more efficient, and prettier. I want to share a little tip that make it a bit easier and a lot more fun.

Refactoring of course is not an easy task, and often you need to get a bird’s eye overview of the system before starting to improve it. You should see all classes, methods, modules, how they are structured and interact with each other. In an ideal world you would use a gigantic display for that task that would allow you to see all the stuff simultaneously without scrolling. This would make reviewing big chunks of code much easier. But unfortunately we don’t have such displays yet. Even 30" is not enough for this task. So why not use the space of your desk instead?

So, here is the simple trick. Try printing your code on paper and arrange the sheets on your desk in a way that all of them are visible at once. Now, when you can see all of your classes and methods, you can start re-arranging stuff. Use a red marker to move methods and strike out deprecated code. Don’t hesitate to write-down your comments on the sheets as well.

This method always works for me, hopefully it will help you too.


Our products