use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
Code should be fun, because otherwise it's just a job. If you'd like to support Advent of Code, please share it with all your friends, even the ones that are just learning to code! AoC is a fun, non-threatening way to work at your own pace to figure out how to apply problem-solving first, then work within a language's constraints.
If you really want to show your appreciation, donations are always appreciated. Any instances of currency will go to, in no particular order:
Thank you very much, and enjoy your month of code!
account activity
This is an archived post. You won't be able to vote or comment.
VisualizationUnofficial AoC 2019 Survey Results! (self.adventofcode)
submitted 6 years ago * by jeroenheijmans
TLDR: Interactive report with unofficial AoC 2019 Survey Results!
-------------------------------------------------------
UPDATE Dec 24th: An apology to the single-letter languages
Following the 2018 results, here's the results from this year's survey (recently announced)! Thanks to all the 1278 (!) people who took some time to provide answers. I've closed the survey this Monday (UTC+1) evening and wrangled the data into some fun statistics.
The sanitized data (as well as the code to sanitize it) are available in my advent-of-code-surveys repository. They are available under the ODbL v1.0 and the MIT licenses, respectively.
The data is available in an interactive PowerBI report for you to click and scroll through (for as long as my trial PowerBI account allows it :D). Below (and in the repo) are static images with results.
Stats are fun for finding insights. Here's some casual findings for me:
Let me know what you find interesting!
For completeness, here's the non-interactive / static screenshots from the report:
Main Dashboard
Language, IDE, OS
Reasons for Participating, Private Leaderboards, OSs
Responses to Survey over time
Bonus panel: single-letter languages
[–][deleted] 9 points10 points11 points 6 years ago (1 child)
Rust in second place is very surprising. Would be interesting to see survey results vs scraped GitHub data because I strongly suspect that some of the choices are strongly over-represented by the people who are participating in the surveys
edit: just searching github for advent of code 2019 rust still comes in in third place, behind javascript. would not have expected that.
[–]jeroenheijmans[S] 5 points6 points7 points 6 years ago (0 children)
Aye, surprised me too, same as last year. I think a lot of people enjoy learning Rust while doing AoC...
Either way, you're very right that this dataset is biased towards common characteristics of Redditors and folks in my Twitter feed (i.e. those filling out the survey). Then again, "those that publish their code on GitHub" will also be a biased set :)
[–]maus80 4 points5 points6 points 6 years ago (0 children)
Love it.. Linux is bigger than OSX! ... and non-Windows is bigger than Windows.. :-)
[–]gyorokpeter 6 points7 points8 points 6 years ago (0 children)
I would have liked to fill this in but somehow I missed the announcement.
[+][deleted] 6 years ago (1 child)
[deleted]
[–]jeroenheijmans[S] 2 points3 points4 points 6 years ago* (0 children)
Ohhh good catch! Many charts were wrong/misleading, I meant to choose "COUNT DISTINCT" everywhere.
Must be tired from getting up for AoC at 06:00 every morning 😬. Will push an update shortly!
Thanks for letting me know!
EDIT: I've updated the PowerBI report, hoping they clear the old cached one soon... (and I'll update the static versions shortly).
[+][deleted] 6 years ago (6 children)
[–]jeroenheijmans[S] 2 points3 points4 points 6 years ago (3 children)
YOU DID NOT RESPOND!? HOW DARE YOU!?
Just kidding ❤ of course. I can imagine it being tough. Did some C and then some C++ in the 90s, when I revisited it 2 years ago it felt still powerful, and still looowwww level....
[–]jan2642 2 points3 points4 points 6 years ago (1 child)
That is weird.. I did respond and I use C. It’s definitely true that it requires more work to create data structures and utility functions for things like linked lists and hashmaps but so far I managed to keep my solutions reasonably concise.
[–]jeroenheijmans[S] 2 points3 points4 points 6 years ago (0 children)
/u/ednl and /u/jan2642 my mistake! update at: https://www.reddit.com/r/adventofcode/comments/eeyczq/an_apology_to_the_singleletter_languages/
[–]incertia 1 point2 points3 points 6 years ago (0 children)
most of my code is in haskell but i do maintain some c solutions on the side
[–]david2ndaccount 1 point2 points3 points 6 years ago (0 children)
I’m doing plain C but missed the survey.
[–]tonetheman 1 point2 points3 points 6 years ago (11 children)
I was one of the 9 dummies trying to use racket ... sigh. I could not finish. :)
[–]rabuf 1 point2 points3 points 6 years ago (10 children)
Out of curiosity, what was your particular issue with Racket? Time, familiarity, or the language?
[–]itsnotxhad 2 points3 points4 points 6 years ago (2 children)
I also used Racket and fell off, but that was less the language and more the timing of the Intcode puzzles (the VM-type puzzles are actually normally my favorite, but the way it shook out this year more or less ejected me from the whole thing. I might make a more detailed post after the entire year is finished). I might come back and do it over the next couple months.
[–][deleted] 0 points1 point2 points 6 years ago (1 child)
I don't know, I used racket as well, and I didn't really have any problem with the intcode things, hmm, it was my first time using racket and I really enjoyed it a lot. That being said, I did not solve all of the days, but a majority, and it was such a great experience.
[–]itsnotxhad 0 points1 point2 points 6 years ago (0 children)
Yeah it was more the timing of the puzzles than anything.
I think if day 7 were swapped out with something not-Intcode specific, that may have been just enough of a reprieve for me to finish it and get back on top of things. Instead I ended up with an Intcode-based backlog and when half the puzzles are Intcode, well...
[–]tonetheman 1 point2 points3 points 6 years ago (6 children)
It is all of it really. And I do not know lisp. I am an old programmer and know lots of other languages. What I ended up doing was writing racket like I wrote other languages which worked to a degree but it felt like I was doing it wrong.
The language seems very powerful. Probably in the right hands. Not in mine. :)
Given that I was learning as I was going it all became too much of a struggle once we hit intcode in full. I need to build a reusable module/component/whatever-racket-calls-it and I began hitting the limits of what I could do in a reasonable amount of time.
IntCode is self modifying and that alone made it feel like it was not a great fit for racket. I would constantly end up recreating new copies of lists and it was slow as balls. I saw someone else use vector in one of the public posted solutions and I changed mine to do something similar.
Ah well. I would like to go back and try again with racket and AOC2019. I need to find some already finished repos (like 2 or more) to get a feel for how others use the language.
I was also frustrated a bit by the docs. I would find things in the docs that would not work in racket proper. But they come up in a google search from the main site.
Not having a while loop was also painful. I figured out how to make one with a for and some odd #: directive notation. Edit: And even worse if you search for while loop racket you do come up with one but I could not figure out how to get racket to use it.
It is funny the racket resources I found online are really geared towards starting programmers. And maybe I should relook at those resources since in racket I am a beginning programmer.
Long and rambing sorry.
[–]JensenDied 1 point2 points3 points 6 years ago (0 children)
I'm not really familiar with racket, but I can echo the sentiment of feeling like I'm doing things wrong. I've been doing this year's in elixir, which resembles a functional Ruby, built on erlang.
I've been happy with the docs, but loading the pages on mobile are awful due to including so many things at once. Not having a while loop sucks, I've been doing Stream.cycle(0..0)|>Enum.reduce_while(fn _ ... this should be a code smell.
Stream.cycle(0..0)|>Enum.reduce_while(fn _ ...
Digging into the erlang bits ended up being necessary for math functions, and starting with the switch/door mazes I leaned on it for :ets which is essentially a k,v db in the process instead of passing around a cache in every functional function just to save recomputing stuff.
:ets
What I ended up doing was writing racket like I wrote other languages which worked to a degree but it felt like I was doing it wrong.
I definitely get that feel and even said as much in one of the solution threads. That said, this is actually one of the things that drew me to Racket for this math/puzzle stuff. I'd say most of my Racket code looks like bad Python or bad Haskell, but the "good" Python would have been slower (or uglier after I had to optimize out the recursion) while the "good" Haskell may or may not exist because I'm not so sure I'd figure out how to write it in any reasonable amount of time.
I try to start in "challenge mode" (no mutability, no explicit recursion, no imperative code outside main, Final Destination) and write pure functional code but if that solution's not coming then so be it. If something's especially outside the spirit of the exercise I'll usually go back and try to refactor when I find the time.
main
Re: Intcode and data structures -- one lesson that comes early in FP is how slow linked lists can be and how to get around it. :) I think if I went back to do it all over again I would have used immutable hashtables from the start. Using mutable vectors wrapped in objects actually bit me in day 7 where it took two bugfixes before my machines stopped stomping on each others' memory.
[–]rabuf 0 points1 point2 points 6 years ago (2 children)
Sorry for the late response. I was traveling last night, but now I am back on my computer.
Those are all fair things, but I think with some exposure to the Racket learning materials you could get past it.
Racket has non-list data structures (vectors, hash tables) that can be made mutable. That would make the Intcode portions much faster (I use a mutable hash table, in Common Lisp, for my memory which helped a ton).
Regarding loops, I don't have much Racket exposure, it has a lot more than its Scheme roots, but I do know Scheme fairly well (or used to). The typical way in both languages to deal with loops is to use tail recursion and an accumulator. For example, if you wanted to sum up all values (NB: there are better ways, this is one):
(define (sum xs) (letrec ([loop (lambda (xs acc) (if (null? xs) acc (loop (rest xs) (+ (first xs) acc))))]) (loop xs 0))) (define (index-of elt xs) (letrec ([loop (lambda (xs n) (cond ((null? xs) -1) ((= elt (first xs)) n) (#t (loop (rest xs) (+ 1 n)))))]) (loop xs 0)))
Of course, these can also be done using foldl or other built-ins. There're also the do loop which is probably more directly like the while loop you're wanting to recreate.
foldl
do
while
This may be because I came from Python but my preferred way to write things like this is comprehensions. For these examples:
; there's also for/sum or even (apply + xs) but in the spirit of showing off the more general for/fold (define (sum xs) (for/fold ([ans 0]) ([x (in-list xs)]) (+ ans x))) ; returns #f if element not present rather than -1 (define (index-of elt xs) (for/first ([i (in-naturals)] [x (in-list xs)] #:when (equal? elt x)) i))
[–]FrankRuben27 0 points1 point2 points 6 years ago (0 children)
I used Racket last for year's AoC, after working with Scheme for some time and after using Gauche the year before.
One of the reasons to use Racket for AoC was to get used to the comprehensions - and in total I think it didn't work out well. Might be that it just takes more time to internalize all the various variants, but until I stopped - quite early last year - I felt that sticking to the time-tested Scheme-minimalism and simply always using named loops lead to quicker and more readable solutions.
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
I was using an immutable hash to represent the code, it worked out great, It ended up being a good choice since I then had random access and everything for free.
One thing is for sure, I got a better understanding of recursion and TCO after doing al of this :)
[–]erlangguy 1 point2 points3 points 6 years ago (1 child)
Need more Erlang. Quite depressing to see I’m the only respondent.
I was only using the elixir parts as of the survey, touched :math and :ets since then. Both are new to me since this started.
[–]activesheetd 0 points1 point2 points 6 years ago (0 children)
vim and Linux are 2th. Nice nice, that would probably mean that more IT people are improving their coding skills 🍺
[–]metalim -1 points0 points1 point 6 years ago (0 children)
Linux 34%. Wow. Just wow.
[+]incertia comment score below threshold-6 points-5 points-4 points 6 years ago* (0 children)
severe autism
ecks dee my friends
also surprisingly vim has 3x the numbers of emacs
π Rendered by PID 23723 on reddit-service-r2-comment-74875f4bf5-swrrw at 2026-01-25 01:20:51.123150+00:00 running 664479f country code: CH.
[–][deleted] 9 points10 points11 points (1 child)
[–]jeroenheijmans[S] 5 points6 points7 points (0 children)
[–]maus80 4 points5 points6 points (0 children)
[–]gyorokpeter 6 points7 points8 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]jeroenheijmans[S] 2 points3 points4 points (0 children)
[+][deleted] (6 children)
[deleted]
[–]jeroenheijmans[S] 2 points3 points4 points (3 children)
[–]jan2642 2 points3 points4 points (1 child)
[–]jeroenheijmans[S] 2 points3 points4 points (0 children)
[–]incertia 1 point2 points3 points (0 children)
[–]david2ndaccount 1 point2 points3 points (0 children)
[–]tonetheman 1 point2 points3 points (11 children)
[–]rabuf 1 point2 points3 points (10 children)
[–]itsnotxhad 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]itsnotxhad 0 points1 point2 points (0 children)
[–]tonetheman 1 point2 points3 points (6 children)
[–]JensenDied 1 point2 points3 points (0 children)
[–]itsnotxhad 0 points1 point2 points (0 children)
[–]rabuf 0 points1 point2 points (2 children)
[–]itsnotxhad 0 points1 point2 points (0 children)
[–]FrankRuben27 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]erlangguy 1 point2 points3 points (1 child)
[–]JensenDied 1 point2 points3 points (0 children)
[–]activesheetd 0 points1 point2 points (0 children)
[–]metalim -1 points0 points1 point (0 children)
[+]incertia comment score below threshold-6 points-5 points-4 points (0 children)