[Home]Algorithms on Wikipedia

HomePage | Recent Changes | Preferences

Showing revision 7
Wikipedia, unlike most traditional Encylopedias, contains detailed descriptions of many algorithm, often with sample implementations.

This is draft of hints for good sample implementations of algorithms for Wikipedia. Further discussion is invited.

The main purpose of sample implementations is to help reader understand the algorithm, not to provide ready-to-use code. Implementations should be easy to read and understand for average UNIX programmer.

Choosing appropriate language is important. Suggested languages are Ruby, Python, and, for algorithms that need lower-level features, C. Some algorithms might benefit from using another kind of language. In that case language that average reader is most likely to understand should be used. For example it's usually better to use C++ or Java instead of Smalltalk or Eiffel. Using dialects of Pascal and BASIC or Perl with too much magic is discouraged.

It's good to avoid language-specific constructs in examples. Using iteration? is usually prefered over using tail recursion because this is more popular way of coding and because popular implementations of some languages do not support constant-space tail recursion.

In case when these hints aren't sufficient to make decisions, it's ok to provide more than one sample implementation.

Alphabetical list of Algorithms on Wikipedia

/Talk


HomePage | Recent Changes | Preferences
This page is read-only | View other revisions | View current revision
Edited December 13, 2001 2:08 am by 198.103.96.xxx (diff)
Search: