This chapter covers
Most of us started programming using an imperative style of coding. What do we mean by this? It means we give the computer a set of instructions or commands, one after the other. As we do so, we are changing the system’s state with each step we take. We are naturally drawn to this approach because of its initial simplicity. On the other hand, as programs grow in size and become more complicated, this seeming simplicity will lead to the very opposite; complexity arises and takes the place of what we initially intended to do. The end result is code that is not maintainable, difficult to test, hard to reason about, and (possibly worst of all) full of bugs. The initial velocity that we could deliver features slows down substantially until even a simple enhancement to our program becomes a slow and laborious task.