… simply amazing. I somehow got it in my head to focus on writing object-oriented programs while taking a C++ refresher course. I started doing as many of the homeworks like that as possible (e.g., writing a counter class instead of just using an array).
Today, I wrote a class to run a simulation (really, just shuffle a vector), and then a second “counter” class to do the rest of the grunt work. The beauty of the whole OO process is that since everything is modular by design, the code can become very simple, or at least straightforward. I would say this process can be used to nearly eliminate bugs from the design process. Why? Because each piece can be tested in isolation without hacking the code to pieces as well as removing the obfuscation of dealing with the moving parts. Furthermore, it is highly maintainable.
One can think of it the way digital engineering is done (I can actually speak about that with some intelligence). When designing something complex, like a CPU, only a moron would try to design it directly in terms of transistors. Rather, the CPU is made of modules, each made of more simple logic, themselves made of even more simple logic, and so on until you get to the simplest digital units made of transistors. This process adds a certain amount of friction to the process as there is a “compatibility layer” between each device, but it saves enormously on being able to understand, design, and modify the whole system. After all, if you had to worry about whether the timing on the flip flops in one frame of the processor were going to affect the ALU multiplier timing, you’d go mad. However, knowing that each meets certain specifications lets you just abstract it away and draw the whole thing is a box with lines on it. And that’s the object oriented programming concept as well.

