1. 79

The 2019 Advent of Code competition is starting soon. Advent of Code is a code advent calendar. Each day unlocks a new programming challenge. You score points by completing the challenges quickly.

I’ve created a lobsters leaderboard for this year that you can join with code 224033-6a270b9d. To see it you need to create an account on the advent of code website, login, then go to the leaderboard page and enter the code for the private leaderboard.

Advent of code is a great way to learn a new programming language. It’s also a nice way to get a daily warmup programming exercise through the month of December. If you’d like to chat about the code challenges we’ve created the #lobsters-advent IRC channel on freenode to chat about it with other lobsters users. You can also chat about it in the main #lobsters channel on freenode (see chat for more).

  1.  

  2. 20

    It’s also a nice way to get a daily warmup

    Don’t be fooled: You will not just solve tasks and be over with it. There will be tasks that you’ll think about all day and you won’t be able to think about anything else. And you’ll love it :)

    1. 4

      I’m not a programmer, and spent ten hours last year on day three trying to solve the puzzles before giving up. A word of advice: if you can’t figure a puzzle out, just move on and work on the next day’s. It’s better than wasting time on one puzzle for a week.

    2. 7

      Was the link supposed to lead to the submission for last year’s competition? I joined our leaderboard, under the name grxnola.

      1. 3

        Shoot! I pinged pushcx to edit the URL.

      2. 6

        I shall be attempting these problems in either Common Lisp or Raku — hopefully both.

        1. 4

          Looking forward to getting comfortable with Common Lisp this year! Also, the code worked, for some reason I was on the 2018 thread :S

          1. 4

            I did this for the first time last year and completed the puzzles. My general approach was to get to work about an hour early (at 5:30am) and try to bang out the solution. For most days that worked. For some, it did not, and I had to finish it when I got home.

            It felt good to finish, but I was exhausted by the end of it, so I don’t think I’ll be doing it again this year. I commend folks who do this back to back!

            1. 2

              Nitpick: Advent consists of the four weeks before Christmas (starting with Sunday), rather always starting on December first. (Source: https://www.fisheaters.com/customsadvent1.html)

              (Yes, I know. This year Advent does start on December first. Your point?)

              “First get your facts straight. Then distort them at your leisure.”
              -Neil deGrasse Tyson (https://twitter.com/neiltyson/status/835938739784314880?lang=en)

              1. 7

                You are technically correct, but most advent calendars start from 1 Dec and end on Christmas Eve or Day.

                Using the secular form (i.e. all days in December up to 24 or 25) prevents acrimonious debate about when, exactly, Advent Sundays fall. For example, according to the fount of all human knowledge:

                In the Ambrosian Rite and the Mozarabic Rite, the First Sunday in Advent comes two weeks earlier than in the Roman, being on the Sunday after St. Martin’s Day (11 November), six weeks before Christmas.

                1. 4

                  And in the Orthodox world the Christmas fast starts 40 days before Christmas!

                  1. 2

                    In the Ambrosian Rite and the Mozarabic Rite, the First Sunday in Advent comes two weeks earlier than in the Roman

                    I didn’t know that until today (I’m a member of the Roman Rite). However, this only strengthens the point that Advent is a religious thing and secularization is diluting the meaning of such names.

                    Using the secular form (i.e. all days in December up to 24 or 25) prevents acrimonious debate about when,

                    I’m not angry at anyone in particular over this. It would be nice if secular customs didn’t use religious names, but I think it’s a bit late for that.

                    1. 4

                      These rites were news to me too!

                      The creator of the project seems to have German Lutheran (cultural) roots, so the project was inspired by his memory those calendars. See this talk: https://lobste.rs/s/ay9oft/advent_code_behind_scenes

                      1. 2

                        See this talk: https://lobste.rs/s/ay9oft/advent_code_behind_scenes

                        I don’t know if I’ll watch the whole thing, but it’s good to know this was addressed. Thanks for the link!

                        1. 2

                          A big part of the talk was that the planned audience for this contest was ~70 people. Virality expanded that to 100K (?) during the first year. No doubt if this had been a corporate project it would have been focus-grouped and someone might have raised the issues with naming it after Advent.

                2. 2

                  Yes! Looking forward to seeing what solutions people come up with this year. I wrote a little bit about it last year.

                  1. 2

                    I did them all almost on time in 2017 and 2018, in Lua both years.

                    This year I think I’ll try to do it in Ruby, which I just started to use at work, but I probably won’t solve all problems on the day they come out (for lack of time).

                    1. 2

                      Reposting here since I accidentally commented on the 2018 submission… (Good news, the code worked this time!)

                      Trying to consider what language to do it in…

                      I mostly use Python at work, so it might be good to do it in that to continue to improve in it. I also really enjoy JavaScript, and I used to use Ruby a lot and kind of miss it.

                      Or could use this as a way to try to learn something totally new. I’ve been hearing a lot about APL recently, and it’s pretty fascinating.

                      Trying to do it in a language I already know and golfing the solutions as hard as I can would also be very fun though.

                      1. 4

                        APL is fun to learn but if prior AoC puzzles are any indicator, many of them don’t align well with the strengths of APL. That’s not to say I won’t be trying it again this year though! : )

                      2. 2

                        PSA: I started a list of solutions last year that I just cleaned up for this year (the archive for 2018 is here). Feel free to add your repos so folks can discover them!

                        1. 2

                          Looking forward to it! I’ll be doing Rust after I started with it on AoC last year. One annoyance I found with AoC 2018 (maybe it’s every year, I didn’t check) was heavy reliance on fiddly text parsing. I don’t design puzzles, let alone language-agnostic programming puzzles, so it might be that this is just how it has to be done. Still, I just wish there was less emphasis on text parsing and more on problem solving.

                          1. 2

                            Joined! Really excited about this year!

                            1. 1

                              I thought I wouldn’t find time, but today I did.

                              Joined the leaderboard and trying to play a bit with plain C++ - I’m only using Qt at work and I honestly had to google how to even use std::tuple.

                              1. 1

                                swift or C++….gosh

                                1. 1

                                  I’m going to do these in Haskell again, but I won’t beat myself up if I can’t get everything done on time. For instance, I’m still working on 24 from last year, so.

                                  1. 4

                                    I’m still working on 24 from last year, so.

                                    I took some time to finish last year’s puzzles recently. I found days 15, 20 and 23 the most tricky. IMO, day 15 was just a general pain in the ass and not very much fun.

                                    1. 2

                                      Same here[1]. 2017 was a great year in this competition , and I went into 2018 with high hopes, only to be … discouraged… by day 15. I’ve got 38 stars out of 50, but I did not enjoy last year as much as previous competitions.

                                      [1] except the Haskell part. Perl 4 lyfe.

                                      1. 2

                                        I burned out on day 15.

                                        1. 1

                                          Yeah, I burnt out on it, running into a few really shitty problems, or at least, problems that I was not well suited to solve. Still, I’ll give it a shot again. My Haskell is very primitive, basically baby-talk, but I enjoy an excuse to play in that sandbox.

                                      2. 1

                                        This year I’m using rust.