Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can never get myself to care enough to do more than a small handful (2 to 3 per year max, if I have time in between other hobbies/family/travel and most especially work). However, my favorite restriction is to try to do incredibly terse approaches for those first few. For example, do it all in a single Python line as a large list/dict comprehension. Or do it all in a bash pipeline. Or find some way to express it all in a single line of Golang generics a-la samber/lo. Something silly that takes one of those first-few-days sub-30-minute problems and turns it into a sub-60-minute problem, but now with some amusing self-expression via extremely odd code.


> my favorite restriction is to try to do incredibly terse approaches for those first few. For example, do it all in a single Python line

Ha, this is pretty much my favorite restriction too. I try to do one single-line expression for input parsing, one for the part 1 solution, and one for the part 2 solution (eg [1]). Thought sometimes I can't manage it and I just fall back to solving it normally.

[1] https://github.com/benhaney/Advent-of-Code/blob/master/2024/...




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: