Stoicism and Software Engineering

Software engineering is hard, no doubt about it. Sometimes it seems that our profession is full of snake oil salesmen. New technologies are created and evangelized for monetary reasons without bringing progress to the field. I have been coding for over 20 years. Trust me, every six months, you need to be updating your skills, or else you will get outdated—nothing worst than the old guys that got stuck with the new Cobol: the monolith J2EE WebSphere.

Luckily, we have made progress in terms of methodologies. Agile and the domain-driven alphabet (Are we there yet?), are proven tools that brought enormous benefits. There is enough empirical evidence out there of kanban/scrum teams are kicking ass in comparison to the waterfall gantt chart driven projects.

Stoicism is in vogue in our culture nowadays, thank god. One can trace parallels between software modern software engineering heuristics with the teachings from Seneca, Marcus Aurelius, and Epictetus. For example:

It is in times of security that the spirit should be preparing itself for difficult times; while fortune is bestowing favors on it is then is the time for it to be strengthened against her rebuffs. -Seneca

Seneca is telling us to practice misfortune. This sentence, which is 2000 years old, is relevant because it reminds us that things will break, we will have eventually introduce bugs in our code, or some of our implementations will have side effects that will break existing features. So, please, do write tests, yes…, all kinds of tests: functional, domain, contract, e2e, integration, unit, etc…

Writing new code is usually more comfortable and faster than maintaining existing code bases. Especially codebases that are not clean (see Uncle Bob’s Clean Code). For new implementations, remember that Observability is critical when you have modern enterprise software. Services will break, and you need to be proactive; you need alerts, and you need to find bugs fast in production environments.