Help:Adding a new programming task

From Rosetta Code
Revision as of 00:37, 16 January 2007 by MikeMol (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Adding a new programming task is tricky. Not because it's technically difficult, but because it's difficult to do properly.

Defining Your Criteria

A programming task needs to have a set of criteria, or things that subsequent programming examples need to accomplish. One example might be, Display the string "Goodbye World!" Another example might be Read the contents of one file, and place it in a new file.

The criteria you set should not be so tight as to be language-specific. After all, that defeats the founding point of Rosetta Code. However, the criteria should not be so vauge as to have multiple interpretations. Removing code from the wiki would be the tragic result. Situations where the appropriateness of a programming example hinges on the interpretation of the tasks' criteria should be avoided as much as possible.

Also, keep in mind that it will be very difficult to change the criteria once a few programming examples have been supplied. For every change, the code examples need to be reviewed to ensure they still satisfy the criteria. That's time consuming and difficult to do, as not everyone will have access to all the tools used to create and test the original examples.

If you're unsure about how to define your criteria, bring up your idea on the request page for programming tasks.

Creating the page

You may want to do this in a separate window, if you intend to keep reading this page as you work.

Once you've settled on criteria, the rest is easy. To create the task page, you need to navigate to where the page should be. The easiest way to do that is to type the name for your programming task in the Search box on the left, and click Go.

Click on "Create this article".

Task template

The first line of any Programming Task should be the task template. The task template describes the page as a programming task, and gives cursory instructions on how to add a programming example. It also adds the page to the Programming Tasks category, so that Rosetta Code users who wish to see all of Rosetta Code's programming tasks may navigate to the Programming Tasks category index page.

Task Body, First Example

Once you've added the programming task, you need to include the task criteria. Go ahead, type them in. Following that, you should include a programming example that satisfies your criteria. This does two things.

First, it prevents Rosetta Code from filling up with incoplete tasks. Most visitors to Rosetta Code don't actually add content; they're only here to look. If all they find are empty tasks, they won't take much interest in the site.

Second, it clarifies your criteria. In the case that your criteria weren't clear enough already, having a programming example gives other programmers a template to work with.

Conclusion

At this point, you're ready to see how your page will look. Click Preview Page, and you'll see what the page looks like, complete with the template at the top descibing the page as a programming task.

Once you're satisfied, you may click Save Page, to finish the creation of the programming task. At this point, you're looking at the programming task as it appears to all the other Rosetta Code users.

Thank you for showing an interest in contributing to Rosetta Code!