- Most of the data sets are large, your algorithms and data structures matter. With modern computing, it can be easy to skip or not be worth the time to optimize code. But this doesn’t mean we shouldn’t practice it and the Advent of Code puzzles tend to put you into situations where it’s necessary to do so.
- The puzzle descriptions can be long and contain lots of details not necessary to solve the puzzle. Some folks don’t like this but I do. Raise your hand ✋ if you have been given a vaguely worded specification that you have to comb through to find the real requirements. Like it or not, some degree of detective 🕵️ work is part of a software developer’s job.
- Each day’s part 2 puzzle provides a twist on the part 1 puzzle. Sometimes its a small adjustment to solve part 2, but sometimes it’s a near rewrite. Though making a major change can be frustrating, this frequently happens for software applications whether it be the customer changing their mind or through the addition of new features.
I didn’t have much of an approach last year, but I did decide to do the following:
- Do all development directly on CodeSandbox using the NodeJS template. The idea here was to avoid setting up a local development environment, but still have an easy way to share my solutions.
Be more organized. Last year, I was careless by not using version control, sometimes I broke part 1 to solve part 2, and it was hard to make my code run different solutions. This year I’m not doing those things and my code can be found in the following GitHub repository:
Setup a local development environment but still upload it to CodeSandbox. I decided to build on last year’s NodeJS web application by adding ExpressJS and making it more visually appealing (thanks to NES.css). Check it running live on CodeSandbox below. It’s also easy to run locally.
- Don’t stress out about it. Last year, I put too much pressure on myself to solve each day’s puzzles as quickly as possible. This year I want to focus on creating good working solutions. If I get them done the same day they release, great. But if not, that’s okay, too. The creator of Advent of Code, Eric Wastl, recently gave good advice regarding this on Twitter:
Focus on learning; don’t worry about the leaderboard.
It’s okay to skip puzzles!
It’s okay to ask for help!
If you don’t know how to solve something, try breaking it into smaller parts. Repeat as necessary.
You’ve got this! 🌟
That pretty much wraps up how I’m approaching Advent of Code this year. Last year, I earned ⭐⭐ on 10 of the first 11 days (I completely skipped day 9). I hoping 🤞 to do about that well this year, but I’m not going to sweat it if I don’t.
Good luck and feel free to contact me if you need any hints or help.