A bit different to what you are currently reading but I really enjoyed project Hail Mary and the Martian by Andy Weir. Some classics from the 70s like Solaris by Stanislaw Lem, Gateway by Frederik Pohl, The Forever War by Joe Haldeman
A bit different to what you are currently reading but I really enjoyed project Hail Mary and the Martian by Andy Weir. Some classics from the 70s like Solaris by Stanislaw Lem, Gateway by Frederik Pohl, The Forever War by Joe Haldeman
Day 07 โ
Playing catch up again, at least this wasn't too bad. I'm sure there are ways to cut down the search space but ๐คท
TIL you can pass a radix into toString which was very handy
github.com/csh97/advent...
#kotlin #AdventOfCode
I've ended up writing something like this in the past to time test time + gradle tasks + intellji shenanigans and then wrote the results to a file. So that I could argue why I needed a new work laptop ๐
It worked though, I got my new laptop!
I actually got the idea from a talk you did a while ago!
Day 06 โ
Tried to keep it all immutable but part 2 took ~8mins ๐
Refactored it to be mutable and part 2 runs in ~500ms now
(I think the codes starting to get too big for the images)
github.com/csh97/advent...
#kotlin #AdventOfCode
Day 05 โ
Not that happy with part 2 but it will do, at least I am caught up now
github.com/csh97/advent...
#kotlin #AdventOfCode
Day 04 โ
Playing catchup today, I've already managed to fall behind ๐
Can definitely be improved but I don't have time, using a try catch instead of checking boundaries feels gross but it works ๐คท
github.com/csh97/advent...
#kotlin #AdventOfCode
I noticed that when I looked at a few solutions after, its a nice shorthand. Lets see if I remember it next year when I touch regex again
Code solution in Kotlin
Day 03 โ
I knew some regex was coming soon, thankfully not too bad today
github.com/csh97/advent...
#kotlin #AdventOfCode
Day 02 โ
Made some silly mistakes in part 2 due to misreading the explanation, but made for some good debugging
I feel like there's a better way than brute forcing but its day 02 ๐คท
github.com/csh97/advent...
#kotlin #AdventOfCode
Its that time of year again, Advent of code day 01 โ
Nice use case for `zip()` and `unzip()` today!
github.com/csh97/advent...
#kotlin #AdventOfCode