Atelier Clockwork

The Payoff

Sometimes Planning and Attention to Detail Pays Off

As I mentioned a long time ago I've been holding my code to a decent standard of quality, and trying to keep it clean. As I document, train my co-workers, and prepare other people for owning the code that I've written, a lot of those decisions are paying off.

One of the things that I feel most clever about are writing decent block based systems for common tasks, so that many of the common tasks are as easy as invoking one method and passing in the success and cancel blocks. Some of these flows include branching logic, like searching products by keyword, vendor, stock code, etc. in theory I could have used a delegate pattern, but the block pattern feels like it isolates scope better.

Another layer layer of indirection is that I forced myself to define enumerators or string constants for pretty much any "magic" values. Table cell identifiers, row indexes, notifications, etc. While it's not perfect, you can still break things changing table cell identifiers in interface builder for instance, it means I could give people a consistent structure of where to look for these values when working on an existing view.

The last thing that I'm really proud of is how every API call is routed through a single centralized management class, which gives a central point for debugging any issues with the API, and a single point to implement changes and improvements in the network stack.

There are a few big items on my cleanup wishlist that I don't see happening in the next 5 days, but the release version is stable, I have one feature to go, and it feels like I'm handing off a reasonably solid foundation for future growth.