I turn back to my computer, and on my screen there’s a PDF that I’ve been wrestling with for the last two days. It’s supposed to be a list of grocery items, dynamically generated and populated with data from a customer’s order, but it’s not quite perfect. The page breaks are, well, broken, and the rows on the table have inconsistent heights. I entertain the thought that, hey, maybe this PDF doesn’t really need to look all that good, and that what’s important is that this thing is functional…

I sigh. It’s not good enough for me. I realize now that trying to generate a pixel-perfect PDF from an HTML document was probably not a good idea. I curse the CSS gods that be, scratch my temple, and open yet another tab of Google, hoping for some sort of answer.

I look over the table next to mine and see our CTO, Mike, with brows furrowed, typing away. He catches my look and understands immediately.

“Maybe you should try Prawn?” I Google Prawn and find that it’s a library perfectly suited for the sort of PDF generation that I’m trying to do. It’s conveniently supported by our software stack and is written in Ruby, a language that I’ve used exactly zero times in my life. I hastily decide after a few more minutes of searching that I have found my solution and that I should learn Ruby so that I can rewrite this whole thing from scratch. Feeling a mix of desperation and adventure, I also decide that I want to do this right now. This PDF feels like an itch on my mind, one that won’t go away until I finally get it right — the all-the-way kind of right, not the halfway-there, kinda-sorta right.

It’s a little past midnight and I’m not tired at all. Most people have left the office. I read an article called “Ruby in 20 minutes.” It’s a start.

Thankfully, Ruby turns out to be really similar to Python, a language that I do know in a little more depth. A lot of the constructs are the same, and even the syntax, too, is familiar. I immerse myself in documentation deep into the night, typing up expressions in the Ruby interpreter, reading articles about how to use Prawn and how to get it to do the things that I want. I fall into a sort of haze: my eyes glaze over and my eyelids droop a little, but my headphones are on my ears and the world falls away, lost to a lot of brow-furrowing, intermittent chin-scratching and relentless typing. In Prawn page breaks work, right out of the box. Tables are supported nicely. I want to bang my head on the table for trying to use HTML for this task first, but I don’t have time for that since there’s more code to write. On occasion I got up to pace and look out of the window a little. I can tell the sky is getting lighter and lighter.

At around 6 a.m. I have a (fully) working PDF. In the space of a few hours I learned enough of a new language and a new library to (finally) accomplish my task.

I sit back on my chair. Outside, the sun is breaking through, and the first few people to wake are walking up and down College Ave., starting their business for the day. I’m feeling tired now. My eyelids are heavy to the point where I can’t keep them up anymore. But I feel oddly satisfied, like an itch has been scratched, and I doze off wondering what new challenge is next.

Related

Despite partisanship and political sparring souring many Americans’ opinion of the government, young Cornell alumni who have entered the public sector say they have found meaning in their work. “I never thought that I would be working for the federal government, but I am so happy that I am,” said Mackenzie Wallace ’12, a financial analyst at the Consumer Financial Protection Bureau.

During the credit sequence that opens The Fifth Estate, virtually the entire history of information dissemination, from cave paintings to the printing press to the Internet, is condensed into three or four minutes. The average viewer might think this stylish beginning is cool, but one has to wonder what it has to do with the overall arc of the story.After all, though this is a film about the freedom of information dissemination, its focus on character’s lives is considerably more narrow — and certainly not large enough to merit an overview this expansive.