Prototype Mode
If you’re a developer you’ve probably fallen prey at some point. You start on a new project and it flies together faster than you can say “good coding practice”. Do you keep running while the idea is fresh? Do you stop and make your code maintainable? I usually keep running.
I just finished a large update to one of my apps. It’s only 8000 lines of code, but quick coding and late night enthusiasm had compressed it into a few poorly thought out classes. Adding features was criminal. When I decided to streamline the UI, I started with a clean project and brought code over. Sometimes the only way to clean house is to move.
Prototype mode is a sweet place to be. My favourite features are born here. I can’t rid myself of it, but I have come up with a few strategies to help mitigate the damage.
Be Inspired Somewhere Else
I prototype in Interface Builder, sprinkling code as needed. If I add to my current project I take shortcuts to see results quicker. Building in another project means that I’ll integrate it later. By that time, I’m ready to listen to the better angels of my nature.
Use Plugins When Applicable
When I started writing Locations Pro I decided to make every action it’s own plugin. Using bundles forced me to think my API through, giving each bundle a common structure. It also kept my code isolated in smaller blocks which were less daunting to clean up.
Get Rolling With Cleanup
My biggest problem with getting started in the morning is the part where I actually get started. If I don’t slip right into it I find my day devolves into staring at an empty NetNewsWire. Starting with little cleanup tasks gets me rolling. The side effect is better code.