I just completed Day 12 of in .

Hard day with little time for AoC, but I managed to squeeze it in - and the problem was interesting enough to be rewarding, to make it feel worth it. Got to explore Julia’s typing and multiple dispatch a little bit along the way.

I just completed “Adapter Array” - Day 10 - Advent of Code 2020 adventofcode.com/2020/day/10 in .

  • I was surprised to learn there’s no “count unique values” function in base Julia (equivalent to uniq -c in shell). The StatsBase downloadable package is needed for that.
  • How have I never used sort in Vim before?! I always thought I’d need to use the shell’s sort command since that’s the Unix-y way, but :sort n works like a charm.
  • One thing Advent of Code does better than other coding challenges is state the problem very clearly. Good examples, clear question text, and every assumption made explicit.

I just completed “Handheld Halting” - Day 8 - Advent of Code 2020 adventofcode.com/2020/day/8 in .

Spent way too long on Part 2 thinking there must be an interesting non-bruteforce way to solve it. reddit also seems to be concluding there’s no neater way of solving it, just straight up try everything, which is disappointing.

I just completed “Handy Haversacks” - Day 7 - Advent of Code 2020 adventofcode.com/2020/day/7 in .

I wanted to do something interesting using Julia’s multiple dispatch, making each outer bag a function and the inner bags the parameters, but it would have needed too much macro munchkinry and ended up in the “too clever for its own good” type code. I’m not trying to be Mel the Real Programmer after all.

I just completed “Custom Customs” - Day 6 - Advent of Code 2020 adventofcode.com/2020/day/6 in .

Every day, while implementing Part 2, I end up with a more elegant neater way of doing Part 1. Never occurs to me while doing Part 1 itself - probably because I come up with an idea while reading the question and rush to implement it, not stopping to think of other ways of doing it .

toy prog challenge solution 

Did the subset sum challenge today, in . Code here. I used to get stuck with dynamic programming problems, finding them hard to reason about, so it was pleasant to find that with this one the logic flowed nice and easy. Typing in the test cases and getting the test setup going took up more time than actually solving the problem itself!

Show thread

I just completed “Toboggan Trajectory” - Day 3 - Advent of Code 2020 adventofcode.com/2020/day/3 using

Lessons (re-)learnt:

  • did you know that example data is also data? I’d forgotten it! Using that for testing made things easier - when I finally thought of it - since it’s so much smaller and easier to eyeball.
  • Julia’s dynamism came back to bite in the usual way it does - since there’s no variable declarations required, when I messed up a variable name change and left the old name in in some places, Julia was happy to treat those as two separate variables and end up with weird results.
  • Repl.it has a decent mode, but is otherwise a pain to use; it messes with outputs and makes error messages so much harder to read.
  • Good practices are good practices for a reason. Magic numbers and baked-in literals are fertile grounds for bugs, even in little one-off projects like this.
  • Naming things is hard!

I just completed “Password Philosophy” - Day 2 - Advent of Code 2020 adventofcode.com/2020/day/2 using .

Day 2 was kind of a letdown. The problems felt particularly pointless, and there was no thinking or creative problem solving required; just look up some functions in your language’s manual and then it’s just nitty gritty work.
Let’s hope Day 3 has something fresh and interesting!

digital_carver's choices:

Qoto Mastodon

QOTO: Question Others to Teach Ourselves. A STEM-oriented instance.

An inclusive free speech instance.
All cultures and opinions welcome.
Explicit hate speech and harassment strictly forbidden.
We federate with all servers: we don't block any servers.