Maia McCormick

Programmer, writer, nerd

My name is Maia. I’m a programmer based in New York City, currently working as a software engineer at Spring. This is where I (somewhat infrequently) chronicle my journeys through code, as well as other vaguely related adventures.

What Are Interfaces?

This is a blog post about interfaces in Go. I wanted to write about a headscratcher that cost me several hours of work when I first started learning Go, and I figured I might as well start from the beginning and write the article on interfaces that I wish I had read back then. The story of my encounter with nil interfaces is coming soon, but for now, here’s a brief and hopefully accessible piece on interfaces in Go.1 So, without further ado, I give you…

What Is an Interface?

Coming from the dynamically-typed wild west of Python, one of the bits of Go that took the most getting used to was the idea of interfaces. An interface is a way of typing things according to their methods. If I want a function that can take any number of different types, so long as they have a given method (or two, or five) in common, I’ll want to use an interface to accomplish this (since I can’t pass in any old thing because of Go’s type safety rules). To give a concrete example, say I’ve got these classes:

Dig Yourself Out of a ‘Git Commit Amend’ Hole With Reflog

Raise your hand if you’ve ever git commit’d something you shouldn’t have. (It’s okay, this is a judgement-free space.)

And raise your hand if you’ve ever used git commit --amend --no-edit1 to try and hide your terrible, terrible shame. (We’re not even gonna talk about git push -f origin master. Don’t do it, kids.)

And raise your hand one last time if you’ve ever git commit --amend --no-edit’d and then paused and looked at your computer and were suddenly struck by the realization that you’d ruined everything.

That last one might be just me, but I’m going to pretend it happens to other people to make myself feel better. (Like all of those times I thought I was fixing a slightly incorrect commit, only to realize I had instead wiped out all of my latest work. Whoooops.)

28 Days Later: My First Four Weeks as a Junior Engineer at Spring

I came out of school with a BA in music, tripped and fell, and landed in the tech world. The folks at Spring took a chance on me as an extremely junior developer and offered me a job. I’ve been here now for a little more than two months, and I couldn’t be happier. Going into my first day at Spring (which also happened to be my first day as a software engineer, full stop), I was understandably pretty nervous. But I was also excited for what lay ahead, and Spring has done a fabulous job of easing me into my new life here. Here are some reflections on that first month (posted, er, somewhat belatedly), to give you an idea of what it’s like to be a new junior engineer at Spring.

Truthiness

Truthiness in Python is occasionally confusing. Obviously, False is false and True is true, but beyond that, what then?

None is always false–though this doesn’t mean that False == None, which is a mistake I made early in my Python career. I was confused by how a nonexistant list and an empty list were both falsey, and somewhere in my mind I thought that they were both None as well. Not so much.

OPW Retrospective

Three months later, I’m done with my OPW internship with GNOME Music.

I’ve learned that open-source contributing isn’t as scary and impossible as it once seemed, and that IRC is full of nice people who are happy to help! But I’ve also learned that diving into a new codebase is challenging, at best, and nearly impossible at worst. pdb, for x in dir(foo): print(x), traceback.print_stack(), and inspect.getargspec(myfunc) have become good friends of mine in the past three months. Good documentation, it turns out, is essential—the project I was working on had very little, and the libraries it utilized (at least, the Python wrappers for those libraries) were similarly sketchily documented, and all this made learning the code waaaaay tougher than it needed to be.

The Joys of SPARQL: An RDF Query Language

I’ve been working with SPARQL a bunch for my OPW project, and found it very slow going at first. SPARQL is apparently one of those little-loved languages that doesn’t have much in the way of tutorials or lay-speak-explanations online—pretty much all I could find were the language’s official docs, where were super technical and near-impossible for a beginner to slog through. Hell, I didn’t even understand what the language did—how could I read the technical specs?

The Best Thing I’ve Done for My Productivity Lately

But seriously. The best thing I’ve done for my productivity lately (besides blocking Facebook entirely on my work machine) is disabling my Facebook newsfeed (this is a Chrome extension, I’m sure there are various others for other browsers). Facebook is still a time-suck, but not the ENDLESS VORTEX OF DISTRACTION AND OOH A BUZZFEED ARTICLE that it once was. Pretty cool stuff!

Git 301: Changing History

Congratulations, you’ve made it through Git 101 (init, add, commit, log, status) and its slightly more difficult companion course, Git 201 (branch, checkout, pull).1 Are you ready to pull out the big guns? Here are a handful of commands I’ve been using lately, which I will now write about on the off-chance that they’re useful to someone else. Welcome to Git 301.

Selective Checkouts with checkout -p

Okay, this isn’t really changing history. But it IS a fancy bit of next-level gittery that I’ve found useful as I try to make my git history useful to others and actually move in a logical feature-by-feature progression, instead of reflecting my all-over-the-place, distracted workflow.

OPW: 1 Month In

For anyone who doesn’t know, this past December I started an internship with GNOME as part of OPW, the Outreach Program for Women. The point of this program is to get more women (by which they really mean cis woman and trans folks and genderqueer/genderfluid/agender folks… so basically, people who aren’t cis MEN) involved in the FOSS world. In my particular case, it certainly succeeded! I’d been meaning to do some open source contributing for a while, but had always been too intimidated and overwhelmed to start.

Rules for OPW

Rules and resolutions for myself during OPW:

  • wake up at the same time every day.
  • eat breakfast every day.
  • eat lunch. Seriously, eat lunch.