After watching this fascinating talk by Sandi Metz, I want to discuss how we deal with abstractions that seem, at first glance, to represent nothing.

Nil and Null Objects

Nil checks are a notorious code smell. They propagate through a code base, forcing everything that touches the possibly-nil-value to include a nil check. To make matters worse, this nil value is completely meaningless. Does it represent a missing object? An invalid request? A data integrity issue? This is where the Null Object Pattern comes in.

Implementing this pattern requires you to clarify what your nil actually represents. The first questions is whether or not it is meaningful at all, or something you can simply ‘.compact’ away? A good litmus test for a meaningful nil is whether or not you try to send it a message. …

Reaching back to last week’s Elm minimax struggles to relay an important lesson about not being too stubborn to try things a new way.

I’d implemented the minimax algorithm before in Ruby, a language that cares about you and wants you to be happy. Elm is the opposite of Ruby. The language is designed in a highly opinionated manner, only implementing the features it believes you should use. So lists. That’s it. Non-list structures are second class citizens, with no literal notation and minimal functionality. …

As part of our time here in Chicago, we’re 🍐ing like crazy. I had my first round yesterday. It was pretty intimidating — new languages (coffee script and C#), new editor (vim), new OS (windows), new IDE (visual basic), and a new application I knew nothing about. I paired a lot in DBC, but that was mostly with others of my skill level. I’ve found pairing with more experienced developers an exceptionally valuable experience. Yesterday I was more of an observer than a collaborator, but I also learned a lot.

When I was still in Dev Bootcamp, some students and I were talking to a very senior developer at a networking event. We’d just come off a long, frustrating bug hunt for what turned out to be a trivial configuration issue. On of the other students asked how long before we’d stop losing days to things like that, before we’d feel like we know what we’re doing. The dev laughed and told us never, that he still had days spent in the same way we’d just spent ours. It’s simultaneously heartening and frightening to know that this still happens to even the very experienced. Tech might be the most mercurial field in the world right now, so if you’re not struggling with something new you’re probably not doing your job. This is one of the things that drew me to tech — the forward momentum and opportunity for constant learning — but on harder days it can also feel a bit Sisyphean. My favorite part of pairing yesterday was getting to see first hand how, while the need for grappling may stay the same, grappling skills improve with time, and attempts to understand difficult concepts and solve awkward problems become more deliberate and effective. …


Nicole McCabe

Apprenticeship Blog for 8th Light NYC.