Finding long running requests in HAProxy

Sometimes at Tumblr, I have to do some work with long running web requests, and sometimes catching them in the logs can be difficult. We run HAProxy with httplog turned on, and as you can guess, we get quite a bit of traffic running through these.

So I just wrote a small awk one liner to help me jump through these logs and quickly find requests that were greater than 1 second.

Check it out.

Some people say I like awk too much. I say, they don’t like awk enough.

Knowledge Bias Bites Us All

Recently, I was called out on an open-source project for having inadequate documentation on how to issue commands against an API. My initial reaction was, to say the least, quite childish.

"Absolutely not. No way. My documentation is totally perfect! Anyone who couldn’t figure this out is just stupid. Come on! Read the code! Code is its own documentation!", I thought somewhat angrily as I read the Github issue.

I realized though, that I’m the one who really needs to take some time to step back. Someone asking me for help about something they don’t understand is nothing to get upset about. It’s someone reaching out on the internet to build something, just like me!

You see, I built the library that was brand spanking new to this anonymous person on the internet. I had knowledge bias, and that bias was alienating someone from being involved with my library. Hell, I’m quite aware of knowledge bias, and it still jumped up and bit me.

I think this gets worse when you have software engineers who are laboriously crafting over something to make it perfect. We’re struggling for hours to build something that will be awesome, amazing and pretty much the best damn thing there is. (Well, until someone else builds it better) We are trying so hard to push forward that we forget, there are people still trying to figure which way is up.

So, the question is, “What do I do now?

I wrote some damn documentation. I swallowed my pride and added more docs. I even went above and beyond a bit, just to prove to myself that I’m not that kind of an engineer, hell, not that kind of person. I can safely say though, my project benefited¬†from someone being upset about documentation. That’s the amazing experience of open-source.

I’m not ashamed that it happened, but I am a bit upset that I fell into that trap.

Knowledge bias, can bite us all.

$p = new Post(); $p->publish();

I’m a 25 year old programmer who spends a lot of his time in front of a glowing terminal, repeatedly pressing “i” and escape in repeating patterns. Putting text in a precise order on that glowing screen for other people to emote about. I say “emote about”, because regardless of their actual emotions, no one is ever going to love everything I do but the fact that they comment on it is amazing.

It’s pure magic. Building things, digital or not, is pure magic.

I’m writing this currently from a hackathon, where people are busily coding away in their favorite language to create something and show it off to their friends. This is the kind of culture I love being around. People that are thrilled to build the magic, hook the pieces together and make someone else smile.

I’ll never forget one of my first computer class in college where a professor dropped me in front of a terminal and said “Alright, here’s the terminal. It’s your best friend. Your assignment is due Friday. I suggest you figure out a way to get Linux on your laptops or in a virtual machine”. The fear was palpable in the room. All I could do was smile and dive deep into a world I had too little experience in. It was so exciting. I haven’t closed my terminal since.

This blog is going to be about my triumphs, my failures, things I love and hate, and everything in between. We’re going to try a weekly format for a little while and crank it up as we go along.

Enjoy.