Software Engineering Best Practices from a General of the Thirty Years' War


Abstract

Software engineering lessons can be found in very curious places such as natural wild life or in common objects around us. Object oriented advocates found their model in an architect (Christopher Alexander) but I never thought that the best lesson of software engineering that I could ever find was in the story of an amazing general of the Thirty Years' War.

The (Hi)Story so Far...

Many people do not know very much about the Thirty Years' War. Especially if you are not from Europe, where we study European's history at school, or you did not study European history of the 17th Century in some classes in college, you probably just heard of that war.

The Thirty Years' War shattered Europe for 30 years (1618-1648) and more than a single war; it is to be considered a series of conflicts that took place in the Central Europe involving, at different moments, all the political and military powers of the time: Holy Roman Empire, Austria, Spanish Empire, Swedish Empire, France...

Summarizing to the extreme, it was a war of religion between Protestants and Catholics. The outcome of the war was a rebalance of power across Europe with the division of the Holy Roman Empire, the independence of Portugal, Sweden transformed from Kingdom to Empire and many more.

For a better summary, or for the full story, please go to the local library and pick up a good history book, or just take a look at the Wikepedia page of the Thirty Years' War which provides a good enough summary.

For what concerns this document, we are interested only in one specific period of the Thirty Years' War. We are interested in the so called the Swedish intervention (1630-1635) and, even more specifically, into the Battle of Breitenfeld (September 7th, 1631) and in the general that guided the Sweden army to victory. The name of this general was Gustaf II Adolf, better known with through the Latin version of his name, Gustavus Adolphus, or through the name that his opponents gave him: "The Lion from the North".

Gustavus Adolphus and the Battle of Breitenfeld

Gustavus Adolphus was, and still is, considered the greatest general of his time and his fame comes not only from the large amount of battles and wars that he was able to win, but mainly his innovations to the way war was done in the 17th Century.

Just to name two, both Napoleon Bonaparte and George S. Patton recognize in him the inventor of modern warfare and a model that every general or commander should study and follow.

The battle that permitted Gustavus Adolphus to show to the world his ability as a general and his innovations was the Battle of Breitenfeld.

The Battle of Breitenfeld saw the forces of the Kingdom of Sweden facing the Imperial forces guided by the Count of Tilly. This last one was a very expert general. At the time of the battle, he was 35 years older than Gustavus Adolphus and with a long record of wars and battles: he joined the Spanish army when he was 15 years old and he died in 1632 at the age of 73, of tetanus, 15 days after he was wounded by a cannon ball during the Battle of Rain.

Which innovations did Gustavus Adolphus make in the Battle of Breitenfeld?

The forces of Gustavus Adolphus were very well trained and organised; every infantryman or cavalry soldier was trained in the use of the artillery. The Swedish artillery used only three different calibers and each infantry regiment had a small caliber cannon to shot against troops or cavalry charges.

Everything of the previous list sounds obvious but it did not exist, at least at that level of perfection, before the battle.

It was not only something special with his army, Gustavus Adolphus was able to operate an artillery piece himself and he personally used to guide the cavalry charges guiding his men on the battlefield.

Innovations in the 17th Century Art of War and Modern Software Enginering

Each one of the innovations that Gustavus Adolphus took to the battlefield was as important as the other ones.

Let us analyse each one of them and let us try to draw parallels between those innovations and how we can try to learn something from the software engineering point of view.

Well trained troops — The Swedish army, as reported by the historians of the time, was the best-trained force of the Thirty Years' War. Just as an example, the musketeers were able to reload their muskets three times faster than every other army's musketeers were and they were trained to shot, at the same time, from three ranks. These two facts alone were able to multiply by 9 the effect of the musketeers (which is, more or less, an order of magnitude).

Where is the parallel with software engineering?

Being "well trained" is not something that only troops can benefit from. Programmers, DBAs and system administrators who have a deep knowledge of the systems that they work on are able to be more effective and fast in the execution of their tasks. Moreover, as in the "firing from three ranks" part, having a good coordination among the people in the team, as well as among the teams, is a crucial aspect of developing software in a company.

Infantry and cavalry were able to use the artillery — Every man in the Swedish army was trained to be an artillerist. Now, try to immagine the surprise of the Imperial forces when the Swedish cavalry, after killing the Imperial artillerists, dismounted from their horses and turned the cannons against their (former) owners and started shooting at them.

Where is the parallel with software engineering?

Every member of the team should know the full-stack of the application that is being built and should be able to understand the design and the choices made. Moreover, every member of the team should be able to contribute into the development of all the parts composing the product. This reduces (1) the possibility of having one single person owning the full knowledge of a single piece and (2) having everyone being able to integrate more easily his part of the work into the big picture.

Only three calibers — All the cannons in the Swedish army were only of three possible calibers. From that very moment on, those three calibers become the "standard" calibers of modern artillery. The total weight of bullets and cannon balls that an army can transport is limited and it is quite useful to have always the right kind of ammunition that is needed for the job.

Where is the parallel with software engineering?

A software project should use only a limited amount of programming languages, DBs and operating systems. In an ideal world, only one of each. Let us imagine a projects programmed in 7 different languages, 3 DBs and everything runs on 2 different operating systems. Every one of those pieces needs specific knowledge and limits a lot the reusability of the code and the exchange of ideas among the teams: not even the DBAs are able to share properly ideas and practices.

Small caliber artillery — Each the brigade of the Swedish army had 3 small cannons (to be precise: a 3 pounds piece). These cannons were very easy to use, faster to reload than normal cannons and had a longer range than muskets. The infantry used them to shot at the enemy when it was too far for the muskets or against cavalry charges. Before then, the artillery was typically used in sieges and it was not very effective against the infantry. Gustavus Adolphus took to the battlefield the very first type of highly mobile artillery ever invented.

Where is the parallel with software engineering?

Having the right tools to be able to get the work done is essential. This is not just a reference to editors and compilers, which should be there by default in each development team. This is a reference to all the other tools, physical and practical, to help a team to do its job: test environments, code versioning systems, system that performs nightly builds of the code and runs automatically tests. Moreover, using the best software engineering practices such as code reviews, daily stand-ups etc.

Knowledge and example — Gustavus Adolphus was an incredible general and a great strategical mind. He changed the way war was done and his innovations in the western art of war survived him. Nevertheless, he was a practical man as well: he was able to operate an artillery piece himself and he used to guide the cavalry charges in person.

Where is the parallel with software engineering?

As it appears obvious, it is quite difficult to change the way programming and software engineering are done. Anyway, a good development leader (or any other name is used in your team) should have at least two characteristics: (1) he/she needs to be technical aware in order to be able to guide the design and the discussions and (2) he/she needs to "lead by example" actively taking part to the development, testing and deployment phases. Only in these two ways, the development leader can always maintain a sense of what is going one, where the problems are or try to predict where they will be.

Conclusions

In this document, we have drawn an interesting parallel between Software Engineering best practices and the war innovations of one of the greatest generals of the Thirty Years' War.

There is also a final point about Gustavus Adolphus: he was a real gentleman. When he discovered that the Count of Tilly was wounded during the battle, he sent him his personal physician.

Unfortunately, being a real gentleman is not something that someone can learn easily but this does not mean that you cannot try to be always respectful of the other members of your team and of the partner teams.