code and plant advents

Last month, I participated in advent of code for the first time. Everyday from Dec 1st through 25th, a problem is released. Each problem requires some programming to solve, and is split into two separate but related parts.

The problem statements link to an overarching narrative involving a character going on vacation and encountering a number of technical difficulties, e.g. implementing a ticket reader for the train or a fixing the boot code in your neighbours airplane video game console.

It was good to do some problem solving practice in this fun semi-communal way - discussing with others after was half the fun. The problems are a race to solve, but I approached it as just trying to solve them throughout the month and not really caring about my rank.

I took the opportunity to learn some new language syntax and improve on my existing knowledge, doing the first 10 different problems in 10 different languages (or at least, file extension types :D)

  • python - classic
  • typescript - love it
  • bash - do not love it, but respect it
  • scala - love it
  • javascript - naked typescript
  • racket - new to me, my first foray into Lisp, and loved it
  • go - new to me, easy to learn syntax, generally enjoyable
  • clojure - new to me, but easy to learn and use after Racket
  • elm - new to me, hard to setup to just run scripts, enjoyable to learn and use after setup
  • rust - good refresher, actually got some better insight into mutability/move/borrow and stuff this time around

After the first 10, I switched to using Python for the rest in order to get through them in a reasonable time.

I went camping for the last half of December. The night before I left, I nailed the first half of Problem 20 (the seamonster problem), finishing sub-800! Confidence bolstered, I was then destroyed by the 2nd half of the problem, and had to leave defeated :). I plan to finish the last 5.5 problems before this December rolls around.

It was also the time of year again for my friend’s annual gift exchange, for which I was determined to gift another website.

I got my friend Matt’s name out of a hat. Matt primarily loves bikes and plants, and I went with plants.

The result is matt.garden, an interactive, animated, svg-laden 10 day advent calendar of plants, many of which Matt has in his real garden.

matt-garden.png

It was super fun to build, and involved way more art than code in the end. An artiste, I am not, so I watched a lot of Inkscape and design tutorials on youtube and did my best to keep things simple and cute.

Inkscape is awesome - free and open source software, quite capable and performant, XML editor for adding class and id to groups and elements for easy css animation, and generally just a pleasure to work with.

It was fun to learn css animation more in depth too! I may have gone a bit overboard with it - things look a bit janky on my Brave browser in desktop, but Safari on mobile seems to take it all in stride.

Overall, a good month of daily activities to finish out 2020.