Programming

Programming articles from Sudo engineers: Java design patterns, Python, AI and data, and web development, with runnable code examples.

Programming

Programming
14 March 2024 14 min read

State pattern and an order state machine

An e-commerce order moves through several states: new, paid, shipped, delivered, cancelled. Each action, such as paying, shipping or cancelling, is valid only in certain states, and the behavior diffe...

See more