advent of code 2018
By Per Fröjd
- soft
- advent of code
- learning
What is it?
Advent of Code is a project mimicking the idea of an advent calendar, but instead of providing chocolates, small programming puzzles are instead presented. Each day of December, up until the 25th, two new challenges appear.
The challenges are mostly input/output-based, which means that each challenge presents a set (or single) inputs, a problem, and instructions on how the answer should be presented, so that the system can verify it. This means that the actual problem-solving part of the challenge can be done in any way you prefer. Maybe you use this as an opportunity to hone your skills in your day-to-day language, or challenge yourself with a language you’re not familiar with.
Why should you do it?
The standard answer should be either because you a) enjoy the challenge or b) wish to improve your current skillset. I’m seeing a lot of usage for it because the challenges are typically the kind of challenges I don’t face in my day-to-day work, which requires me to look outside of my box.
Being a full-stack web developer, these kinds of problems only really appear when you get down to business logic, and most of the time these are fairly simple (not easy, mind you); Working with data, transforming data, moving data, often through databases and/or APIs. Typically I work a lot with geographical data, but often some of the underlying concepts are abstracted away, such as collision checks, which challenged me yesterday in Advent of Code.
I also use it as a chance to code, formulate problems and alghoritmic thinking together with some friends, whom I don’t normally work with. We provide rubberducking opportunities, but also comparisons of the finished challenges, seeing what we can improve, or the different takes we have on the challenge.
Building a portfolio
Additionally, (because this has come up with the same friends mentioned above) the challenges provided within Advent of Code are good way of adding to your portfolio if you gather the challenges and create a repository on GitHub (or equivalents). Whenever the topic of ‘Building a portfolio’ comes up, people typically tell me they struggle to come up with what to build. My usual response is to solve a problem they have in their day-to-day life, but with these challenges, they instead get a pretty good chance at showing any future employer how they would approach and solve a problem.
Final notes
Despite there being a leaderboard and similar pages for the challenges, I think it’s helpful to view these challenges as something constructive and not necessarily, competitive. I wouldn’t hold anything against a competitive mindset, but it requires you to finish the challenge as soon as possible after it’s posted (which for me, means during my work hours).
I can however recommend viewing the subreddit for the project, where people post their answers (both for bragging rights and critiques), but you’ll also find others asking for help or pointers on how to move forward. Worth noting, is that this isn’t codegolf where everyone aims to get each solution in as few lines as possible, but if that’s your type of challenge, I see no reason not to combine them.
Happy coding!