The Art of War could be considered a design pattern for winning or losing war. As war is an endeavor of life and death of an nation-state, we can compare this to life and death for an engineer. For the endeavor of whatever he is doing is critical and people depend on the engineer’s work to be flawless to prevent disasters in the future. Then we can also see that design patterns for engineers are standard operating procedures in creation of new designs. Same can be said for the conflict of nation-states against each other; their design patterns could be similar to wisdom that was shared in our history. The Art of War is a treatise that brought forth ideas of tactics, logistics, and strategy that could be applied for design of plans for nation-state conflicts covertly and overtly. Design patterns are also seen as proven strategies and tactics that can be applied in all points of development in creating new innovations. We would use the design patterns to speed up development and provide oversight to ensure success in our design, similar to how strategist or think tanks would apply the Art of War to their purposes. The phrase “All warfare is based on deception” holds true to its purpose as it tells all strategist the one truth of war. The same could be said for our purposes in coding where we could have absolutes and truths that provide insight into our design processes and making sure our designs align well with these truths.
I’m relatively new to coding but I’ve been told that there are no real answers to coding practices as long as it gets the job done. However, in my instruction, I’ve been told that we want to be as efficient and effective as possible so that we can provide code that is easy to read and understand and with no unnecessary lines at all. Design patterns I’ve used so far have been menial but necessary. I followed code style for formatting of code so that the code that I would write would be easy to comprehend. This meant indenting and providing spaces and comments that allowed for easy usage. How do I know if I’ve been using a design pattern? Well, I do know that my professors in the Electrical Engineering Department have not gone in-depth into coding, but I know there was a design pattern taught to us to use and it really shows even though we were never formally taught that. We’ve been taught to use a certain format with a certain amount of syntax or logic to use. However, it is very hard for me to say which specific design patterns were used.
In EE 160, which is the introductory C programming class for the college of engineering, we were taught of a design pattern similar to the ones presented by the Singleton method. We were never taught about private or public variables and were more used to a global variable used in our code. In EE 205, which was the object oriented programming, we were taught something similar to the Observer/Factory method of having multiple classes and observers that reacted. In our EE 260 class which was our digital circuit class, we were taught a method similar to the MVC method as we would have a controller program that gave out signals to other parts of the digital circuit that would run the circuit. So, in essence, what I’ve used for design patterns really stems from the type of work I was doing and what was useful at the time. We can see that for teaching introductory C, the Singleton method really resonated for beginners. For our EE 205 class, the progress towards object oriented programming was indicative of our usage of the Observer and Factory method as we were beginning to use a more complex code of objects and classes that were to be used to compartmentaize code that we have never done in our EE 160 class. In our EE 260 class, the MVC method really worked out as it allowed for an easier usage of building digital circuits of many components that would need a controller to use all components of the circuit.