According to local VP of Engineering Ryan Clodfelter, consistently reading great code is a tried-and-true method for learning to write better code.
The developer, who works at church engagement technology platform Subsplash, recently taught himself Go by starting with the fundamentals, building up a community of support and simply going line by line through the standard library.
“That might sound boring to some,” Clodfelter said. “But for me, it was fascinating. I had a high degree of confidence that most of the code there was exemplary.”
Getting genuinely excited to learn a new skill, whether it’s programming or not, helps Clodfelter “prepare himself for the journey ahead.”
What does that journey entail, exactly?
Pushing the boundaries of his technical limits even further while helping his team scale.
What is the most recent programming language you learned, and how long did it take you to learn it?
Any good endeavor requires understanding the fundamentals.’’
What was the most impactful thing you did to learn this new language quickly, and why?
The personal framework I’ve developed for learning something new works can be summarized in three simple steps: get in the right mindset for learning, practice the fundamentals and find a good coach.
I tend to think of learning something new as an adventure; an exploration into uncharted waters. Preparing yourself mentally to learn something new is often the most significant contributing factor to the success of learning that thing. You need to get into a growth mindset. It’s OK if you “fail” or things don’t make sense right away. Keep trying and learn small parts of the bigger whole until it clicks. Understand why you wanted to learn it to begin with. And when the going gets tough, remind yourself of your “why.”
Any good endeavor requires understanding the fundamentals. Go has a wonderful online tutorial that exposes you to the fundamentals of the language, from syntax to what’s included in the standard library. It also covers more advanced topics like concurrency. This is a helpful primer, but practice makes perfect. After learning the fundamentals, I went one step further by implementing those algorithms and data structures to common problems. This exercise really helped cement my understanding.
Finally, having a good coach is one of the most effective ways to ensure that your learning sets in. In the case of a programming language, coaching can come in many forms. You can lean on a peer, an online course, YouTube videos, a meet-up group or a professional tutor.
When I first started learning Go, I watched way too many Rob Pike videos from Go conferences. I also went to the local Seattle Go meetup group regularly and joined the Gophers Slack channel. It was helpful to learn the philosophy behind Go to understand it at a deeper level from one of the creators of the language itself –– and then have a community to discuss the language with.
It’s Go Time
How do you continue to build upon your new programming skills once you’re proficient?
One of the best things you can do to write better code is to read great code. The approach I took early on in learning Go was just simply reading the code in the standard library. That might sound boring to some. But for me, it was fascinating. I had a high degree of confidence that most of the code in there was exemplary. I knew the more I exposed myself to exemplary code, the better I would get.
Additionally, having your code peer-reviewed by great developers will inevitably make you a better, more self-aware developer.