Technical complexity is not the answer (most times)
Disclaimer: Opinions are my own, they do not necessarily reflect those of the company I work for.
Disclaimer #2: I initially wrote this text on May 19th 2020 (at 11:34 pm), but never publicly published it for some reason. In retrospect two years later, I feel my thoughts and this text is as relevant and actual as ever, hence, after minor tweaks, I finally decided to push the publish button.
TL;DR: Reduce technical complexity. Focus on business complexity. Start simple, learn and then redesign. Remember Conway's law. Be ready to fight a hard fight.
?
Why, oh why?
Why do people make things complex? I read a good article the other day about it after Vaughn Vernon tweeted about it (https://fs.blog/2018/01/complexity-bias/). And that article made me think about it in the Software Engineering world. The article focus on many aspects of why humans are biased towards complexity and at one point quotes Edsger W. Dijkstra:
?“Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.”
I'm not going to focus on the obvious pressures of the many vendors out there that want to promote their latest framework, tool, software as the best thing ever that will solve all our problems. I want to focus on the Software Engineering professional (Developer, Architect, Manager) and what we should and should not do to provide the best service we can to the companies we work for.
Many reasons can lead Software Engineering professionals to opt for a complex solution. In my experience, the great majority of times this is due to technical decisions being the very first consideration in a project, and afterwards attempting fit the solution into the technical constraint. Or simply put, use technical complexity as the solution. Also, many people will choose whatever they are comfortable working with instead of the right tool (a coding language is a tool) for the job. It always comes to mind the sentence "I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail." -?Abraham Maslow.
Sometimes the argument is that the technology provides agility, however, is well documented that it not only does not, but it also might even create more silos (e.g. Designing Autonomous Teams and Services - Deliver Continuous Business Value through Organizational Alignment?- Scott Millet and Nick Tune - chapter 1 p6-7)
The following topics have a lot of technical stuff, but also some more organizational/team/process topics. Anyway, based on many books read, interaction with some brilliant minds in the industry, and using my brainpower and experience in Software Engineering, I came up with a list of what I observed as recurrent things people usually do that causes problems and what they don't and, if they would, it would be greatly beneficial for the project.
?
What most people do (and they shouldn't)
?
领英推荐
What most people don't do (and they should)
"I would say you are doing enough testing if the following is true: You rarely get bugs that escape into production, and You are rarely hesitant to change some code for fear it will cause production bugs."
But Miguel, I, really, really know I'm going to need something complex, why can't I just start with a complex thing?
Naturally, if you're designing an application and you know for a fact that you have to be able to scale to millions of requests per hour (I'm guessing replacing a legacy app that is very hard to change and has that load already) it's tempting to immediately think of event-driven architecture and micro-services as a good option as they are very powerful tools. It's natural to try to skip intermediate learning steps and go to a final solution that will be complex because it has to cope with the requirements of running event-driven micro-services. However, there's an argument to be made even in that case about the benefits of starting with a simpler approach, learning about the problem, and then redesigning when the time is right. It's funny how these things keep happening, despite the effort of so many brilliant people like Martin Fowler (https://martinfowler.com/bliki/MonolithFirst.html):
"almost all the cases where I’ve heard of a system that was built as a microservice system from scratch, it has ended in serious trouble… you shouldn’t start a new project with microservices, even if you’re sure your application will be big enough to make it worthwhile"
or his take on what he called Design Stamina Hypothesis (https://martinfowler.com/bliki/DesignStaminaHypothesis.html).
?
So what should the Software Engineering community do?
Good question, I'm glad you asked. If we consider all the above topics, they all keep bringing us back to simple things like YAGNI, KISS, and SOLID (or CUPID), and all the so many times forgotten fundamentals practices of Software Engineering. We must also always strive to understand the problem we must solve first and then figure out the right tools to help solve it. We, the members of the Software Engineering community and professionals must make an effort to always advise the least complex option to start with, and then re-access frequently and adjust accordingly. A flexible software system allows quick and safe modification and extension, and those requirements can be achieved with simplicity and focus, not technical complexity.
?
Just my two cents.?
MSM
Indeed, Every hard work in the world is done to make things simple! ??Miguel Morais