Move Over OOP & Functional, Think about State Machines

Daksh Gupta
6 min readSep 8, 2024
State Machine

Someone quoted this 👇

If debugging is the process of removing bugs, then programming must be the process of putting them in.

A brilliant statement which sums up the reasons behind origin of programming paradigms like Object Oriented and Functional.

These paradigms are intended to make sure that we reduce the chances of creating bugs, while writing the code. The success of which can be debated, but in a nutshell all of them are useful in writing relatively better code, but, there is a catch…!!!

One has to be more artificial than natural to think about objects, functions and their relationships. It’s not Intuitive.

Don’t get me wrong, but we don’t deal with day to day life challenges and solve the problems by considering them in the domain of objects, functions, inheritance etc.

Instead, we try to access the state any situation and determine the possible behaviours (options) out of it. It’s the most natural way of solving the problems and it doesn’t need any training

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Daksh Gupta

🔹Software Product Development Consultant, Trainer, & Coach🔹 Tech Speaker & Content Creator 🔹 youtube.com/@Cognitive-Programmer 🔹 linkedin.com/in/iDaksh