Hacker News new | past | comments | ask | show | jobs | submit login

Always look forward to these so I can compare my solutions afterwards. Sometimes it's almost frustrating to see how clean and concise the mess I made could have been, but I do learn a lot. It's like he gets as close to golfing as possible, without the obfuscation.

Too bad he punted on 20... one of the few difficult problems this year. Usually the hard problems are where you really see the contrast between his solutions and the rest of us plebs. Do I sense a hit of frustration in his comment? ;)

"too tedious for too little reward...." "sea monster as characters inelegant"




I had a similar feeling with that one, found the corners by counting edges on part one, and really got de-motivated for part two and actually solving the puzzle and looking for the patterns


Interesting he thought it was tedious - I thought this one was actually the closest to being like a real world software engineering task! No mathematical tricks or lateral thinking, just a gnarly problem that requires planning and breaking down into more manageable pieces. I actually really enjoyed it for that.


Full quote

> Family holiday preparations kept me from doing Part 2 on the night it was released, and unfortunately I didn't feel like coming back to it later: it seemed too tedious for too little reward. I thought it was inelegant that a solid block of # pixels would be considered a sea monster with waves.

Phew - I'm not alone.


My computers are full of half finished projects if that makes you feel better. :)


Mine too, I even have a few Flash (.fla) project files (games) here coming through an array of backups


That one was tedious though. It's easy to see what the solution is, but it just takes a lot of time to write it up.


I punted on part 2 of #20 as well, but came back to it the next day with a reasonable idea. Some of the tedious parts are easier to do by hand, like picking the corner of the map to start with on #20, or solving the uniqueness on #21.

I'm still looking forward to reviewing how Norvig did most of the problems.


How do people usually tackle AdventOfCode? Most elegant/concise solution or best performant?

Asking because for example most solutions to Day 1 I've seen are O(n^2)


I aim for "first thing that I can get to work and doesn't take more than 20 seconds". Usually they run in under 2 (Common Lisp is my language of choice). Then for the part 2 portions I may have to optimize.

I sometimes go back and clean up my solutions, though I aim for a combination of clarity and performance if I do that, clarity first.


Unless I'm really unhappy with my solution, I stick with the first thing I write that spits out the correct answer. Since a lot of the problems require you to do some potentially interesting optimization to get an answer in a reasonable amount of time, I don't bother optimizing the ones that don't.


> Do I sense a hit of frustration in his comment? ;)

Yeah, I too smiled at his comment last week.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: