Crash

Fred’s post on the Zen of Erlang is delightful. Fred (the author of ‘Learn You Some Erlang for Great Good!‘) does a fantastic job of explaining how Erlang embraces failure and crashes, and how it provides abstractions to deal with these so that the programer can focus on core application logic. Even if you don’t use Erlang the post is full of good software architecture patterns and principles that can be applied to any programming language and software project.

This post is making me question my decision of focussing solely on learning Rust this year.

 

Bisect

Have you ever been in a situation in which something has “gone wrong” (intentionally vague) between two git commits, say c1 and c2, and you’re trying to figure out which commit caused the issue? In other words, your code works fine at c1, but not at c2. Thus, a commit in the range (c1, c2] resulted in your code being in a “bad” (for some definition of “bad”) state.

One approach is to look at all the commits between (c1, c2] and see if any commit stands out as something that might have caused the issue. But there are times when looking at the changes is not enough, or it’s not clear why any of the changes would have broken anything, and you need to do some other work (run integration tests, run performance suites, run UI tests, etc.) in order to pinpoint the breaking commit.

“Why, this seems like a perfect opportunity to use binary search to figure out which commit caused a problem! All I need to do is a binary search in the range (c1, c2]. For a particular commit in this range (starting in the middle) I simply need to git checkout the code at that point, do whatever work I need to (explained above), and then make a decision on whether I need to search in the ‘upper half’ or ‘lower half'”

Enter git bisect. It allows you to focus on what went wrong, without having to manage the git + binary search state. In our scenario we’d simply mark c1 as a good commit, and c2 as a bad one, and then let git bisect work its magic in enabling us to discover what went wrong between (c1, c2].

I love git.

What I’m currently listening to: Massive Attack and White Moth Black Butterfly

Massive Attack’s newest album Ritual Spirit came out recently and it is full of gorgeous tunes.

White Moth Black Butterfly is the side project of Daniel Tompkins, one of my favorite vocalists. His voice is astounding and never ceases to amaze me.

Goal Tracking: January Edition

At the beginning of the year I published a post outlining what some of my goals for the year were. In the spirit of being transparent, here is the progress I made on them over the course of January –

  1. Due to personal reasons I don’t think I made myself as available as I could have. I’m sorry. 
  2. Zero volunteering done in January. I’m disappointed that I missed this goal in the very first month of the year.
  3. Made good progress on keeping the procrastination down to a minimum (I’d say almost zero procrastination).
  4. Was completely honest and open throughout the course of January. Almost painfully so.
  5. I realized that my Rust skills were a bit…rusty. I re-read the first two chapters of the Rust book.
  6. I read 4 books over the course of January: Seveneves (I really enjoyed it. The second half of the book was fantastic), The Sandman, Vol. 2: The Doll’s House (excellent. This series is so good!), The Complete Maus (no book has made me cry so much. This is my favorite book of all time), and Kafka on the Shore (very enjoyable and probably my favorite story by Murakami so far. I added numerous lines from this book to my list
  7. I read 3 research papers: Hekaton, f4, and Borg.
  8. I wrote 15 blog posts.
  9. Made good progress at playing the guitar. I started a separate website for tracking this.
  10. (a) Did not run an 8 min mile. In fact the best I did this month was 9m50s.
    (b) Made very good progress at doing a handstand. I’m fairly confident I should be able to do one by the end of February.
    (c) Managed to squat 285 lb. ~15 more lb to go!
    (d) Did not run any half marathons.
    (e) Managed to do one muscle up with +20 lb on me. Yay goal achieved!

Love

I love reading. I really do. I love how books allow me transcend my current physical and mental state and enter new realms. I love experiencing the world through the eyes and mind of another. I love how the words speak to me.

A few months ago I started writing down lines from a book I was reading. These were lines that I felt were exceedingly beautiful, or that simply appealed to me at that moment in time. This has now turned into a habit for every book that I read.

The line that started this all? It’s from The Brief Wondrous Life of Oscar Wao:

It’s never the changes we want that change everything.

 

 

Drive

(somewhere along the I-280)

“If you could have one super power what would it be?”

“The power to control electricity.”

“Really?”

“Yeah. Think about it. Almost everything around us is controlled by electricity in some form. If you could control electricity you could control everything.”

“Hmm. Interesting. I’d love to have the power of teleportation. That would be so awesome! You could just teleport to Mars!”

“But the lack of atmosphere would kill you.”

“Nah I’d be wearing a suit.”

“Make sure to wear a nice tie as well.”

“Heh. But come to think of it time travel would be a sweet power to have as well.”

“Why didn’t I say that? It is something I’ve thought of in the past. Quite a bit in fact. I change my answer to total control over the flow of time. And the ability to move forward and backwards in time.”