What taking care of your teeth has in common with programming?

— Published originally on medium.com

I don’t need to tell you why brushing your teeth and going to a dentist with a regular time manner is an important thing.

You wash your teeth at least two times a day to prevent caries. You use the best toothpaste, own an electric toothbrush. Maybe even IoT one which pushes notifications to your phone, to remind you about brushing. You unlocked some achievements due to regular use. Still, this might not prevent you from getting caries. So you go to a dentist, so they can check if anything bad is happening. Symptoms of decay in an early stage are easy to treat. Treatment is painless and pretty cheap compared to more serious ones. In Poland, where do I live, good quality treatment costs $30–50.

Yet, when you’re not relying on expert and don’t review your teeth in a regular manner, you can get into serious problems. Your tooth can start to react to heat and cold, or while eating something sweet. Or you can wake up in the middle of the night with huge pain. If you ignored symptoms for a long period of time the inflammation has happened. The worst case scenario is tooth extraction which is nothing playful or enjoyable. If you’re lucky enough and it’s not too late for root canal treatment, you can save your tooth. How much does it cost? $400–500. 10 times more than usual treatment. And it’s not a 20–30 minutes fix. But rather a process which takes 2–3 visits and use of complex devices like microscope or RTG.

But why am I writing about that in the scope of programming? The answer is quite simple. While you review your codebase on a regular manner and react to potential smells on a daily basis, you won’t get into problems. What sort of issues do you want to fix? Small ones, taking an insignificant amount of time. Or the huge ones which prevent yours from introducing new features to your eg. SaaS platform? Do you want root canal treatment which we could relate to complete feature rewrite? Tooth pain can make eating difficult. Your application’s architecture pains can frustrate your users. Or make it completely unusable. In effect, you start losing money. Do you want to spend 50 bucks on preventing potential loss? Or you prefer wasting 10, 100, 1000 times more money and time when sh*t hits the fan? For me, the answer is obvious.

Permanent teeth have to last for our whole life. We need to take proper care of them every day. Probably most of the software we’re writing is intended to work long-term. Take care of it every day. At Arkency we believe that DDD is the most useful technique when you work on years-long projects which are supposed to have even more years-long time of usage. When the cost of maintenance and expanding is much more important than the cost of development.

PS. Don’t know how to start with DDD in your Rails app? Join one of our stationary training or buy our latest Domain Driven Rails book.

Tags: ·

Avatar of Author

Szymon Fiedler

I solve problems. This is the place where I share my thoughts on Software Engineering.