Know When to Punt

December 17, 2015

Which I’m Not Good at

Sometimes I hit a problem which is significantly more effort than it looks to be at first glance. Sometimes it was underestimating difficulty, sometimes due to unexpected limitations with tools, sometimes paying back technical debt, or any number of other reasons.

Often it involves cursing my past self in some way.

One skill that I’m attempting to cultivate is figuring out if the underlying problem is part of the original task, or if it’s an unrelated bug or a bigger task that needs to be planned properly.

For example, I was working on a bug involving a table view not showing any content if the view was loaded too quickly after log in. After adding some notifications to the login process, I got the view to load data when the final data set from log in was pulled.

This then exposed a series of edge cases involving the reload spinner, the empty state for the table view, and a fetched results controller. I tried the easy fixes and got the view to a state that’s fully functional and doesn’t look awful as it reconciles the state involved, but it still has a visual hiccup I’m not fond of.

Making it work right is going to take a refactor of the view controller and some structural changes to the view hierarchy, which isn’t too large of a task but involves the potential to introduce new bugs to fix a visual defect in an edge case.

I was sorely tempted to just tear apart the bits of the view, do the refactor, and pull request it because it would fix the new problems that I had found.

Instead, I pull requested the fix that got the page into a decent shape with the fewest required changes to the code, and filed an issue in our project management system about the visual issues, and an outline of my proposed solution in the comments.

This then freed me up to stop thinking about the problem, and move onto the next high priority issue that needs to be addressed before the app can ship. It also gets the problem in front of the project manager to decide where it falls in priority order compared to the other features and bugs that need to be addressed.