Summer begins

Joshua Tree, Jumbo Rocks, Justin Joshua Tree, Jumbo Rocks, Justin

Yes, technically the summer solstice isn’t until the 20th. But my summer internship officially began on Monday of last week, and Memorial Day in the US was this past Monday. Justin and I spent a couple days in Joshua Tree and the Coachella Valley this past weekend. It’s June now, and June == summer.

I’m overjoyed to be working on Homebrew this summer. To embrace a cliché, 2016 so far seems to be all about pushing outward my comfort zone. It never before occurred to me to even look at Homebrew code (even though it’s written in my beloved Ruby), and even as I became acquainted with the idea of working on Homebrew for Outreachy, I was hesitant and not confident in my ability to contribute.

But the Homebrew maintainer-mentors have all been so incredibly generous, encouraging, kind, and helpful to me over the past couple weeks and months. I’m so thankful for this generosity and for nabbing the Outreachy internship. In the space of two months, I’ve become an active member of several wonderful, worldwide communities – the community of Homebrew contributors, the Outreachy community, and the wider open-source software community. I’ll be attending Code Conf at the end of the month (for free, right here in LA!) and I’m excited to attend another conference within the next year (thanks to the stipend that Outreachy gives to each intern).

So what have I been doing for the past week and a half? So far I’ve only managed to have one lone pull request merged into the Homebrew/brew repository (more on this in a later post). In that pull request, I added an assertion to the integration test for brew home that completes its test coverage, but it’s only a couple lines of simple code! And embarrassingly enough, I’d commited a few preventable mistakes in the process of that pull request – namely, forgetting to include the requirement for Homebrew/formula.rb to be included in the tests file. (That requirement is what allows the tests file to run Formula["testball"], since Formula.[] is defined in formula.rb.) Thankfully, Martin added it back for me. The rest of the newly added code (detailing the creation of formula_file and its subsequent unlinking) was taken directly from the existing test for brew desc.

Speaking of brew desc, I’ve just submitted a pull request to update its test coverage. Looking forward to getting feedback. More on this in the aforementioned later post.

That doesn’t sound like a lot of work, does it? Perhaps not, but I should say that for the 10-11 weeks preceding the middle of last week, I had no idea whether I was fit for the task of writing tests for the Homebrew codebase. I’d grown comfortable with modifying Homebrew core formulae, but the core of Homebrew itself seemed imposingly, vastly unknowable to me. In retrospect, it was like facing a huge boulder, unable to see a way forward.

My previous post on Homebrew was only meant to be a few paragraphs in an email to Justin. It quickly ballooned as I gave closer examination to concepts that I still only vaguely understood. As one thing lead to another, I ended up spending hours, probably days, searching for and further researching those concepts. That about describes the process I’d undertaken to work on and submit changes for Homebrew formulae, too (before the internship began). And much of the internship so far has seen the same – hours, afternoons, days spent chiseling and whittling away at that humongous boulder.

It’s been a process of gradually demystifying a massive codebase, and it feels ironic that days and weeks of reading and researching have only yielded to a few new lines of written code! All that reading and research probably weren’t even necessary to know how to write that code! That’s OK, though. Getting to know Homebrew’s DSL and inner workings wasn’t simply a matter of just “reading the docs”, but rather an immense amount of reading, re-reading, taking notes, asking questions, and trying things out in the shell, brew irb, and pry.

Homebrew’s share docs have yielded a wealth of information and context, but it was necessary for me to supplement them with frenetic Googling, clicking, and skimming numerous other resources. I do appreciate the fact that the mammoth Formula Cookbook helped introduce me to things I wouldn’t have known how to know, both within and without the context of Homebrew – things like how heredocs are used, the names of various open-source compilers, and WTH head is.

Since I’m new to computer programming, I’m already relatively slow to understand Homebrew’s public API and the code for Homebrew’s commands. It hasn’t been easy to understand the big picture behind the various pieces of documentation, but maybe someday I’ll be in a position to help improve these docs someday.