Live data from Hacker News

Advent of Code 2022 is nigh

adventofcode.com

141–150 of 150 posts

Re: Advent of Code 2022 is nigh

#141

Every time I do the AoC puzzles I wish for two things: 1) The site should ask for the language used to solve the problem and then use this as semi-scientific data for comparing "time-to-solution" for various languages. The sheer volume of data and the relatively high difficulty of cheating on novel problems would make this data set interesting and maybe even useful. 2) I wish all the puzzles had a "hardcore" mode whe…

Try codingame.com.

You'll see those stats and others' solutions (well, not on all challenges).

Re: Advent of Code 2022 is nigh

#142

Earlier quoted context omitted.

I felt similar last year. I was trying to do them in Zig and Rust, and it felt like most of the challenge was just writing custom data parsers for poorly formatted data which felt too much like my day job.

Fwiw there’s a few recurring formats, the old hands have a bunch of helpers for that and other things. Sometimes there’s something completely bespoke but the most commons are space-separated lines of things, usually ints, commonly fixed-size.

For 2022 day 5, the hard part was parsing the input.

https://adventofcode.com/2022/day/5

Re: Advent of Code 2022 is nigh

#143

Earlier quoted context omitted.

1. Have everything in place at the start (a script to grab the inputs helps). 2. Use a language that makes the edit/run cycle short. 3. Be very familiar with that language and how to process input in it. 4. Have solved many similar problems in the past so you can parse these problem statements quickly. 5. Have solved many similar problems in the past so you know exactly what code to write or use (if you have a utilit…

I have most of it in place, but I guess it's 4&5 I need to improve. I feel like my problem, when comparing to the video posted of today's winner, is that I'm "too safe". I should gamble a bit more, read only parts of it at the chance of misunderstanding, and go with my first thought of implementation even though it may not work. Because the moment I start to consider things the others are already done, heh. And I gue…

Where can I find that video of the winner?

Re: Advent of Code 2022 is nigh

#144

How much external help do you guys seek out for these puzzles? Last year I solved two puzzles by looking up the answer on reddit, and other than that I tried to solve them as is. But I feel like it is sometimes a bit like solving a puzzle is a bit like reinventing parts of math and computer science if you didn't happen to have learned those from school or a book.

Exactly. This a very good set of exercises for training on algorithms.

Use platforms such as codingame.com for more targetted training, or if you need motivation.

Re: Advent of Code 2022 is nigh

#145

Is there any way to play without logging in (for previous years, if necessary)? I couldn't find anything on the About page that clarifies this. Edit: I see anonymous users in the leaderboard, so it seems like it might be possible.

Other comments haven’t pointed this out, but the key thing is that each account gets a different input (so it's a little harder to cheat).

It's easy to cheat by applying someone else's code (ex: from reddit) to your own input.

Re: Advent of Code 2022 is nigh

#146
post #91

I really like how the Advent of Code is structured. Not only it makes you think about how to solve the problem, it pushes you to architecture your code defensively so when you get the new requirements in part 2, you have the least amount of code to change. I remember being bitten in a problem involving a keypad: I didn't think the keypad shape could change!

One person's "architecture your code defensively" is another person's "make a dumb solution so that you don't waste effort being smart".

To me, often the "dumb" solution is the modular one, because I can't design the entire solution at once, but I can parse this string into this format, and then I can find out whether this sequence is contained in the other, and then I can map some chars to a number, and then ah..! the solution is just calling these 3 functions in the right order. Part 2 is just swapping one of the functions out with the other, great.

Now this is simplified I know, but I'm not convinced in your proposed duality.

Re: Advent of Code 2022 is nigh

#147
post #3

I did several of these last year and found them deeply unpleasant. I like puzzles but some puzzles are just...bad. Like the ones that require you to just brute force a solution, or write lots of detailed code to capture the requirements...that shouldn't be what this is. Just my opinion, of course, but like I said I found last year an unpleasant chore that felt more like work. Hope it's not like that this year.

I felt similar last year. I was trying to do them in Zig and Rust, and it felt like most of the challenge was just writing custom data parsers for poorly formatted data which felt too much like my day job.

I'm using a language with easier data parsing this year and so far I'm having a much better time (I'm also more time poor and these exercises fit in pretty nicely to a bit of after dinner free time).

Re: Advent of Code 2022 is nigh

#148
post #26

AoC is one of my favorite events of the year! I find the puzzles generally approachable, but interesting enough to spend time on. I also like that there's a definitively right answer, which motivates me in an interesting way. I've developed a base class over the years that handles input parsing, so I can focus more on the solutions themselves. Additionally I've been solving for a number of years, but for the past 2 y…

Thanks for creating this and helping others learn! Amazing effort :)

Re: Advent of Code 2022 is nigh

#149
post #26

AoC is one of my favorite events of the year! I find the puzzles generally approachable, but interesting enough to spend time on. I also like that there's a definitively right answer, which motivates me in an interesting way. I've developed a base class over the years that handles input parsing, so I can focus more on the solutions themselves. Additionally I've been solving for a number of years, but for the past 2 y…

Thanks for creating this and helping others learn! Amazing effort :)

You're very welcome! I hope you (and any other readers out there) have found them useful.

Re: Advent of Code 2022 is nigh

#150

Earlier quoted context omitted.

Personally i just think it's not a good way to assess. Such challenges are mostly about coming up with "creative" solutions. I think that pressure can be good for creativity but it can also be it's death. However, motivation is important for creativity. Competing online with other like minded people is a good motivation whereas a job is something you need literally in order to survive. It's not really comparable imo.

> Such challenges are mostly about coming up with "creative" solutions. No, or you're strawmanning the type of interview that is being suggested here. No, the challenge is about solving the problem; it doesn't take "creativity" to find the maximum in a list of integers, and the problems a SWE is going to encounter in the real world far dwarf such a question in terms of difficulty or "creativity" required to solve. So…

I disagree with you. It does take creativity and actually it is the same in math. Many proofs have a little "trick" that required in my opinion creative or out of the box thinking to discover. That is the same for many leet code problems, and I'm already accounting for knowing data structures and algorithms, most people learn those at university.

I just want to mention though, I am not trying to criticize "your interviews". It seems like you put quite a bit of thought into it which i think is great and every interviewer should.

Post reply on HN