Reflections on craft.

The Misunderstood Art of Delegation

One of the most-misunderstood skills of a manager is delegation. Before becoming a manager myself, I had the common impression that delegation is when your boss gets you to do their job so they can go take 2-hour lunches. It turns out that’s only half true: delegation is about your manager getting you to do some of their job. But I’ve come to see how delegation is so much more than that: it’s the engine of individual and collective growth within an organization.

Continue reading...

My Favorite Quiet Places to Work in Indianapolis

After reading Deep Work, a compelling case for the power and necessity of focus toward doing our best work, I began to realize just how distracting the modern office—especially the open-plan ones—can be. So I decided to experiment with working from somewhere else. I began searching for quiet, public spaces in the city and was surprised and delighted to discover these gems.

Continue reading...

Tips for Naming

Naming things is famously one of the two hard things in computer science. The humor in this adage derives from the fact that naming seems like it should be easy. And yet, most of us can relate to the importance and difficulty in coming up with good names for objects and concepts in our code.

Continue reading...

Using Ecto Schemas with Database Views

Database views are a great way to provide a simplified abstraction over complicated data logic. They provide a way to treat a complex query as if it were a simple table, and with no extra work, you can build Ecto schemas on top of database views to bring the power of that abstraction into your Elixir code!

Continue reading...

Elixir In Action

I just finished Saša Jurić’s excellent Elixir in Action published by Manning. I’ve been learning Elixir for about six months now, having learned the basic concepts and syntax from Dave Thomas’s Programming Elixir, which is a great introduction to writing Elixir. But I still lacked an understanding of how to build with Elixir, specifically how to create, structure, and deploy OTP applications, set up supervision trees, and leverage the power of concurrency and distribution. That’s where Elixir in Action was the ideal next step.

Continue reading...

Optimize for Deletion

I just watched Greg Young’s talk The Art of Destroying Software. It’s a compelling, unconventional argument for changing the way we write code to maximize our ability to delete it. Young’s rule of thumb is 1 week: don’t write any self-contained part of your system that would take more than a week for someone unfamiliar with it to rewrite from scratch.

Continue reading...

Coders At Work: Reflections on the Craft of Programming

I’ve recently worked my way through Coders At Work: Reflections on the Craft of Programming, Peter Seibel’s oustanding collection of interviews with some of the industry’s most experienced programmers. Published in 2009 but featuring practitioners who’ve been working for decades, it’s full of wisdom both current and timeless on the craft of building software. Here are some of my favorite ideas from the book.

Continue reading...

Testing current_user In a Phoenix App the Easy Way

One of the things that’s drawn me to Elixir is how well it lends itself to test-driven development. But while testing a controller action in an Elixir application using Phoenix, I ran into a problem familiar from Ruby/Rails: how to test a controller action that requires authentication, i.e. that requires a current_user present.

Continue reading...

Simple Made Easy

We need to build simple systems if we want to build good systems.

—Rich Hickey

I’ve been rolling Rich Hickey’s talk, “Simple Made Easy,” around in my head for a while. At heart, it’s about how to write simpler software, which we all want to do, right? But our software and systems somehow end up complicated—buggy, hard to learn, and hard to change. The reason, Hickey suggests, it because we fall into the trap of mistaking simple with easy. Before his talk, I’d considered them synonyms, but the difference is crucial.

Continue reading...