Did you make some New Year’s resolutions? Or have you already broken some 😜 ? We certainly have our software engineering resolutions ready! It all started during Advent of Code…
Advent of Code is not just about coding
Unlike “Advent of Code” suggests, the essence of the concept isn’t coding. Wait, what? Advent of Code? If you know what it is, just scroll down to the next paragraph. If you don’t, here’s a small summary:
Advent of Code is an Advent calendar of daily programming puzzles for various skill sets and skill levels that you can solve in any programming language you like. Eric Wastl initiates it, and people from all over the world participate. The fun starts on December 1
Each day, Eric posts a new puzzle to solve, and on Christmas Eve, the leaderboard shows the winning master brain. If you want, you can read more about Advent of Code on their website.
It would be awesome if one of our software engineers ended up as Nr. 1 on the leaderboard, but unfortunately, nobody did in 2019 ;) BUT, the most important thing is that we did participate, and we had a blast! So what about the fact that Advent of Code isn’t just about coding? Technical coach Michel Grootjans explains:
“A company like DPG Media has so many employees that it’s impossible to know every colleague, even within our IT department I don’t know everyone. So one of the main reasons why a bunch of colleagues and I participate in Advent of Code is to get to know each other and have some (engineering) fun. During lunch, we gather around in a meeting room (some of us join remotely) to discuss how we can solve these challenging puzzles.”
Of course, everyone has their codebase in their preferred programming language as the leaderboard is individual, but it’s not about the code, and that’s why we love Advent of Code!
“In software engineering, you don’t start coding before you really understand the problem or needs of your stakeholder(s). Code is just the output of your solution, and it’s the same with the Advent puzzles. Finding that solution is what we do together,” tells Michel.
Take, for example, the puzzle of Day 10
(FYI: the theme of Advent of Code 2019 was the galaxy):
— — Day 10: Monitoring Station — -
You fly into the asteroid belt and reach the Ceres monitoring station. The Elves here have an emergency: they’re having trouble tracking all of the asteroids and can’t be sure they’re safe. The Elves would like to build a new monitoring station in a nearby area of space; they hand you a map of all of the asteroids in that region (your puzzle input).
The map indicates whether each position is empty (.) or contains an asteroid (#). The asteroids are much smaller than they appear on the map, and every asteroid is exactly in the center of its marked position. The asteroids can be described with X,Y coordinates where X is the distance from the left edge and Y is the distance from the top edge (so the top-left corner is 0,0 and the position immediately to its right is 1,0).
Your job is to figure out which asteroid would be the best place to build a new monitoring station. A monitoring station can detect any asteroid to which it has a direct line of sight — that is, there cannot be another asteroid exactly between them. This line of sight can be at any angle, not just lines aligned to the grid or diagonally. The best location is the asteroid that can detect the largest number of other asteroids.
To solve this advanced mathematical test, it’s key to get around the whiteboard and discuss different strategies together. “And that’s what we did during lunch.”, continues Michel.
“We came up with different scenarios and drew possible solutions to discover the preferable answer. After understanding the problem, everyone started coding at their own pace. Of course, not too relaxed, there was still the leaderboard, and we had our own little competition going on!;)”