3 ms·
Having worked on actual banking software, I agree that an Account object with a "withdraw" method is not a real-world thing. But having also blogged for a whil
by braythwayt 9y ago
Having worked on actual banking software, I agree that an Account object with a "withdraw" method is not a real-world thing.
But having also blogged for a while... There are no good examples that are complex enough to be realistic and yet simple enough that we can concentrate on the programming principle and not be distracted by the thing being modelled :-D
Now as to one or two state machines... This has not been my experience. I have worked on some systems that had dozens of state machines, nearly every domain model was a state machine of some kind.
- jstimpfle 9y agoYep - The only useful explicitly coded state machines I have seen are the massive, generated ones. Like DFAs representing regular expressions.