Search IconIcon to open search

Software Principles

Last updated Feb 20, 2022 Edit Source

A Pattern Language for developing software

Inspired by Urbit Precepts

  1. Local first. Decentralized/distributed systems second. Make self-hosting easy
  2. Apps should be treated like queries – stateless. Local state should be avoided as much as possible, database is the source of truth.
  3. There is a latent cost to new features: maintenance
  4. Design with the goal of making atomic and reusable libraries (allow for emergent behaviour)
  5. Heuristics should only be used where determinism is infeasible
  6. Code courageously. “It’s natural to feel fear of code; however, you must act as though you are able to master and change any part of it. To code courageously is to walk into any abyss, bring light, and make it right.”
  7. Apps should embrace gradual enrichment, composing smaller features to form more complex ones when necessary
  8. Dump the parts bucket onto the floor. As a first act before starting to build, a child will often spread out all of the parts on the floor. Make it obvious what tools the user has at their disposal to make the most out of the software (constructionist learning)

See also: programming models

# On programming advice

Jamie Brandon’s Reflections on a Decade of Coding

Programming practices are mostly tacit knowledge. Tacit knowledge isn’t easy to share. An expert will relate some simple-sounding rule of thumb, but then grilling them on specific cases will quickly uncover a huge collection of exceptions and caveats that vary depending on the specific details of the situation.

It’s so easy to think that simple solutions exist. But if you look at the history of ideas that actually worked, they tend to only be simple from a distance. The closer you get, the more you notice that the working idea is surrounding by a huge number of almost identical ideas that don’t work. Take bicycles, for example. They seem simple and obvious, but it took  two centuries to figure out all the details and most people today  can’t actually locate the working idea amongst its neighbours. Even when old niche ideas make a comeback (eg neural networks) it’s not because they were right all along but because someone recognized the limitations and found a new variation on the idea that overcame them (eg deep learning). Finding the idea that actually works amidst the sea of very similar ideas that don’t work requires staying curious long enough to encounter the fine-grained detail of reality and humble enough to recognize and learn from each failure.

Mainstream is mainstream for a reason. The frontier is the place to go mining for new ideas, but it’s 1% gold and 99% mud.