My biggest challenge as an intermediate-level programmer is almost poetic, is desperately tense and is more and more obvious the further I develop in the field. I’ve reached the point where walking through code is almost second nature. No more cold sweats at what looks like a magical jump in logic, or raised blood pressure at the sight of yet another third-party API, or reinforcing the fetal-shaped imprint on my bed when a bug defies all attempts to understand it.
At this point it’s not about solving problems. It’s about efficiency. My latest piece of work was relatively meaty, with sizeable problems that needed carefully considered solutions. It also took me a week longer to solve than I would have liked, so I decided to analyze my performance and draw lessons from the experience. Here’s what I observed:
Lesson No. 1: Problems in isolation are easier to solve
Background:
The web app I’m developing this summer needed to be refactored to work with a brand new authentication server, using a completely different authentication protocol. The codebase itself is messy, test-free and highly coupled. A complete refactor (my definite preference) was out of the question since there’s simply too much real work to do to worry about technical debt.
And so I fell into my first trap. My attention was torn between implementing the new authentication protocol, and not breaking the mess of a codebase in the process. Jumping back and forth between these two goals left me confused about the causes of my errors, and mentally exhausted from the task switching.
Solution: Next time, separate the problems, solving the most basic first
- Identify which parts of the problem are easiest to isolate
- Solve those problems in isolation, even if it’s contrived
- Use perfected solutions of simple problems as a basis for the more complicated ones
Benefits:
- Attention isn’t split between different domains
- Problems don’t “cross pollinate”, confusing the source of an issue
- Saves time
Lesson No. 2: If you have to really know a new technology, slow down and build it out as you learn it
Background:
Oauth2 is pretty cool, and I know that now. Learning it could have gone a little faster, if I used more haste and less rush. Relying on my instinct by skipping over learning fundamental terms and concepts led me down the wrong path. I struggled to find a good example implementation, so I tried to cobble together the concepts enough to empower me to implement it all at once. Not a good idea!
Solution: Make an effort to learn terms and concepts without losing patience, implementing something as soon as possible
- Small confusions snowball as the pieces come together, so be thorough in research
- Find or create examples that further or test your understanding of the piece you don’t understand
- Solidify the learning by implementing something that works as soon as possible, even if it’s incomplete or contrived.
Benefits:
- Would cut down the amount of “back and forth” referencing of material since you’re more familiar with the ideas
- Surfaces misunderstandings through broken implementations, helping to solidify the trouble parts faster
To the future
In his book Talent Is Overrated: What Really Separates World-Class Performers from Everybody Else, Geoff Colvin points out that masters of their craft approach every task in predictable way.
First, they have specific goals aimed at besting their previous efforts as they go into a task. Second, they check in with those goals as they perform the task, making sure they’re staying focused on improvement. Finally, they reflect on the experience to build the goals for their next attempt. Adopting this was my motivation for this post, and seemed like the best response to my disappointment over my performance.
To success!