Categories
Software Architect

If there is only one solution, get a second opinion

You’ve probably heard this said before. If you’re an experienced architect, you know it’s true: if you can only think of one solution to a problem, you’re in trouble.

Software architecture is about finding the best possible solution for a problem given any number of constraints. It is rarely possible to satisfy all requirements and constraints with the first solution that comes to mind. Generally, trade offs must be made by choosing the solution that best satisfies the requirements according to the most critical priorities.

If you only have one solution to the problem at hand, it means that you will have no room to negotiate these trade offs. It’s very possible this one solution will be insatisfactory to the stakeholders of your system. It also means that if priorities are shifted due to a changing business environment, your system may have no room to adapt for new requirements.

Rarely, if ever, is this situation caused by a real lack of options. It is much more likely due to the inexperience of the architect in this particular problem domain. If you know this is the case, do yourself a favor and ask someone more experienced to give you a hand.

A more insidious manifestation of this problem is when an architecture is designed from habit. An architect can be experienced with a single style of architecture (e.g. a 3-tier, layered client-server system), but not know enough to recognize when that style doesn’t fit. If you find yourself in the situation where you automatically KNOW the solution, without having done any comparison to other approaches, stop, take a step back, and ask yourself if you can think of another way to do it. If you can’t, you may be in need of some help.

A friend of mine was once the technical person in charge of a small, but growing internet start-up. As their user base started growing, so did the load requirements on their system. Performance was going down the tubes, and they were starting to lose some of their hard-won user base.

So, the boss asked him, “What can we do to improve the performance?”

My friend had the answer: “Buy a bigger machine!”

“What else can we do?”

“Umm… as far as I know, that’s it.”

My friend was fired on the spot. Of course, the boss was right.

'Coz sharing is caring
Categories
Software Architect

Your system is legacy, design for it.

Even if your system is bleeding edge and developed in the latest technology, it will be legacy to the next guy. Deal with it! The nature of software today means things go out of date fast. If you expect your system to go into production and survive, even for a few months, then you need to accept that maintenance developers will need to fix things up. This means several things:

Clarity – it should be obvious what role components and classes perform.

Testability – is your system easy to verify?

Correctness – do things work as designed or as they should? Eliminate quick and nasty fixes.

Traceability – can Ernie the Emergency bug fixer who has never seen the code before jump into production, diagnose a fault and put in a fix? Or does he need an 8 week handover?

Try to think of a different team opening up the codebase and working out what’s happening. This is fundamental for great architecture. It doesn’t have to be over-simplified or documented to the hilt, a good design will document itself in many ways. Also the way a system behaves in production can also expose the design. For example, a sprawling architecture with ugly dependencies will often behave like a caged animal in production. Spare a thought for (usually more junior) developers who may have to debug defects.

Legacy tends to be a bad word in software circles, but in reality, all software systems should endure the tag. It is not a bad thing as it may indicate that your system is durable, meets expectations and has business value. Any software system that has never been called legacy has probably been canned before launch – which is not the sign of a successful architecture.

'Coz sharing is caring