Working Toward an Architecture Eureka!

I had a quiet meeting-free week, so I got back to working on my SwiftBoard project. Early in the week, I was making decent progress, but by mid-week my progress had stalled. Adding each subsequent feature was taking longer and longer, and the code was definitely getting smelly. I could tell that I’d reached the point in the project where the original architecture was no longer sufficient — it was time to refactor.

Sometimes this stage is a quick bump in the road. I can see quickly where I’ve gone wrong, or I find a parallel to another project I’ve worked on, and I’m good to go.

I haven’t been that lucky this time. I’m working in a new language (Swift), and I’m tackling more complex user interactions on iOS than I’ve tried before. It’s enough out of my comfort zone that my old bag of tricks doesn’t help me much. It feels like the coding equivalent of writer’s block… it would be a waste to keep slogging through new features in the existing architecture, but I don’t know what the new architecture should be yet.

When I’ve been stuck like this before, there wasn’t a linear path to solving the problem. I’ve tended to pull at the problem from all angles, then eventually the eureka moment strikes. I’m hopeful that will be the case again this time, so I’ve been jumping between research, quick throw-away code spikes, diagramming, and exercise. I feel like I’m closer to the solution, but I’m not quite there yet. Maybe a weekend off will be just the ticket?