Optimize for the unknown

You don't know the future, but you can feel confident things will change and optimize for that. You avoid wastefully spending time on early abstractions and optimizations until you have more context and a clearer picture of what's needed. Prefer options which enable the greatest future flexibility.

Examples

  • You're building a file uploader feature, but you're uncertain if the app will later support large files or real-time processing. Instead of over-engineering the uploader with support for large files and streaming (which might not be necessary), you focus on building a simple uploader. Keep the larger file possibility in mind so you don't choose an architecture that would preclude this. This way, if requirements change, it's easy to add support without redoing the entire feature.
  • When designing your app's data layer, you avoid a rigid schema by using a flexible solution like Prisma with SQLite. This choice allows for quick changes to the schema as you learn more about your requirements, rather than committing upfront to an overly structured schema that could require extensive migrations later.