What I learned with Advent of Code 2017
Piotr Tr?bacz
Cloud Native Devops ? Freelance Advisor ? Agile & Strategic Rebel ? Good Practices Hoarder ? Tabletop Tactician ? Want me to answer your job offer? ? Then include a joke
Before sharing my thoughts, short introduction for readers not familiar with this event, which had 3rd edition this year:
“ Advent of Code is a series of small programming puzzles for variety of skill levels” – Eric Wastl, author of AoC.
Each puzzle is published every 6:00 AM (CET / Polish time) from 1st December to 25th. Anyone can participate in it for free – only registration is required to get an individualized puzzle input. There is no restrictions about languages or any other tools, as the answer to each day is always a single number or string. My personal goal was to hone skills with NodeJS and its libraries, relax and dust off from usual work problems.
Type of puzzles
Each puzzle calls upon a different skills and has two parts. Deeper into days, more demanding, but also more interesting the puzzles became. The first day was simple counting values that meets the criteria, after about first week it was implementing simple processor parser, one of the last was implementing special, expanded kind of Langton’s Ant to get single, desired value at the end.
Sometimes obvious and/or crude solutions were not possible, efficient or clean because of the creeping Big-O and time constrains - only first 100 people worldwide got global ranking points each day. Nether less I think that for Polish people the most difficult part was getting up early.
Community
First puzzle was completed by 37397 people, but only 2951 had made it to the last one. The participants was melting each day (with nice Pareto distribution) as puzzle became more difficult - but more importantly people just abandoned it as many just had problems with commiting.
The great experience was seeing many great minds, mostly using highly expressive languages (like Python) to deliver answers in the shortest time. The competition in global ranking was very, very aggressive. There were veterans, who had some utility function prepared from last year’s puzzles (which were different, but general ideas like some pieces of not-so-common arrays manipulation or implementations of hex grid are universal) and people whose local time was more approachable for creative thinking (like Tokyo or San Francisco). Still, the performance is what finally counted and I have nothing less than a pure admiration for those champions.
Private leaderboards
Comparing with the best helps you grow as you can see a lighthouse on horizon and your own position. On the global ranking I managed to place myself at av. 600-1000 worldwide in each puzzle - which I believe is not bad. I didn't manage to start each day 6:00 AM sharp - hour far from my prime time for critical thinking. The choice of language that I used in few cases was also a root of small hiccups, when I had to learn something new about javascript itself.
Very nice feature was an ability to create or join private leaderboards. I was in two of them: one from my facebook programmers group where I was 1st, and second one - polish nationwide, where I took 3rd position, mostly because systematically getting up early.
So, what did I learn?
Doing solution right for the first part of puzzle (clean code with fine strategy) helped a lot doing second part. This should be a lesson for all projects – no matter how small or big. Doing shortcuts and cutting corners to save time (which is money) only makes us burn more adjusting or replacing solution to become more flexible when need for change arise (and it always do).
I also learned I’m not that bad, seeing a difference between preassumably juniors and more experienced programmers. When the specification was trivial and there was no catch, only skill to fastly type shortest formulas mattered. However when there was also need for knowledge about data structures, algorithms or design patterns... Those was the days, that I managed to get little above 250 point mark worldwide with relative ease.
There is also more pragmatic part:
- I learned more deeply about JS programming,
- I reminded myself about some not commonly used design patterns and some game patterns like hex grid implementation or finite elements simulations.
- I explored more some interesting NPM libraries like lodash or async, and few failures - not every time a COTS lib can be found that solves your little more complex problem.
- I stepped up my 'arrow functions' and debugging game.
End words
Participating in Advent of Code was a great experience with lots of fun. My goals for this edition of Advent of Code were accomplished so at the end I feel that getting up so early was justified and fulfilling. I already put a reminder for myself for next year and I hope with this article you will be encouraged to participate with me in AoC2018.
From Coder to Leader: I teach Human skills to Tech professionals!
6 年Great story and greatly told. Do they publish this overall statistics? I imagine waking up early for a whole month was exhausting. Did you manage to keep waking up early afterwards? Keep up and waiting for your report on AoC2018!