Move Over OOP & Functional, Think about State Machines
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