I used to have a boss that talked about the difference between a programmer and a software engineer. He would say things like, "I hired engineers not programmers. I can get programmers cheap. I want code that's designed." The problem of code being hacked together rather than designed is all too common. Let's take a look at why engineering a solution is better than hacking it together.
All software has bugs. The more complex the software the greater the opportunity there is for bugs to creap into the system. And, no matter how good of a coder someone is they will introduce bugs into the system.
Designing the software to separate discrete tasks into separate functions or methods reduces complexity in the software. Reduced complexity helps to eliminate those pesky bugs. Plus, this makes testing easier so you can find those bugs before you release the software.
This is one of my favorite parts. If software is designed well the code is re-usable and can be built upon. If you reuse tried and tested code you lower the possibility for bugs. When you re-use code that's less code that needs to be written.
Have you ever heard of the ilities? They are maintainability, accessibility, and testability. Software should be designed to make it easier to maintain, easy to understand, and easy to test. This is a crucial part of engineering a solution.
Imagine if your car was hacked together. That little thought was given to the layout. You might end up with an engine you can't change the oil in. Or tires you can't add more air to. These types of problems creep up in hacked together software all the time.
Every software project I've ever worked on has had plans for a next phase of features or dreams of them.
I remember the first time I experienced working in a system that was horribly hacked together. I was asked to add some new features to the system. The code for the system was strung together PHP with almost no common functions. It took weeks to figure out the system so I could understand it well enough to tweak the code without it breaking in ways I couldn't imagine.
Software should have an architecture that supports easy future expansion.
Architecture and Design
I used the words design and architecture quite a bit in this post. These are what separate engineering from programming. Programmers write code. Engineers design systems.