4 ms·
One other very similar path is to start with domain modeling. Figure out what all of the facts, types and relations are in abstract terms before you write a sin
by bob1029 5y ago
One other very similar path is to start with domain modeling. Figure out what all of the facts, types and relations are in abstract terms before you write a single line of code. Excel is exceedingly capable at this type of design work.
I see abstract domain modeling combined with practical engineering constraint solving as the foundations of the discipline. Being able to simultaneously operate in abstract academic terms (e.g. database normalization) while also considering things like cache lines and latency between networked participants is how the magic is done.
- mbil 5y agoCan you talk more about using Excel for this type of design work? Sounds interesting, but I’m not exactly sure what you mean.
- bob1029 5y agoOne worksheet per table you think you would want to create in an ideal SQL database representing the business domain. For instance: Worksheet #1: Customers ColA: Id ColB: Name ColC: Email ... Worksheet #2: Orders ColA: Id ColB: CustomerId ColC: ItemId ColD: OrderDateUtc ... You probably want to fill in a few example rows per table to illustrate intent and how things relate together. The advantages with this approach are impossible to overstate. Being able to send a dead-simple spreadsheet via email to your domain experts can save a ton of frustration and meetings.
- Jtsummers 5y agoYou can also implement rudimentary logic strictly with Excel functions, no need for VB, to create a kind of MVP/prototype of the system. Then it can be migrated to a real database or other representation format and program once you have a solid idea of what you're representing and why. And since it's data-centric there's less of a tendency to screw up by mixing the data layer and logic layer too much within this prototype, you're almost forced to create a clean separation. Then you have a data model that you can use in the core of a variety of applications with various business and view logics distinct or common between each.
- jorangreef 5y ago"(e.g. database normalization) while also considering things like cache lines and latency between networked participants is how the magic is done." I wouldn't put abstract domain modeling or database normalization alongside a first principles back-of-the-envelope approach. Abstract academic terms are certainly useful insofar as they provide a shared language to discuss systems and discover research, but... it really does actually seem to be the first principles things, the physical facts, like cache lines and latency ("practical engineering constraint solving" as you put it well) that drive the best designs, and far ahead of things like database normalization. This is also the approach taken by Data-oriented Design [1], which is more similar I think, than the abstract domain modeling approach. In fact, abstractions and domain modeling principles can often lead one away from the ground reality of the machine, or "mechanical sympathy". [1] https://en.wikipedia.org/wiki/Data-oriented_design https://en.wikipedia.org/wiki/Data-oriented_design
- dragonwriter 5y ago> Abstract academic terms are certainly useful insofar as they provide a shared language to discuss systems and discover research, but... it really does actually seem to be the "first principles" things like cache lines and latency ("practical engineering constraint solving") that drive the best designs, and far ahead of things like "database normalization". Database normalization is a tool to deal with correctness (avoiding data anomalirs) and flexibility, cache lines and latency deal with performance. Fast but wrong and/or brittle designs are no more “best” in general than correct and flexible but poorly-performing ones; though the exact balance between those two things differs between applications.
- jorangreef 5y agoSure, and I'm not saying that something like database normalization is not useful. I just don't think that the "Habits of Expert Software Designers" like Jeff Dean or Martin Thompson are to be found in how they would design normalized SQL schemas when asked [1]. Rather, it's in how they would build things like LSM-Trees or Replicated State Machines. And I think if one looks at that design process, one would find that they reach for back-of-the-envelope calculations far more often than most other tools. They appear to take a first principles approach. Again, that doesn't mean that database normalization is not a useful tool. I just wouldn't put any kind of abstract modeling approach alongside a first principles approach when it comes to systems design. [1] Regarding normalized SQL schemas, I wouldn't be surprised if people like Jeff Dean or Martin Thompson went denormalized where it made more sense, or eschewed database indexes in favor of learned indexes, to optimize not only for performance but also for cost or time to recovery etc.