Extra Mile Algo Standard (EMAS)

The purpose of this standard is to help make the task of implementing an algorithm in software a quick one - all the way from finding some source code to full integration and testing.
Many algorithms exist out there. A fair proportion exist on the internet but trying to find them is often a very frustrating process. Say you want the source code for the Luhn algorithm written in C that works on Visual Studio 6. An internet search for "Luhn VC6 C source code" is probably your best bet. Unfortunately I think it would probably take a while to find something half workable. "VC6" and "C" stand for many things! In my opinion, publishers just need to go the proverbial "extra mile."
A part of the extra mile this standard encourages publishers to go is to use tags for languages and IDEs (see below for a comprehensive list of tag names) so that the search is narrowed to pages that a) adopt the standard and b) are for the desired language/IDE. Your internet search now becomes "Luhn langu-c ide-vc-6."
A further part of the extra mile (and arguably the most important part in fact) is to provide some test cases. Someone may not even by needing to download your code because they already have their own implementation. It is comforting, however, to know that they are arriving at the same answers. The example program available to download should use a class for the algorithm section itself, using a wrapper that feeds the test cases (read from an XML file) through it. Some people may just be seeking the answer to a particular test case. They can then edit this XML file and get the answer they need.
Below is a reference for the standard and here's an example page made for my implementation of the Luhn algorithm.
Download templates to create your own pages here.
=====

[Algorithm Name]

Provide a brief description of the algorithm. Include anything that aids understanding of how it works - perhaps an image of the pseudo-code listing. Be imaginative! Don't make this too long. The code should hopefully explain itself adequately.
Language:Let the search engines do the hard work. One or more of langu-c, langu-cpp, langu-vb, langu-java, langu-php, langu-csharp (suggest a language I've missed)
IDE:Again, make these tags easy to find via the internet search engines. ide-vs, ide-vs-6, ide-vs-7, ide-vs-8, ide-borland (suggest an IDE I've missed)
Test cases:Test cases are crucial for validating that the implementations of the algorithm has been successful. Have a list, preferably five or more, of test cases with expected answers. For example, your algorithm may find positive square roots really quickly. Some test cases might then be -
  1. "0" returns "0"
  2. "9" returns "3"
  3. "36" returns "6"
  4. "1" returns "1"
  5. "4" returns "2"
Download:Provide links to each download package, displaying the version date, version number and any additional information.
Reference:Provide a link to your reference material, be it from some published paper, or some book. This is not essential, but it's nice to give credit where it's due. Even if they themselves didn't provide test cases! If you found an algorithm and improved it, quote and link the original authors. Similarly, if you know that a better implementation exists elsewhere, please be big enough to refer your user to it (maybe in the brief description).
Contact:Some form of feedback loop needs to be in place so that folk can contact you, the author. Peer review can only improve the quality of your code. Usually this will be an email address or a link to a contact form.
Extra Mile Algo Standard (EMAS) compliant.
=====

If you wish to put advertising on your page, add donation buttons, use a different css style sheet - that's no problem. I am not the enforcer. This standard exists to help people, therefore if you think your page does conform to the standard, feel free to say "EMAS compliant." Drop me an email as well and I'll probably link to it.
Some algorithms are protected by law from publication. If you know that you shouldn't share a particular piece of Intellectual Property, please don't.
Comments