Advent of Code 2018

Advent of Code 2018
5.0 1
#1

Time spent: I started this late, and even then it took me way longer than 25 days to complete.

Difficulty: I’ve taken DS&A in C++ and in Java, and have been a hobbyist programmer since I was 8. I’ve only really been head-in on Web Development for a year, with a six-month break in the middle. Several problems (that took me days to solve) made me want to to rage-quit.

Learning: Every single time I was stuck, it was because I either:

  1. Didn’t remember the use case for a specific data structure (i.e.: when to use a linked list over an array)
  2. Had never heard of the necessary/optimal data structure which would allow my program to finish in non-astronomical time.

Caution/Caveat: If you are a complete novice, this isn’t the way. But, if you are coming from other languages and have some experience with higher-level programming concepts, this is a fun set of challenges with a great subreddit to help you get unstuck. For example, somebody tried to use Rust’s vector processing and their monster i7 CPU to run all 25 days’ worth of programs in under a second to teach themselves Rust.

*PROGRESS: I went in as a Secondary/Tertiary Expert in Javascript syntax (see below), and have come out as a Secondary/Primary. I’ve also become a secondary/primary in git. There are still concepts I need to learn, but the sheer amount of coding I’ve done has made it so that I waste far less time testing code to see whether it will do what I want, and more time pseudocoding and implementing, smoothing out runtime errors usually on the first go.

Types of Experts (per my Discrete Math professor):

  1. Primary - Knows the answer.
  2. Secondary - Knows where to look up the answer.
  3. Tertiary - Knows who to ask for the answer.

If anyone finds themself in a similar situation, and is stuck, I’ll be happy to provide non-spoiling hints.

3 Likes

#3

Hey there, @ieahleen!

Still stuck on day 3? (don’t worry about spoilers. We have tags for that)

0 Likes

#4

Yeah, just considered that I probably need to get deeper in the language before being able to solve it

0 Likes

#5

Well, if you look at my post, you’ll see that it improved my understanding of the language. The two sine qua nons of being able to do this (from an FCC user’s perspective) are:

  1. Have you done the Front-End section?
    1. You will have already done basic JS, ES6, their basic DS&A
    2. You will have some familiarity with APPLYING that knowledge to a less-scaffolded problem via React.
      1. You will have designed and used objects and arrays through state.
      2. You will know about array functions like map, filter, and reduce.
  2. Have you gotten the equivalent education of a full Data Structures and Algorithms class in any language. If yes, practice maps those skills onto JS. If no, you have to “make it up.” This concept can be scary because FCC isn’t a class, and doesn’t parallel that structure. However, there are 2 key elements to a formal university class format.
    1. Structure: reading assignments and accompanying homework problems.
      1. This is written knowledge that you can move through at your own pace (down to a minimum limit of the due date).
      2. A knowledgeable professor must choose what to teach (select the curriculum)
    2. Interactive Class time:
      1. A knowledgeable professor must talk about the concepts flexibly (using pictures, gestures, tone, and multiple explanations/examples) and model how to apply them.
      2. Students also on the same path engage in:
        1. Asking questions
        2. discussing the topics with one another during and after class time.

So, when it comes to overall point 2 (DS&A), this is where FCC is lacking. The youtube channel does what it can to make up for that with a 2 hour video by Beau Carnes covering a lot of topics. It is light on reading and assignments (point 2.1.1), but it is curated (2.1.2). As for all of point (2.2), you can make a discord with a cohort that is moving through the same material as you. If they can’t answer your conceptual questions (2.2.2), you can come here (2.2.1). This advice doesn’t just apply to Advent of Code. I love FCC and when I have the free time and greater experience in JS, I’d love to help them write some of the missing lessons. In the meantime, there is CS50, which has it’s own topic on this forum (although not purely in Javascript), for free. A google query of “data structures and algorithms in javascript” found this hackernoon article recommending 5, the 1st of which is by Colt Steele. I haven’t taken any of his stuff, so I can’t personally recommend it, but he’s a popular name in the space, the course costs 12 USD (link in that article), and the curriculum’s structure (1.2*) looks good, and also was updated recently (Nov 2018). Like many online things that cost less than a pizza, part 2.2 is where it falls down, but if your course-based chat group can’t help you, you can always come here for help provided that it isn’t part of some test within the course, say that it’s from that other course, and provide the context needed to help us help you (problem parameters, what you’ve tried so far, etc.).

If this info doesn’t apply to you, I’m sure it will help someone else. Best of luck!

0 Likes

#6

I finished day 6 yesterday, I’m going to try and finish more when I get some time later in the week. I enjoy the visualization problems more so than I do the other types, but the puzzles are helpful to hone in your JS skills, I’ve been using node on all of them. The big chunk of time spent so far was making sure my code for each part runs in < 15 secs as recommended, I also read that somebody run all 25 puzzles in less than 41ms using C++, that is nuts…

I’m sure the puzzles are going to get a lot harder, but all in all they are fun, thanks for the review.

1 Like