10 ms·
Advent of Code 2019
- NathanielLovin 7y agoWill I actually do this past day five this year for a change?
- mordechai9000 7y agoOutside of family, work, and exercise, I have time and energy for approximately one personal project. AoC got to be a bit of a grind for me last year. Something came up, and I missed a few days towards the end. I told myself I was going to go back and finish, but I never did. I'm tempted to try again this year, but I don't know. I already have projects languishing in need of some attention. On the other hand, it's lots of fun.
- ofrzeta 7y agoSame here. I got back to some problems I left open due to other obligations but finally quit. Plus there's the "problem" of the timezone: Puzzles start at 6am here. Last year I had some time off between jobs but this time it collides with my usual heading to the train. Unless I am really fast and am able to solve between 6:00 and 6:04 ;-) Related is the tool of choice. I was and would probably still be using Python with the addition of Numpy which by studying other solutions found out to be quite efficient for the AoC type of combinatorics puzzles. Although I had the intention of learning it I didn't make it over the course of a year.
- xyzzy_plugh 7y agoAgree with the timezone being problematic. I find the leaderboard to be a big turn-off/demotivator as I have no chance of making it there.
- sircastor 7y agoI think I made it to day 6 last year. But not Past the second challenge. I unfortunately have just a little too much going on to tackle it everyday. Maybe this year will be different.
- Fellshard 7y agoExcited as ever for this. Got my toolkit ready. Trying to decide if I want to aim for something besides speed this year; maybe visualizations, or literate code. Given my current work, I probably won't focus on a new language.
- iandinwoodie 7y agoThis will be my first year. Can you explain what your toolkit is? I don’t have anything prepared and if people are going in with a toolkit it seems like I might not be prepared?
- matttb 7y agoReally just for the people who go for leaderboard slots. You don't need to do any preparing.
- gerikson 7y agoPrevious year’s contests are still up. I suggest doing day 1 to 3 of all of them to get a feel for how it all works. The problems start out easy! My “toolkit” is Perl and an Emacs expansion that adds some boilerplate reading text files and stuffing them into a list. Edit here's what's expanded when I type "aocinit" an empty buffer: https://gist.github.com/gustafe/27be34b3c57728f40101a93a95cec4fa https://gist.github.com/gustafe/27be34b3c57728f40101a93a95ce...
- Fellshard 7y agoPretty much what others have said. In this case, a language and library I'm comfortable with, and some specific tools for handling the types of input and logic that tend to recur in each year's problems. Since it's your first year, none of that's needed - just enjoy the puzzles, and search for any useful patterns or tools as you go along. Eric's recommendation is to make the puzzles work for whatever goal you're aiming for - speed isn't necessarily one he recommends, instead recommending it as a tool to learn new languages, or to try new skills, such as visualization.
- jodrellblank 7y agoThe puzzles are released each day at the same time - 5am UK time (I think it's midnight Eastern Standard Time but don't hold me to that) - and people race for the first correct answers. Check last year's leaderboards and look how fast people answer: https://adventofcode.com/2018/leaderboard/day/1 https://adventofcode.com/2018/leaderboard/day/1 You don't have to race, it isn't required, but the people who do race are very very quick off the draw - they have scripts which login and download their data file as soon as it's available, then templated code ready to read it in as if it were numbers, as if it were a CSV, and load up some counter variables and arrays to save a few seconds typing, and they skim read ignoring the story, trying to jump to the calculation, code it in moments, run it, get an answer, paste into the site, and verify it. Then download the datafile for part two, skim read the story for part two, modify their code to handle it, run it, get an answer paste that in. First person did both those, all that, in 1 min 48 sec. (!) Toolkit is mostly "I've done this last year, know what held me up, or what patterns came up several times", you don't need one at all if you're not racing for the first 100 answers. btw. you can sign up now and do previous year's puzzles if you want to see what it's like.
- mesaframe 7y agoI'm have seen people being really excited for AoC. What's so special about it?
- JeremysIron 7y agoYou're presented with a pretty unique, bite-size programming challenge every day. Everything is themed around Christmas so there's a short story about how you have to help Santa's elves fix their machinery or something like that. Different people get slightly different problems, so you have to do your own work to solve for your puzzle input. You feed it back into the site to see if it was correct or not. Getting a problem right was a great feeling, and it progressively unlocks more of a Christmas-themed ASCII art picture. I would have a tough time explaining it to someone who doesn't do any programming, but it's free to try if you're curious!
- jodrellblank 7y agoIt’s a neatly polished programming challenge site which is both communal and competitive, there’s a bonus score (I think) for completing on the same day a challenge is released, there’s a leaderboard race for the first 100 answers each day (typically all gone within 1-2 minutes after midnight) and there’s a subreddit where people share their solutions in all kinds of languages, and it’s nothing to do with competing for a FAANG job interview. But apart from that it is “just” coding challenges with a story wrapped around them, and if you don’t like those, you won’t care for it.
- jodrellblank 7y agoI should have linked the Reddit: https://old.reddit.com/r/adventofcode/ https://old.reddit.com/r/adventofcode/ and see on the sidebar on the right in desktop view, the "Solution Megathreads" e.g. from Day 5 last year there is https://www.reddit.com/r/adventofcode/comments/a3912m/2018_day_5_solutions/ https://www.reddit.com/r/adventofcode/comments/a3912m/2018_d... with tons of solutions including more oddball ones like VimScript, less popular like Common Lisp and APL, and lots of people use it as an excuse to learn/use a new language, so plenty of Python, Kotlin, Rust, C#, GoLang, D, and so on. As the days go on, the challenge difficulty increases quite a lot (not linearly) so the threads often turn to discussions about performance, mini-competitions between people, tips on complexity, different approaches and debugging, etc.
- JeremysIron 7y agoThis year I really want to try to use this to learn Rust. Are there any good practices or crates to handle file input like most of the problems give? As I recall, most of the time the input is delineated by spaces or linebreaks and it helps if you can carve it up easily right off the bat.
- huntie 7y agoYou can do that with the standard library, just do File::read_to_string and String::lines or String::split_whitespace.
- Myrmornis 7y agoI tried using it to learn Haskell last year. Warning: it gets hard, and you will want to concentrate on the problem solving, not on compiler errors. It definitely helped my Haskell for the first week or two, but then I switched to Python. I like Rust and recently learned it, but honestly doing AoC in it while learning sounds really painful.
- Freak_NL 7y agoI tried AoC in Rust two years ago, and you really don't need anything beyond the excellent standard library. Rust has lots of nice features that make working with the type of input AoC gives trivial. By limiting yourself to the standard library at first, I find that you can get a good feel for the language itself. You could look up some of the published solutions from last year to get a feel for what is possible. Example: https://github.com/bertptrs/adventofcode/tree/master/2018/src https://github.com/bertptrs/adventofcode/tree/master/2018/sr... This person kept a minimal common library for recurring functionality and a small wrapper application that launches the code for each puzzle. It looks like a really clean approach.
- japanuspus 7y agoI would recommend against a common framework if this is your first venture into rust: I tried exactly this last year, but since I was learning a lot about the language along the way I kept having to go back and update previous days to reflect framework updates.
- vb4 7y agoDo you still need to sign up in order to use this? I've been wanting to do AoC for the past few years, but the mandatory signup prevented me from doing so. Just give me the tasks. I don't want any leaderboards or anything like that. Edit: The aspect of customized tasks does not require sign-ups. Just use a cookie or something.
- gerikson 7y agoYou have to have an account but you don’t have to use a nick or name.
- recursive 7y agoI wouldn't get your hopes up.
- jodrellblank 7y agoYou can login with Reddit or with Github, and Reddit doesn't need an email address, so if you can make a HN account here to rant with, you can make an account for AoC ??
- squiggleblaz 7y agoMandatory signups on the internet, especially for tools that don't require them, are dangerous. They feel like deliberate or accidental honeypots, trying to get people's passwords. As members of the industry who have seen the problems that thrive from this practice, we should be opposed to them. The number of things you need a membership for a extremely limited. Can you imagine if you went to your local supermarket to buy milk, and they said "I'm sorry, you can't buy milk without a membership". Surely this is one of those cases when a signup is not necessary. Anyone who asks for personal data they do not genuinely require should not be trusted.
- Animats 7y agoCan you imagine if you went to your local supermarket to buy milk, and they said "I'm sorry, you can't buy milk without a membership". We're almost there. At Safeway, you can buy without a membership, but it costs up to twice as much.
- Myrmornis 7y agoAround 15 Dec last year I had to promise myself that I would completely stop doing AoC because otherwise I wouldn’t buy any christmas presents.
- harco 7y agoWhat are you guys "using" the AoC for? Highscore hunting in your most favorite environment? Learning something new, or unusual? For me, this year, I'll give it another try to get into rust a bit more. Or maybe finally golang, after all these years of enterprisey java.
- Fellshard 7y agoI've been doing the last few years in Clojure (mostly to keep my knowledge of the corelib and the functional paradigm fresh until I can use it in a project). It helps in some problems, and hurts in others - sometimes an imperative, mutable approach is simply the only practical way, and I've fallen back to Java once or twice to do so. For the simulation-style challenges, I've found the language to be an absolute pleasure, giving some truly lovely code; I'm fairly sure you could make similarly lovely OO code as well, but my tastes find the functional expression of the simulation extremely attractive. Some debugging certainly does get easier, in my opinion.
- patrickdavey 7y agoI've used it to play with a different language each year, I find the puzzles perfect for that. This year though, I'm not even starting until January! I find I get completely obsessed with trying to complete them and it can ruin December for (the people around) me ;) Looking forward to January 1st though :D
- stefanchrobot 7y agoLast year I did "Advent of Elixir" at my company with the puzzles from AoC. It was slow paced but I got some people excited about Elixir! I also followed José Valim on Twitch to see how he tackled those. If you want to stay competitive, you've got to invest some time right before Christmas, so I gave up on that pretty quickly. Instead I did the puzzles at my on pace and spent some extra time playing with the puzzles that I found especially fun: https://twitter.com/StefanChrobot/status/1080574491535781899 https://twitter.com/StefanChrobot/status/1080574491535781899 https://twitter.com/StefanChrobot/status/1078448111041892352 https://twitter.com/StefanChrobot/status/1078448111041892352 As a bonus, you get something to show whenever you're asked to share some code when applying for a job! And then there's the learning factor - the puzzles are progressively more difficult, but I guess still doable for the average programmer. At some point some of them start to feel repetitive, but that's great if you get a good hold on processing data in your language of choice.
- alexfoo 7y agoFound it in 2016 and have done it ever since (and in the early days of December 2016 I went back and did the 2015 puzzles I'd missed). I was one of the 271 people who had all 200 stars (i.e. completed all puzzles) when Eric tweeted out that stat. Usually takes anything from 5 minutes to an hour do most puzzles, quickly hacked together in perl. Very occasionally there's one that takes longer than that. Sometimes I redo them in different languages (Go to try that out, C to remind me how bare bones the base language is, etc). Can't wait for it to start this year.
- lizmat 7y agoMaybe Raku would also be a nice language to try things out :-) https://raku.org https://raku.org
- kryptiskt 7y agoI have done it every year, mostly in Rust or C++, with a smattering of other languages (Factor, SML, Haskell). I think I will go with Racket this year. I'm not competing, partly because I don't want to be up at 6AM, and partly because I like it better as a relaxed 15-30 minutes where I learn some new stuff about the environment I'm working with (for example, one year I used CMake to build, just to get some experience with it).
- josteink 7y ago> I'm not competing, partly because I don't want to be up at 6AM, and partly because I like it better as a relaxed 15-30 minutes where I learn some new stuff about the environment I'm working with (for example, one year I used CMake to build, just to get some experience with it). Maybe I'm misunderstanding something, but this doesn't seem very exceptional. To me this seems to be 100% within the spirit of the project. I didn't even know there were competitive aspects in place.
- dagurp 7y agoEdit: There is a leaderboard https://adventofcode.com/2018/leaderboard https://adventofcode.com/2018/leaderboard > Getting a star first is worth 100 points, second is 99, and so on down to 1 point at 100th place.
- Waterluvian 7y agoI think the "competition" part stands out because of the nature of competition. But practically it's a supplement for the people who want that. I'm going to wildly guess that the overwhelming majority of participants aren't seriously competing. I absolutely love and share your approach. Learn new stuff and grow. This reminds me of SpaceChem, Magnum Opus, or other games like that. I get a solution and then I optimize the solution and explore other methods of getting there.
- petercooper 7y agoAs good as AoC is, I think this year I might try and develop the same program (or maybe solve a single one of the puzzles) each day in a different programming language. So one puzzle, 24 languages.. I sorta feel I'd learn more from that rather than sharpening the same knife over and over, perhaps.
- josteink 7y agoSome knives needs more sharpening than others before they get useful. For instance, coming from mostly TS/C# I'm not going to be productive in Rust over night. 24 exercises sounds about right to me.
- tudorpavel 7y agoFor me AoC was perfect while learning a bit of Rust last year, but tread carefully if you want to have 2 mutable references to the same value like a circular or doubly linked list. Good luck and have fun with it!
- gameswithgo 7y agoAoC is pretty likely to have a graph problem at some point that will give Rust newbies fits! But that will help you learn!
- lifeisstillgood 7y agoI think I am just going to move on one or more of my personal projects forward each day, and tweet about it. just to have a streak ... i love the idea, i love having a streak to keep you going, but i have a lot of things i want done before i sharpen the saw again - i need wood cut first :-)
- estomagordo 7y agoI'm in the 200 star club and being rather competitive about 2016-2018. I earned at least some global points for each of those years. I started doing the calendar in 2015 but abandonded it halfway through or so. I think it was only in post-partum sorrow after 2016's AoC I went back and did all of 2015. Very much looking forward to this year's edition and am on several leaderboards. I warmly recommend this presentation Eric gave in a conference in Sweden a little while back: https://vimeo.com/372351782 https://vimeo.com/372351782
- jweather 7y agoThanks for linking that, very enjoyable.
- janvdberg 7y agoIt is a fun event! I wrote a little bit about it and the languages that were used last year: https://j11g.com/2018/12/03/advent-of-code/ https://j11g.com/2018/12/03/advent-of-code/
- jawns 7y agoCan a person participate in Advent of Code if they don't celebrate Advent or Christmas? (If so, why use Advent, a Christian liturgical season, as the hook?)
- jschulenklopper 7y agoSure. It's just mimicking those traditional advent calendars, counting the days until Christmas with a surprise present or treat for every day to enjoy. Every day, one new puzzle unlocks. On top, the story that unfolds during December might refer to Santa Claus, and the Easter Bunny, or elves and reindeer. The programming challenges are open for anyone.
- dang 7y agoPlease don't post religious flamebait to HN. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- Waterluvian 7y agoMy second was born on November 30 last year. Stupid me thought I could do Advent of Code, manage a toddler and a newborn. Let's see what excuse I have this year!
- tudorpavel 7y agoI'm so excited! I discovered AoC in 2017 and I've participated last year as well. In 2017 I used it as an excuse to practice my JavaScript chops using ES2015 classes. Last year I learned me some Rust while doing the problems, at least up until I had to implement a doubly linked list and gave up on using Rust for the rest of the problems. Hopefully this year I can make it past day 14. It's strange, but I got stuck or tired on day 15 both years. We'll see how it goes, I'm planning on learning Clojure this year with AoC. I've only started learning the language a bit these past 2 weeks, but I'm sure I'll have fun with it. To all participants this year: remember to have fun!
- sircastor 7y agoProtip: put these challenges into a repo on GitHub. You get the fun of going through the challenges with the added benefit of having work to show off.
- feike 7y agoI've been doing this by having a single SQL statement per puzzle. Didn't get beyond day 7 last year, but so far so good: https://gitlab.com/feike/adventofcode/tree/master/2019 https://gitlab.com/feike/adventofcode/tree/master/2019