SfDD (Segmentation fault Driven Development)

You know it, you just did not realize it till now.

Crash, some call it crush, boom, explode … . It happened before, it is happening right now and it will happen in future. Lets face the truth. Programmers are people and people make mistakes. It is not constrained to C devs or C++ devs, Python devs, javascript devs or even Rust devs do make mistakes. When you program in some language the product of this mistakes are core dumps

Most of us make multi-threaded or asynchronous(event base) programs, the result of this is that the code is complex. The program flow is not linear, not just a bunch of ifs but rather modules that are somehow interconnected. It is very complex and with complexity bugs are very easily introduced.

We programmers get issues with our code all the time, most of the time it is something simple/stupid, but there are times when someone hit an issue that crashes our program. Not just crash, but we simply have no clue what is happening there(the result of the complexity). Some of us take such things as a challenge and that is where the SfDD starts.

Sure a wise programmer makes tests that can help, or try to reproduce the crash with minimal steps/config/environment required. However in the end we are just searching for answer for the question – is it still crashing?

Sometime we spend with SfDD a few days. The fix is usually simple but it includes a deep understanding of the code/app. The SfDD is actually very good in this regard, because it always teach a lesson or two to the programmer.

The best thing about SfDD is when it ends. Lets imagine a very real example. You have a crash in the system, you don’t know what is causing it. You start to debug, unit test your code, producing core dumps like crazy. You just had to clear /var/core for the second time because you ran out of disk space and now finally you found it. You make a commit of only a few lines changed, maybe some few if-s added or some legacy code removed that was there only because the other modules were not working as expected, but they fixed that already. Now you just pushed it and it all ends. The issue is solved and the feeling you get is just super. This is the best part of SfDD. The feeling of good work, accomplishment, good game, work nicely done. You feel the power of your new knowledge, the new stuff about C standard you just learned 2 days ago is really useful. The crazy stuff about pointers and references in C++ is still crazy but at least you know it. The compiler optimizations is looking less like a black magic. Also you know a part of the app you code and you start being the target for asking for help from others. For the rest of the day you take the least IQ demanding issue you can find and solve it like nothing.

This is SfDD, one of the best software development method ever invented.