User:Mwn3d/Personal policies: Difference between revisions

Content added Content deleted
(→‎Upgrading tasks from "draft": adding a section about new tasks)
m (Output matching in tasks)
Line 2: Line 2:


In general, if you're not sure, there are [[Rosetta Code:Village Pump|lots]] [[Special:WebChat|of places]] [http://www.facebook.com/pages/RosettaCodeorg/199439093012 to ask] about it.
In general, if you're not sure, there are [[Rosetta Code:Village Pump|lots]] [[Special:WebChat|of places]] [http://www.facebook.com/pages/RosettaCodeorg/199439093012 to ask] about it.
__NEWSECTIONLINK__

==Example removal==
==Example removal==
In general, alternative examples should be added along side older examples (with subheadings added to describe them). Examples should not be removed simply because someone used a slightly different algorithm that "works better". If a better/clearer/more idiomatic version of the same general approach could be done, the example could be changed (but be prepared for undo's and discussions). Examples '''should''' be removed if they are malicious code. An example '''could''' be removed if it is so far off from the task description that a corrected version would look almost nothing like it. In some cases (e.g. an example in a language with a very small community), it may be worthwhile to keep a grossly incorrect example around with proper annotation.
In general, alternative examples should be added along side older examples (with subheadings added to describe them). Examples should not be removed simply because someone used a slightly different algorithm that "works better". If a better/clearer/more idiomatic version of the same general approach could be done, the example could be changed (but be prepared for undo's and discussions). Examples '''should''' be removed if they are malicious code. An example '''could''' be removed if it is so far off from the task description that a corrected version would look almost nothing like it. In some cases (e.g. an example in a language with a very small community), it may be worthwhile to keep a grossly incorrect example around with proper annotation.
Line 32: Line 32:
==Run times==
==Run times==
These should only be added for comparison of two different methodologies in the same language. Comparing run times between languages could lead to language superiority complexes and plain old flaming. Listing a run time for a single approach to a task has almost no value since hardware and other configurations will vary drastically among readers. The goal of RC is to help people learn, not to write the fastest (or shortest or least memory-intensive) programs.
These should only be added for comparison of two different methodologies in the same language. Comparing run times between languages could lead to language superiority complexes and plain old flaming. Listing a run time for a single approach to a task has almost no value since hardware and other configurations will vary drastically among readers. The goal of RC is to help people learn, not to write the fastest (or shortest or least memory-intensive) programs.

==Exact match on output==
Unless the task is to draw something (a picture, a table, a shape, etc.), slight differences in output are not usually a problem. It's better to present the output in a form that is natural to the language (or natural to the reader if it's not too complicated to do so in the language). Tasks here are not tasks for programming competitions or any other kind of evaluation of someone's programming skills. It's usually pretty easy to pick out the "meat" of a task (the specific algorithm, the pieces of information that need to be calculated/presented, etc.). That is the part that needs to be the same across languages. The output is usually just proof that it works.