Learning Day: Recovery

This weekend I did one of my learning days but instead of my preferred aggressive pace I took it a little easier.

Due to a family emergency last week I have been stressed and a little upset this past week. Before you ask: I am fine, but that doesn’t mean that I am as put together as normal. I had already earmarked this Saturday to be a learning day and didn’t want to squander it, but I also knew I wouldn’t be able to focus as much as normal, so I chose to take a middle ground.

Instead of watching a day or two of conference videos on youtube I literally watched two videos (neither of which are worth linking to) and spent the rest of my time “sharpening” my leatherman.

I started by migrating, a few, of my OSS, packages into the leatherman. This simplifies things for me if I ever need to change the interface of any of them, and helps me ensure that everything gets the same care (like linting) I put into the leatherman.

Next I took a huge simplification pass on my netrc fork. It felt great.

I removed a silly dependency. I removed a less silly dependency too.

I migrated a bunch of non-Go html used in tests to testdata directories and then told github not to count them as my code.

I added some new tests. I fixed issues raised by a linter. I fixed a race condition that was detected by a test.

Finally, I spent a bunch of time migrating from TravisCI to CircleCI. I wouldn’t have done this except my Travis builds were failing in pathological ways that I couldn’t reproduce and word on the street is that the future of travis is uncertain anyway. If anyone is interested in the original failure, here’s the error I was getting:

# github.com/frioux/leatherman/cmd/leatherman
/home/travis/.gimme/versions/go1.12.2.linux.amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-147863353/000008.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Migration to CircleCI was annoying but generally it worked well and the resulting system is faster and more flexible than it was with Travis, so at least there’s that.

Depending on how I feel tonight I have other plans; I’d like to remove my dependency on github.com/headzoo/surf and refactor debounce such that it’s testable (without sleeps.) Both of those tasks are easy and the latter should produce much cleaner code anyway.


If you don’t already know Go, you should definitely check out The Go Programming Language. It’s not just a great Go book but a great programming book in general with a generous dollop of concurrency.

Another book to consider learning Go with is Go Programming Blueprints. It has a nearly interactive style where you write code, see it get syntax errors (or whatever,) fix it, and iterate. A useful book that shows that you don’t have to get all of your programs perfectly working on the first compile.

Posted Mon, Apr 8, 2019

If you're interested in being notified when new posts are published, you can subscribe here; you'll get an email once a week at the most.