ArticleslgStudy

science

Rosetta Code

Rosetta Code is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Rosetta Code rather than just read about it. In short: Rosetta Code is a wiki-based programming chrestomathy website with implementations of common algorithms and solutions to various programming problems in many different programming languages. It is named for the Rosetta Stone, which has the same text inscribed on it in three languages, and thus allowed Egyptian hieroglyphs to be deciphered for the first time.

Rosetta Code — main illustration
Rosetta Code — illustration

Key takeaways

  • Rosetta Code belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Rosetta Code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Rosetta Code from memory before moving on to harder problems.

Reference excerpt

Rosetta Code is a wiki-based programming chrestomathy website with implementations of common algorithms and solutions to various programming problems in many different programming languages. It is named for the Rosetta Stone, which has the same text inscribed on it in three languages, and thus allowed Egyptian hieroglyphs to be deciphered for the first time.

Website Rosetta Code was created in 2007 by Michael Mol. The site's content is licensed under the GNU Free Documentation License 1.2, though some components may be dual-licensed under more permissive terms. The Rosetta Code web repository illustrates how desired functionality is implemented very differently in various programming paradigms, and how "the same" task is accomplished in different programming languages. As of 22 February 2024, Rosetta Code has:

1,266 computer programming tasks (or problems) 404 additional draft programming tasks 933 computer programming languages that are used to solve tasks In August 2022, Rosetta Code migrated from independent hosting to Miraheze.

Data and structure The Rosetta Code site is organized as a browsable cross-section of tasks (specific programming problems or considerations) and computer programming languages. A task's page displays visitor-contributed solutions in various computer languages, allowing a viewer to compare each language's approach to the task's stated problem. Task pages are included in per-language listings based on the languages of provided solutions; a task with a solution in the C programming language will appear in the listing for C. If the same task has a solution in Ruby, the task will appear in the listing for Ruby as well.

Languages Some of the computer programming languages found on Rosetta Code (which have Wikipedia descriptions) include:

A complete list of the computer programming languages that have examples (entries/solutions to the Rosetta Code tasks) is available.

Tasks Some of the tasks found on Rosetta Code include:

See also Example-centric programming Wikifunctions – Wikimedia open library of reusable code

References

External links Official website

Illustrations

Rosetta Code illustration

Worked examples

Example 1 — a first encounter with Rosetta Code

Start with the simplest possible case. Write down what Rosetta Code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Rosetta Code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Rosetta Code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Rosetta Code

In research
Rosetta Code appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Rosetta Code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Rosetta Code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Programming language comparisons, Programming languages, Wikis about programming, so understanding it makes those chapters shorter.
In everyday life
Look for Rosetta Code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Rosetta Code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Rosetta Code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Rosetta Code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Rosetta Code in simple terms?

Rosetta Code is a wiki-based programming chrestomathy website with implementations of common algorithms and solutions to various programming problems in many different programming languages. It is named for the Rosetta Stone, which has the same text inscribed on it in three languages, and thus allo…

Why does Rosetta Code matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Rosetta Code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Rosetta Code.

Tags

  • Programming language comparisons
  • Programming languages
  • Wikis about programming

Keep exploring