Tutorials · One Thing Well

The Unix Philosophy Applied to Front-End Engineering

In A Quarter Century of Unix (1994), Doug McIlroy wrote down three rules he’d been observing since the Unix days at Bell Labs: write programs that do one thing and do it well, write programs to work together, write programs to handle text streams. He was describing shell tools. He turned out to be describing good software in general.

The same failure modes McIlroy was reacting against show up in front-end code all the time: cascading styles where one change ripples through half the page, JavaScript functions packed with multiple concerns, CSS frameworks that force you to buy the whole system to get one piece. None of that was built badly on purpose. It got that way because there was no principle governing when to stop adding to something. The Unix rules are one such principle. They’re old enough to have been tested against real problems and short enough to keep in your head.

This series is 5 chapters. Each one takes one of McIlroy’s tenets, grounds it in a Unix tool you already know, then applies it to something concrete you’ll write: a custom property token system, a refactored JavaScript module, a component evaluated against all three rules. You don’t need a CS background. If you’ve worked through Front-End Fundamentals, you have everything you need to follow along.

  1. CH.01 The Philosophy
  2. CH.02 Do One Thing Well
  3. CH.03 Write Programs to Work Together
  4. CH.04 Text Streams and Universal Interfaces
  5. CH.05 Putting It Together