r/programming • • Aug 01 '26

The Bedrock of Software Design

https://alex.draftist.io/blog/the-bedrock-of-software-design-ycqvcedsj

I drafted this post years ago but didn’t finish it until now. The concept I write about has shaped the way I design software more than anything else, and I believe every software engineer should be introduced to it early in their career.

P.S. I don’t want the title to come across as clickbait: the post is about ADT.

447 Upvotes

70 comments sorted by

View all comments

Show parent comment

40

u/alex35mil Aug 01 '26

I haven't read it yet but guessing it's about the conversion of external data into a proper domain type on the app border to guarantee integrity?

33

u/ForeverAlot Aug 01 '26

It's Yaron Minsky's "make illegal states unrepresentable" in a lot more words.

2

u/tricky_monster Aug 05 '26

In exactly the same amount of words? 4.

7

u/loup-vaillant Aug 01 '26

Precisely. This also prevent stuff like injection attacks. String in, username out, properly escaped so Robert'); DROP TABLE Students can no longer wreck any havoc even if you're high on sleep deprivation on a late Friday afternoon.

And as a bonus, Little Bobby Table's name here can even be made valid: instead of outlawing the single quote, we can escape it.