{"id":254,"date":"2011-06-19T15:59:15","date_gmt":"2011-06-19T15:59:15","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=254"},"modified":"2015-08-04T23:51:36","modified_gmt":"2015-08-04T23:51:36","slug":"what-are-the-design-principles-of-madagascar","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2011\/06\/19\/what-are-the-design-principles-of-madagascar\/","title":{"rendered":"What are the design principles of Madagascar?"},"content":{"rendered":"<p>The Madagascar code is designed around several fundamental principles.<\/p>\n<ol>\n<li><strong>Modularity<\/strong>. This principle comes from Unix. Doug McIlroy, the inventor of Unix pipes, formulates it as<br \/>\n<blockquote><p>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.<\/p><\/blockquote>\n<p> <strong>Madagascar<\/strong> makes one exception: <a href=\"\/wiki\/Guide_to_RSF_file_format\">RSF files<\/a> are text streams but they point to binary data. This is the simplest way to handle large datasets while preserving the Unix approach.<\/li>\n<li><strong>KISS (Keep it simple, Stupid!)<\/strong>. This principle is closely related to modularity. We try to make our tools and formats as simple as possible to achieve the given functionality.<\/li>\n<li><strong>Test-driven development<\/strong> 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 <strong>Madagascar<\/strong> module is not included in the official distribution until there is an example of its usage in reproducible documents.<br \/>\n<img decoding=\"async\" src=\"http:\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9c\/Test-driven_development.PNG\/350px-Test-driven_development.PNG\" alt=\"\" \/><\/li>\n<li><strong>YAGNI (You ain&#8217;t gonna need it!)<\/strong>. This principle comes from XP (Extreme Programming). Ron Jeffries, one of the founders of XP, states it as<br \/>\n<blockquote><p>Always implement things when you actually need them, never when you just foresee that you need them.<\/p><\/blockquote>\n<p> <strong>Madagascar<\/strong> 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  &#8220;scratching a developer&#8217;s personal itch&#8221;, a feeling familiar to the creators of Unix. As Dennis Ritchie admits in a recent interview, <\/p>\n<blockquote><p>Apart from doing new and cool stuff, what guided us was really kind of selfish\u0097to write tools we could use ourselves to make <em>our<\/em> lives easier: &#8220;I\u0092d like such-and-such to do such-and-such, and that\u0092s hard to do now. What kind of tool can I write to make that easier?&#8221;<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/upload.wikimedia.org\/wikipedia\/commons\/3\/36\/Ken_n_dennis.jpg\" width=\"310\" height=\"201\" alt=\"\" align=\"center\" \/><\/li>\n<\/ol>\n<p><em>(images from Wikipedia)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-faq"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":1,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":661,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions\/661"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}