Howdy!

Welcome to my blog where I write about software development, cycling, and other random nonsense. This is not the only place I write, you can find more words I typed on the Buoyant Data blog, Scribd tech blog, and GitHub.

Adios Drupal

If you’ve seen a recent flood of backlogged blog posts of mine in your feed reader then I sincerely apologize. I finally pulled the trigger on switching from Drupal, the fantastic CMS, to Jekyll, a fantastic site generator.

Read more →

Learnings Week 19 2011

I saw this on another person’s blog and I figured I’d give it a try. I’ve been keeping a note in Evernote this week with all the little interesting tidbits I’ve learned this week. Nothing major or ground-breaking, just little facts and snippets of information I was fortunate enough to absorb over the course of the week.

  • How to use “gemsets” with RVM effectively thanks to this blog post which compares it with Python’s virtualenv tool
  • CalTrans runs a Bike Shuttle from the MacArthur BART Station in the east bay to the Transbay Terminal in San Francisco during rush hour commute times. The cost, $1.00 (for reference Ashby -> Downtown SF is a $3.50 ticket)
  • Provided you give Wells Fargo enough lead-time (about a week), they will order you a stack of $2 bills ($200)
  • Using elinks with Tor is fast enough to make browsing with Tor not completely painful
  • Most single-window WebKitGTK+ browsers (vimprobable2 comes to mind) don’t do proper certificate checking, making you extremely vulnerable to man-in-the-middle attacks, particularly with misbehaving exit nodes on Tor
Read more →

New Light on Dark Energy

Last night I was fortunate enough to squeeze into a packed house in the Berkeley Repertory Theatre for a panel titled “New Light on Dark Energy”. Suffice to say, I was thrilled about the entire event, I didn’t expect such a massive line and a filled 600 seat theatre.

Folks lining up for the Dark Energy panel

After I managed to grab one of the last three or four open seats in the audience for the two hour long series of presentations and Q&A session.

Dark Energy seminar is FULL

During the Q&A session I managed to get up to a microphone to ask a softball question to the panelists: “If we could give you an infinite supply of funds and grad students, what would you focus on to identify ‘Dark Energy’ in your life time?” Panelist Greg Aldering had a fantastic response that ellicited a number of laughs and sad-pplause from the audience (paraphrased) “The concept of infinite resources is more mind boggling to us than any of the stuff we’ve talked about tonight.”

The night was a blast, if you’re in the Bay Area I highly recommend you check out the Friends of the Berkeley Lab newsletter and attend some of their seminars and panels in the future.

SCIENCE!

(full flickr gallery here)

Read more →

Sent from my iPhone

This gif is stupid

Since moving to Berkeley a little under a year ago, I’ve started to have a commute. A good and proper, bored to tears commute via BART. A commute combined with a proper smartphone means I spent the first and last 40 minutes of every single workday answering emails and reading reddit.

While firing off some emails this evening I noticed the signature I added a long time ago: “Sent from my Nokia n900

Originally I added the signature as a caddy jab at iPhone users who have had the “Sent from my iPhone” appended to every email sent from the device going back to January of 2007. The more I started to

over-analyze

think about it, these signatures actually make a lot of sense and should be included on just about every device that offers a limited email client.

If for no other reason than to inform the reader(s) of the email that it might suck, for a number of legitimate reasons.

Goddamn autocorrect: sending a grammatically flawness email from a smartphone is impossible. Invariable an phone will auto-correct “schmidt” to “schlong” and all of a sudden you look like a moron. Having a “Sent from my mobile device” footer is like a disclaimer. To whom it may concern, my email may be riddled with mistakes, you’ll have to forgive me, I’m walking down the street responding to emails that could probably wait.

Top posting: for the record, I hate top-posts and typically try to avoid them at every turn, for reasons that I won’t go into in this post. If your top-posted message contains your “mobile disclaimer”, it’s acceptable. Trying not to top-post on smartphones these days is near-impossible, so nobody will think any less of you.

