14 votes

Advent of Code 2018 - a Christmas Themed HackerRank-like mini project

7 comments

  1. [3]
    aphoenix
    (edited )
    Link
    If you're looking for some programming mini-challenges that are Christmas oriented, have a look at Advent of Code. Last year's was fun, and had many interesting small challenges. Each day is a...

    If you're looking for some programming mini-challenges that are Christmas oriented, have a look at Advent of Code. Last year's was fun, and had many interesting small challenges.

    Each day is a brief commitment to two different relatively simple programming / mathematical challenges. It's quite similar to HackerRank or Project Euler, but the problems release daily - you get two questions per day, and answering the first unlocks the second, with the second problem building on the first problem.

    3 votes
    1. [2]
      Magetooth
      Link Parent
      Looks pretty cool, thanks! Never seen it before. Looks like a great way to really get my brain warmed up, if nothing else.

      Looks pretty cool, thanks! Never seen it before.

      Looks like a great way to really get my brain warmed up, if nothing else.

      2 votes
      1. Crespyl
        Link Parent
        I usually don't get very far, but always try to take it as an opportunity to get familiar with a new language. Last year I learned a bit of Haskell and this year I'm diving in with Perl 6. The...

        I usually don't get very far, but always try to take it as an opportunity to get familiar with a new language. Last year I learned a bit of Haskell and this year I'm diving in with Perl 6.

        The puzzles range from one step above "Hello World" to some really quite challenging mathy CS problems later on.

        2 votes
  2. rkcr
    Link
    I love doing Advent of Code. They're usually a lot more fun than your normal coding puzzles. It's a great for learning new languages (or solidify your understanding of one). Not sure what language...

    I love doing Advent of Code. They're usually a lot more fun than your normal coding puzzles.

    It's a great for learning new languages (or solidify your understanding of one). Not sure what language I'm going to do this year's puzzles in yet. All I know is I'm going to be quite late to them. :P

    3 votes
  3. [2]
    balooga
    Link
    Oh this is fun. Wonder how far I'll be able to get as the difficulty ramps up. Thanks for sharing!

    Oh this is fun. Wonder how far I'll be able to get as the difficulty ramps up. Thanks for sharing!

    2 votes
    1. rkcr
      Link Parent
      If this year is anything like previous years, then it's not so much a difficulty ramp as it is a difficulty roller coaster. Some early problems can be real hard, some later problems can be real...

      If this year is anything like previous years, then it's not so much a difficulty ramp as it is a difficulty roller coaster. Some early problems can be real hard, some later problems can be real easy.

      For example, check out the stats from 2016. Each day has a natural decline in participation, but day 11 was clearly a serious bump in the road for many.

      1 vote
  4. Soptik
    Link
    This is nice! I guess I'll try prolog. I'm not even sure if it's possible, but hopefully I should be able to solve at least the first one (with little help from python with input preprocessing)....

    This is nice! I guess I'll try prolog. I'm not even sure if it's possible, but hopefully I should be able to solve at least the first one (with little help from python with input preprocessing).

    If someone here doesn't know what prolog is, it's really interesting programming language. You don't tell the computer what do you do. You tell the computer facts and then ask about it. For example:

    # These two lines are rules. It's raining in london and it's storm in hamburg
    raining(london).
    storm(hamburg).
    # Now, we define clause (it's bad weather in city if there is rain or storm)
    badWeather(City) :- raining(City) ; storm(City).
    

    Now, we can run query against it:

    ?- badWeather(london).
    yes
    ?- badWeather(moscow).
    no
    

    You can even let prolog find input that results in yes result.

    ?- badWeather(SomeCity).
    SomeCity:
      london ;
      hamburg .
    

    It's pretty challenging to write just simple list lenght counter. I wonder if I can get past the first challenge.

    2 votes