The Madagascar code is designed around several fundamental principles.
- Modularity. This principle comes from Unix. Doug McIlroy, the inventor of Unix pipes, formulates it as
This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.
Madagascar makes one exception: RSF files are text streams but they point to binary data. This is the simplest way to handle large datasets while preserving the Unix approach.
- KISS (Keep it simple, Stupid!). This principle is closely related to modularity. We try to make our tools and formats as simple as possible to achieve the given functionality.
- Test-driven development This principle does not apply literally to scientific programming, because scientific computing is often exploratory: the result of the computational experiment is not always known beforehand. However, once the experiment is completed, it immediately becomes a test for future development, because we expect the results of the experiment to be reproducible. A Madagascar module is not included in the official distribution until there is an example of its usage in reproducible documents.
- YAGNI (You ain’t gonna need it!). This principle comes from XP (Extreme Programming). Ron Jeffries, one of the founders of XP, states it as
Always implement things when you actually need them, never when you just foresee that you need them.
Madagascar is not developed for imaginary users. It is developed by people who use it and who add functionality as they need it. This is also known as “scratching a developer’s personal itch”, a feeling familiar to the creators of Unix. As Dennis Ritchie admits in a recent interview,
Apart from doing new and cool stuff, what guided us was really kind of selfishto write tools we could use ourselves to make our lives easier: “Id like such-and-such to do such-and-such, and thats hard to do now. What kind of tool can I write to make that easier?”
(images from Wikipedia)