Brevity: let’s face it, there’s a lot of extra words in sentences that exist purely to provide some inter-personal lubricant. “Hey Jared, would you mind checking on those services running on those machines when you get a chance, thanks, love you too, etc.” When emailing on the go, particularly when you’re in an on-call situation, brevity is key (especially if somehow your production machines are offline). “Check services on machines 1-12” without the mobile disclaimer might make the reader think I’m an impatient twat (I am, but irregardless), instead of being strapped for time.


On the flip-side of all these reasons, if you’re using a desktop/web client, I expect you to put as much thought into composing your email as you expect me to put into reading it. You know who you are.

Read more →

S.A.D. - Seasonal Ada Disorder

Last Sunday, I announced the “0.1” release of my memcache-ada project on comp.lang.ada, thus ending a 2 month experiment with the Ada programming language.

In my previous post on the topic, I mentioned some of the things that interested me with regards to Ada and while I didn’t use all the concepts that make Ada a powerful language, I can now confidentally say that I know enough to be dangerous (not much more though).

Old school
This is what my coworkers thought of me, learning Ada.

All said and done I spent less than two months off and on creating memcache-ada, mostly on my morning and evening commutes. The exercise of beginning and ending my day with a language which tends to be incredibly strict was interesting to say the least. Due to the lack of an REPL such as Python’s, I found myself writing more and more unit and integration tests to get a feel for the language and the behavior of my library. Due to my “fluency” in Python, I tend to think in Python when scratching out code, similar to how a native speaker of a language will write or speak “from the hip” instead of doing large amount of mental work to construct statements. With Ada, not only am I not yet “fluent”, the langauge won’t let me get away with as much as Python allows me.

The overhead of writing Ada, in my opinion, is a double-edged sword, I can very quickly informally test, debug and rewrite Python but with Ada such a process is (in my opinion) onerous. My 20 minute walk to the train station would be spent contemplating how and what I wanted to write and where. By the time I sat down on the train, I had thought out and designed things internally, so I would immediately write out tests around my ideas and assumptions before writing code to pass the tests. The time spent writing code was minimal since I rarely had to rewrite code, I can think of only one function that had to be rewritten after it had passed tests (botched some socket reading) in the whole project.

I’m not yet sure what will be my next project in Ada, I am certain that I don’t want to build anything of consequence in C again. Working with a language, like C, that not only gives you the rope with which to hang yourself but will often times push you off the chair is more masochism than I feel comfortable with these days. Ada on the other hand will allow you to hang yourself, but it’ll make damn certain that have the perseverence to go through with it. Frankly, I don’t have that kind of drive to really shoot myself in the foot anymore. I want to build software that works with a language that doesn’t want to make me suffer, which means I’ll be in a weird Ada + Python love triangle until future notice.

Read more →

Catch me at SCALE!

This is a cross-post from another silly blog I run calledOMG! SUSE!

Let’s all pretend I have a Geeko-related pun for “SCALE.” Anyhoo, SCALE, otherwise known as the Southern California Linux Expo, is coming up in February (25th - 27th) and yours truly will be present and accounted for.

Tickets to SCALE!

Yes, those are bus tickets you see there. I will be heading down from Oakland to Los Angeles by bus instead of flying for ideological reasons, so I’ll try to be in a good mood when I arrive!

At this year’s SCALE, the openSUSE project is making a big splash. Contributors and ambassadors will be showing up from all over the globe to show off openSUSE, talk nerdy, socialize and eat tasty snacks supplied by Cruise Director, GNOME Accessibility contributor and openSUSE Board Member Bryen Yunashko, who just got his annual haircut in preparation for the momentous occasion! ;) If you’re in the area, check out this amazing speakers listing and be sure to register as soon as possible!

I’ll be covering the specifics of SCALE more in the coming weeks on OMG! SUSE!, so stay tuned and I hope to see you there!


