Here are 10 things that I think software engineers should think about. Bearing these things in mind will make us all better engineers.
Over the years working with teams I've observed a number of things that, when done well, really improve the quality of the software being developed. When I sat down to write this post, these were the things that were top of mind. This is by no means an exhaustive list. Please share your nuggets with me, I'll add them… if they're good :)
In broad strokes the architecture of a system defines which components exist, what their functionality should be and how they interact with each other and the outside world. The architecture defines what needs to be built and how it should function, but it does not define how is should be built.
How the actual code should the organized is the software design.
It is common practice in modern software engineering to leave the software design to the engineer. Problems arise when software engineers don't realize that the need to be deliberate about the design of the software they are building and just code away hoping for the best.
Software Design concerns itself with objects and classes, fields and methods, functions, scope and visibility etc etc. In other words, how the solution is realized in code.
Design does not happen subconsciously or organically. I have met a handful of engineers for whom good design appears as they code as if by magic. Just a handful. For most engineers though, deliberate thought and a diagram or sketch are required to achieve anything approaching good consistent software design. Take the time and do the design.
Things change. Requirements change. Software needs to adapt. Embrace the change. Good design is like a superpower because good design adapts easily to change. If your design doesn't adapt, look for ways to improve it. Learn from that. I've experienced some golden moments where a seemingly catastrophic change is quickly and easily implemented. That really validates the design.
Irrespective of the programming language you are using, the natural language naming of classes, variables and methods etc. conveys the purpose of the code. Improper or incorrect names are as important to fix as functional bugs. There are two reasons for this. The first is that the degree to which a code maintains its cohesion depends directly on how accurately that code is named. Cohesion is vital for good design and the better the cohesion the better the code holds up against entropy. The second is that the better the naming the greater the understanding of that code will be when it has to be maintained later. Greater understanding equals lower entropy.
Every time software is altered the resultant quality tends to be lower. There are several reasons for this:
Holding the line. Preventing entropy requires deliberate action.
Another way of saying this is "insufficient performance will kill your product". The real problem with performance is that it's very hard to remedy. The key here is to measure early and often. Numbers within the same order or magnitude are generally ok as software can generally be tuned to run up to an order faster. The trouble comes in when you are more than an order of magnitude away. The other problem with performance is that solutions are often fundamental. That is to say the solution may lie in using lower level language components, or an entirely different language altogether. If you are not open to that possibility you are in for hard time.
Seriously. Read the F.ing Manual Already. Modern software engineering is all about frameworks and libraries. Read the documentation. I have lost count of the number of problems I have been asked for assistance with, the heart of which lay at some misunderstanding or misconfiguration of a framework or library. What's worse is that in nearly every case, the problem would have been avoided or easily solved by reading the docs.
Another point to make here is KNOW THE PROGRAMMING LANGUAGE you are using. As more and more solutions require a combination of programming languages, I've seen a decline in the deep knowledge engineers have about a single language. If you are learning a new language be deliberate about it. Buy the book and read it cover to cover. Each language has a few things is set it apart. Understand what those features are and how to use them.
Another oldie but goodie. Keep it Simple, stupid. One of my favorite quotes is "the design is not finished until there is nothing left to remove". Find the simplest solution that solves the problem. Be vigilant about complexity and always be looking for ways to reduce it.
This is an ever increasing problem in modern software engineering. More and more frameworks and libraries exist in the open source realm that solve many of the common problems we face. It is seldom a good idea to re-invent the wheel. However, on the flip-side not all software is created equal. It is always a good idea to evaluate a piece of software before you include it in your product. Here are some of the criteria I use:
There is a sort of reticence that creeps into an engineers mindset when they have been working on a component for a while. The longer the component remains solely in the hands of an engineer, the more reticent they become to put it into production. The trouble is that it's hard to distinguish the "it's not ready" because it's not done from the "it's not ready" because I think I can make it even better. I've heard this referred to as "polishing the marble" and "gold plating". The point here is that it's natural tendency I think.
The only way I've found to completely mitigate this is through the agile practice of continuous deployment. That is to say that tasks completed by the end of the sprint (think 3 week sprint, not 3 month sprint), are deemed production worthy and begin the promotion to production. The next sprint may add features to the next version of that same code and that's fine. This means that engineers are always aware that the code is bound for production in the short term and that issues and imperfections can be ironed out in the next sprint.
(I can talk a length about my views on Agile and the best SDLC practices to employ in an agile shop. That's a topic for another post)
Thanks for taking the time to read this. I've tried to keep it as succinct as possible. It truly believe that if more software engineers out there kept these things in mind, we'd see better outcomes. Please let me know what you think, I welcome any and all opinions on the topic.
2013 © Ian Moore
Ads go here