Advent of Code 2020 - Day 1

in   code   ,

If you haven’t heard of Advent of Code , it is an Advent calendar of small programming puzzles that run every year from December 1st through the 25th. This year, I was happy to have solved the majority of the puzzles on my own, with very little help from the subreddit.

Most of these puzzles can be solved in Python using only the standard library, and for some, it really boils down to parsing the input into a form that’s more suited for processing. Suffice to say, there are a ton of spoilers in this series, so if you want to avoid spoilers, look away now.

Read more →

Golang Vanity URLs in nginx

in   code   ,

Go has a nice way of importing packages, just use go get and it automatically appears in your $GOPATH/src directory. The backing store can be any supported VCS, but most often is GitHub. This means that your custom package will be namespaced under github.com/<user>/package. Wouldn’t it be nice if you could just namespace it similar to rsc.io/quote?

Read more →

Why programming is so hard

in   Code  

While a computer is simply a machine that takes in a series of instructions and executes them in order, most people have a hard time understanding this fact. As Arthur C. Clarke wrote

Any sufficiently advanced technology is indistinguishable from magic.

Arthur C. Clarke in Profiles of the Future (1973)

My observations from my own experiences appear to stand as evidence of the above statement.

Read more →