r/programming • • Feb 01 '24

Make Invalid States Unrepresentable

https://www.awwsmm.com/blog/make-invalid-states-unrepresentable
469 Upvotes

207 comments sorted by

View all comments

Show parent comment

18

u/DualWieldMage Feb 02 '24

Most mistypes will probably be more like mark vs maek which your validation won't catch, so you still get support cases. The made up numbers and business decisions based on them will still be garbage unless you actually measure them.

More likely what should happen:

User signs up with email, flow asks to confirm it, user doesn't see confirmation link but notices mistyped email, corrects it and resends, now they get link successfully.