Herding Lions

Hi! I'm Ben.

I make software in Durham, North Carolina. This is my site where I write about engineering leadership and productive product teams. If you're interested seeing more, feel free to subscribe.

First time on the site? Start here.


Adding RSS, Atom, and JSON Feed to Gatsby

For the last few months, this blog has been written in Gatsby, a static site generator for JavaScript. One of the first problems I had to solve when migrating the blog was how to maintain my RSS feed, since Gatsby doesn’t have any built in concept of an RSS feed. This issue came up again this …

Atom Productivity Tips

Atom is a modern hackable text editor. I’ve been using it as my primary editor for a year and a half, and have picked up some tips along the way that I thought were worth sharing. These tips assume that you have at least a passing familiarity with Atom: they’re the things that I’ve …

Mariana Syntax Theme For Atom

Sometimes the best thing to do is steal somebody else’s good idea. I’ve been using Atom as my primary text editor for a year and a half now, but I still occasionally play with other editors and keep up with their updates. There are a crazy number of good cross platform editors these …

Building Normal Distribution Charts Using Highcharts

This week I got to have a little fun remembering some High School math, and using one of my favorite libraries: Highcharts. Highcharts is a commercial JavaScript data-viz library, and it makes most standard charts and graphs a breeze to implement. I was using it to plot a normal distribution in …

Grading Applications On Config Portability

This week I got a new laptop, and for the first time in a while I have separate work and personal computers. One thing that this has made clear to me is that it is still non-trivial to keep settings and configurations easily up to date between 2 different PCs. In my experience there are several …

The Mystery Of Docker And The Disk-Eating Cow

Yesterday morning I was innocently minding my own business, downloading some files, when I noticed that nearly all the disk space on my 256GB work laptop had been consumed. This seemed rather unlikely to me, given that I’d only had the laptop for about a year and I didn’t store anything …

Running Jest Tests Before Each Git Commit

My main work project makes heavy use of Jest to test our JavaScript code. For a while now I’ve wanted to set up a way to run tests every time I run a commit. I knew that git provides hooks that allow scripting actions to occur before or after any commit or push, and in fact we were already using a …

Giving Context To Best Practices

I’ve noticed a frustrating trend in online discussions about web development where developers take their personal experience with a tool or practice and promote it as a universal truth. Some of this is the nature of being human: we all see the world through our own lens. But the best technical …

Evaluating Web Apps With Lighthouse

Last year Google coined the term “Progressive Web App” as a way of describing the type of sites and applications that they think are the future of the web. Progressive Web Apps are sites that load quickly, are always responsive to user input, work as well as possible offline, and …

MobX: First Impressions

I spent some time around the holidays this year playing with MobX, a state management library for JavaScript. MobX is an unopinionated library that provides a layer over normal JavaScript data structures that allow other code to efficiently observe data changes and update based on what has changed. …

Orthogonality and CSS in JS

One of the realities of the constant change in the web development world is that “best practices” are often hotly contested. One issue that the front end community doesn’t seem to have come to a consensus on yet is how tightly to bundle JavaScript, HTML and CSS in code. Should they …

2016 Roundup

Thanks to all of you who have followed my blog this year! It was a busy year and I didn’t get as many posts out as years past, but you all have been as supportive as ever. I’m excited about the things I’ve been able to do with the new site this month, and am looking forward to a …

What are Higher Order Components?

If you spend much time at all reading through articles and documentation around React, you’re likely to run into the term “Higher Order component”, often abbreviated HoC. Since it is often used without context in React discussions, and is not a particularly intuitive term for many …

Readable code: Know your audience

A coworker asked me last week if there was a better way to write the following python code: self.custom_attributes = { x.split(':')[0]: x.split(':')[1] for x in a.split(',') } I semi-jokingly replied that there were 3 better ways: For people who like comprehensions …

Saving Time With Jest: Meetup Summary

This week I gave a talk at the brand new Triangle ReactJS meetup group on how Jest can save developers time. I was asked afterwards to share the content online for those who missed it. My talk was mostly demos and wasn’t recorded, so there unfortunately isn’t much to share, but I thought …

A whole new site

After 2.5 years of stability, this week I moved benmccormick.org to a new platform and overhauled the look and feel. Although most readers have seen the site remain relatively stable, this is actually the 5th major revision of the site since it was first created, so this seems like a good time for a …

Testing with Jest Snapshots: First Impressions

Over the past 6 months my team at work has been slowly transitioning a large Backbone application to React. One of the main goals of the transition has been to build out unit tests as we transition components. As part of that we switched from using Karma to using Jest for managing our tests. Our new …

Quick Tip: Take advantage of lodash collections

One of the more frustrating things about using JavaScript in the browser is the number of different collection types that you need to deal with. When using native APIs and 3rd party libraries, it’s easy to encounter 3 or more different types of collections, including NodeLists, …

What are mutable and immutable data structures?

t Sometimes concepts and ideas slowly grow in a programming community, sometimes they seem to appear in a flash. For the first several years I wrote JavaScript, I don’t recall ever seeing anything written online about immutable data. Since React hit the scene in the last 2 years however, …

Digging Into React: Choosing Component Styles

Over the past month I’ve been building my first production features using React. One of the first things I’ve noticed is the amount of choices that come into a new React project. A lot of this is about the ecosystem around React (Webpack vs Browserify? Redux vs Relay? Do I need CSS modules or …

Ack Tips

Last summer I briefly considered creating a separate blog focused on command line tools. The idea is that the articles would be shorter and more practical than the longer pieces I write here. I ended up scrapping the idea, but had written a few posts on one of my favorite command line tools Ack, so …

Stability vs Decline

My post on the sad state of the Backbone ecosystem from this weekend was surprisingly popular. I got a lot of responses pointing out some things I got wrong, sharing my concerns, or pushing back on my main points. Objections to the post came in 2 primary forms, which I want to quickly address. The …

The Sad State of the Backbone Ecosystem

For the past 2 years, ~90% of my coding time has been spent working on a large scale Backbone.js app. In February 2014, the Backbone community was in a fairly good place. The core library had reached 1.0 the previous year and had a strong team around it. Marionette had emerged as a de-facto standard …

Staying Productive

I’ve been thinking a lot lately about what makes me productive vs unproductive. A lot of the time Software Developers tend to focus on their tools and environments when they think about productivity. I’m certainly all into that, as you can see if you look back, through, my blog. But in …

The Most Interesting Atom Packages I've found (so far)

I’ve been using Atom as my primary text editor for the last 3 months. I don’t completely love it. There are elements (startup speed, maturity of some core editing components, not being able to run it in a terminal) that I miss from my experiences with Vim and/or Sublime Text. I’m …