Read more →

Twenty Eleven

I wanted to wish everybody foolish enough to keep my RSS feed in their news reader a happy twenty eleven from Victoria, Canada. While I won’t do a big 2010 “year in review” style post, I wanted to point out some milestones the year has had for me:

  • In 2010, I became a married man. Hooray new tax status!
  • In 2010, Slide was acquired by Google, giving me the liquidity to use previously purchased stock to buy a nice BLT sandwich on Wed. September 15th.
  • In 2010, my lovely wife finished her paralegal studies. Bringing her degree count to two, eclipsing my zero.
  • In 2010, I moved from San Francisco to Berkeley, adding two more modes of transportation to my morning commute
  • In 2010, I managed to not die in any fashion, comically or otherwise.
Empress by Night
Read more →

Ada? Surely you jest Mr. Pythonman

The past couple weeks I’ve been spending my BART commutes learning the Ada programming language. Prior to starting to research Ada, I sat in my office frustrated with Python for my free time hackery. Don’t get me wrong, I love the Python language, I have enjoyed the ease of use, dynamic model, rapid prototyping and expressiveness of the Python language, I just fall into slumps occasionally where some of Python’s “quirks” utterly infuriating. Quirks such as its loosey-goosey type system (which I admittedly take advantage of often), lack of good concurrency in the language, import subsystem which has driven lesser men mad and its difficulty in scaling organically for larger projects (I’ve not yet seen a large Python codebase that hasn’t been borderline “clusterfuck”.)

Before you whip out the COBOL and Fortran jokes, I’d like to let it known up front that Ada is a modern language (as I mentioned on reddit, the first Ada specification was in 1983, 11 years after C debuted, and almost 30 years after COBOL and Fortran were designed). It was most recently updated with the “Ada 2005” revision and supports a lot of the concepts one expects from modern programming languages. For me, Ada has two strong-points that I find attractive: extra-strong typing and built-in concurrency.

Incredibly strong typing

The typing in Ada is unlike anything I’ve ever worked with before, coming from a C-inspired languages background. Whereas one might use the plus sign operator in Python to add an int and a float together without an issue, in Ada there’s literally zero auto-casting (as far as I’ve learned) between types. To the inexperienced user (read: me) this might seem annoying at first, but it’s fundamental to Ada’s underlying philosophy of “no assumptions.” If you’re passing an Integer into a procedure that expects a Float, there will be no casting, the statement will error at compile time.

Concurrency built-in

Unlike C, Java, Objective-C and Python (languages I’ve used before), Ada has concurrency defined as part of the language, as opposed to an abstraction on top of an OS level library (pthreads). In Ada this concept is called “tasking” which allows for building easily concurrent applications. Unlike OS level bindings built on top of pthreads (for example) Ada provides built in mechanisms for communicating between “tasks” called “rendezvous” along with scheduling primitives.

Being able to define a “task” as this concurrent execution unit that uses this rendezvous feature to provide “entries” to communicate with it is something I still haven’t wrapped my head around to be honest. The idea of a language where concurrency is a core component is so new to me I’m not sure how much I can do with it.

For my first “big” project with Ada, I’ve been tinkering with a memcached client in Ada which will give me the opportunity to learn some Ada fundamentals before I step on to bigger projects. Disregarding the condescending jeers from other programmers who one could classify as “leet Django haxxorz”, I’ve been enjoying the experience of learning a new vastly different language than one that I’ve tried before.

