- Upgrading the Firmware on a Tulip
- Learning Code Through the Advent of Code Challenge
- Common Loki Misconfigurations
- Iterating Through a List in Ink
- Debugging Misconfigured Container Networks
- Minimum Viable EC2 in Terraform
- Storylets in Ink
- Interactive Fiction Tooling Overview
- In-Place Resizing for Digitalocean Droplets
- Unity Demonstrates the Importance of FOSS
- Target Labels in Prometheus
- My View of AI is the Same
- Verify DNS Ownership with TXT Records
- Sane Droplet Defaults
- Editing Made Easy with Vim
- Gatsby Gotchas
- Concatinating Default AWS Tags in Terraform
- Easily Updating the Default Github Branch
- Lifetimes in Rust
- Checking for Bad Links
- Maybe TypeScript and React is Bad
- Static Asset Management in React
- Bundler Down Time
- Using React Context for Localization
- JS Implementation of a Sticky Footer
- Custom Aliases
- Trying Out the 7drl Challenge
- Trash Opinions
- Building Your First Program in Rust
- Fixing mongod reports errors related to opening a socket
- Improving Open Source Maintenance
- Technical Interviewing Tips
- Housekeeping Note
- Dynamic Programming Basics
- The Oddity of Naming Conventions in Programming Languages
- An Experiment Using Machine Learning, Part 3
- Debugging with grep
- An Experiment Using Machine Learning, Part 2
- An Experiment Using Machine Learning, Part 1
- The Value of while
- National Day of Civic Hacking
- OpenAI and the Future of Humanity
- Creating a Whiteboard App in Django
- Creating Meaningful, Organized Information
- Towards A Critique of Social Media Feeds
- Setting up Routes in Django
- Developing a Messaging Component for Code for SF
- Dream Stream 2.0
- Keyed Collections in Javascript: Maps and Sets
- Blog Soft Relaunch
- Scraping with Puppeteer
- Looking Ahead to Dream Stream 2.0
- Solving West of Loathing's Soupstock Lode Puzzle
- Installing Ubuntu
- Interview with David Jickling Evaluation
- Compare Text Evaluation
- Dream Stream Evaluation
Learning Code Through the Advent of Code Challenge
Unless a programming language is so fundamentally different from what you already know, nothing is as hard as learning your first language. However even when so many of the concepts are transferrable to another language, it can still be tricky to stick with the new language if you aren’t forced to use it professionally. Certainly that was my experience when I started dabbling in Go. There wasn’t anything about Go that was totally unfamiliar from other languages I had learned. But because I wasn’t using it daily, I’d forget various details about how it worked, and this would end up creating various points of friction as I tried to remember how to do basic things like perform various string operations, or how the different aggregate and reference types worked. Before I knew it, I would be back to writing things in Python or Rust.
This year I’m trying a different approach, and working on Advent of Code puzzles in Go to see if the language becomes more sticky by the end of it. This is not a novel idea of mine or anything, I’ve seen plenty of people pick up a new language this way, but since I’m trying it now I’m blogging about it :-P
Advent of Code has a couple of nice features that make it attractive as a method for learning a new language:
- It’s a daily exercise. Much like learning a human language, you benefit from spending a small amount of time every day working in a programming language, rather than spending a large chunk of time but only once a week.
- Puzzles will require you to engage with different aspects of a language. Working on a toy project you might only utilize a small slice of what a language is capable of (that was certainly my experience with doing a project in Rust). Solving difficult puzzles on the other hand will incentivize you to pick up more features of a language to solve hard problems.
- No matter what are the particular features of a puzzle, there are certain baseline features that you will need to know how to do to solve them. For example, they all involve a raw input file that you will most likely save on your computer as an input.txt file. That means you will need to know how to open and read files in your language, you’ll also likely need to perform operations like converting strings to numbers, breaking strings into various substrings, parse unicode, utilize some of the std lib, and do some basic error handling. This is all good stuff.
- The puzzles are divided into two parts, with the second part built off of the first part, but complicating it in some way. This encourages you to write your code in a way where everything is easy to reuse or discard. e.g. lots of small, composable functions. It’s always satisfying when you’ve structured your code in a way where to solve the 2nd part all that is needed is maybe a few tiny adjustments and maybe an additional function.
For now I’m working through some of last year’s problems until it starts up this year. Historically I haven’t finished the full month of challenges. They usually get to a certain level of complexity where I find it hard to justify the time to complete them towards the end of the month. Regardless of how far I get though, I hope by the end of this month I’ll have marinaded enough in Go that it sticks with it, and becomes another language in my toolbelt.