So stop picking on me you big meanies :(

Read more →

GNU/Parallel changed my life

The @Apture ElephantsOver the past month or so I’ve fallen in love with an incredibly simple command line tool: GNU/Parallel. Parallel has more or less replaced my use of xargs when piping data around on the many machines that I use. Unlike xargs however, Parallel lets me make use of the many cores that I have access to, either on my laptop or the many quad and octocore machines we have lying around the Apture office.

Using Parallel is incredibly easy, in fact the docs enumerate just about every possible incantation of Parallel you might want to use, but starting simple you can just pipe stuff to it:

cat listofthings.txt | parallel --max-procs=8 --group 'echo "Thing: {}"'

The command above will run at most eight concurrent processes and group the output of each of the processes when the entire thing completes, simple and in this case not too much different than running with xargs

With some simple Python scripting, Parallel becomes infinitely more useful:

python generatelist.py | parallel --max-procs=8 --group 'wget "{}" -O - | python processpage.py'

There’s not really a whole lot say about GNU/Parallel other than you should use it. I find myself increasingly impatient when a single process takes longer than a couple minutes to complete, so I’ve been using GNU/Parallel in more and more different ways across almost all the machines that I work on to make things faster and faster. So much so that I’ve started to pine for a quad-core notebook instead of this weak dual core Thinkpad of mine :)

GNU/Parallel Demo

</param></param></param></embed>
Read more →

Experimenting with reddit's self-serve ads

A couple weeks ago I decided to try out reddit’s self-serve advertising system for one of our products at Apture: the Apture Highlights browser extension. While I am an Apture employee, I’ve also turned into a rabid user of our browser plugin while browsing the web, I’ve found it to be perfect at answering a number of quick questions like “what does this word mean?” or “who the hell is this?” In a mix of curiosity regarding reddit’s advertising system and advocacy for our browser extension, I decided to run a trial campaign on reddit.

Looking up 'Voyager' with Apture

If you’ve not been exposed to reddit’s self-serve advertising platform, here’s a quick overview. The entire system is bid-based, with minimum bids starting at 20 USD a day. Ads are created by users (like me) and submitted for approval with tentative dates. Once the ad is approved by reddit, it is scheduled to run on a particular day. From my understanding of the system, the number of impressions given to your advertisement is based on your bid and the demand for ad impressions on the given day. On top of this basic structure, you can run advertisements “targeted” to a specific subreddit or reddit-wide.

For the purposes of my campaign, I wanted to try both reddit-wide and targeted ads, for my targeted portion of the campaign I ran my ad for two days on the /r/todayilearned, a subreddit with nearly 80,000 subscribers who all are looking to share an interesting nugget of information that they have learned today. In addition to targeting the ad to the specific subreddit, I tried to make the copy of the advertisement as compelling as possible for my potential clickers:

Add more TIL to every thread on reddit with the Apture Highlights browser extension

(note: The acronym “TIL” generally is used as a substitute for “today I learned” in threads on reddit)

This ad ran for two days on /r/todayilearned and for one day reddit-wide, bringing my total campaign expenditure to $60. The breakdown in numbers is as follows:

Impressions (unique -> total): 21,420 -> 141,037 Clicks (unique -> total): 146 -> 157

While the click-through rate is frustratingly low, what I found astonishing was the huge disparity between unique and non-unique impressions. What that indicates to me is that readers have a tendency to refresh a page (such as the subreddit homepage) a number of times during the day.

What you cannot tell from those numbers above is how many of the clicks came from the targeted placement (/r/todayilearned) versus the reddit-wide run. When the ad ran reddit-wide it received zero-clicks, not only did the targeting to /r/todayilearned garner more repeated (non-unique) impressions, it received all of the clicks received throughout the entire campaign.

The big take-away lesson for me from this brief trial advertising on reddit was: avoid reddit-wide advertising. Finding a subreddit with a large number of passionate users isn’t that difficult, so you should be able to identify a subreddit that overlaps with your target market and advertise to them specifically. Other than that, I don’t have any great “analysis” to offer, it was an interesting experiment but not a rigorously scientific one.

If you’d like to download the CSV with the data from the campaign, you can grab that here. The columns are: date, impression_unique, impression_total, click_unique, click_total, clickrate_unique, clickrate_total.

Read more →