Slashdot Mirror


Building a Programmer's Rosetta Stone

Did you ever run into the problem where you knew how to do something in one programming language, but really needed to do it in another? That's what Rosetta Code is all about. A variety of programming tasks are solved using as many languages as possible. You can examine existing tasks, or create your own.

8 of 215 comments (clear)

  1. if you like this... by taybin · · Score: 3, Informative
    1. Re:if you like this... by Coryoth · · Score: 3, Informative

      Also worth looking into is LiteratePrograms which provides a wide range of algorithms written (and documented - hence the "literate" part) in a wide variety of languages. Currently there are over 50 different "Hello World" programs in different languages, including such things as AliceML, AspectJ, Haskell, and Oz, as well as all the usual suspects. More to the point, it also includes a decent variety of more interesting algorithms, including basic sorting algorithms (quick sort, merge sort etc.) in a wide variety of languages, right the way up to a basic GUI file manager in GTK. It's a Wiki, and still growing, but it seems to be well ahead of RosettaCode at the moment.

  2. Been Done by WED+Fan · · Score: 3, Informative

    It's already been done. Planet Source Code does this already, and it's been around for ages. You can find code examples and complete projects.

    Then for projects in the .NET set there are a number of online translators that do C#VB.NET. Very good for moving code between different types of projects.

    Now, something that would be truely useful would be a service that would do translations from a wider variety languages.

    --
    Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.
    1. Re:Been Done by Zontar+The+Mindless · · Score: 3, Informative

      Planet Source Code is not that hot. There's heaps of trivial examples that just aren't done very well - like a "new" PHP4-style class for connecting to MySQL which hard-codes "localhost" for the server name. I guess the guy hasn't heard of mysqli?

      The quality of the writing itself is pretty bad, too. People who are purporting to teach you something ought to be a bit more... well... literate.

      Neither am I inclined to be overly impressed when a site throws 175+ JavaScript and CSS errors in Firefox in just the first 2-3 pages. (I didn't bother counting the errors after that point.)

      --
      Il n'y a pas de Planet B.
  3. Re:No Fair! by Short+Circuit · · Score: 5, Informative

    I would be happy to see other types of programming represented in Rosetta Code. I only included what I already knew. Rosetta Code should be about many things I don't already know. Once the server's no longer slashdotted, stop by blog.rosettacode.org, and I'll make a point to bring up how to add your own programming tasks. (Really, you just have to add a template to the top of of the page. But there are some guidelines.)

  4. Pointless, don't bother! by Anonymous Coward · · Score: 3, Informative

    Did you even bother looking at the site first? Perhaps not as it's slashdotted. The idea isn't bad, but it's just a nearly empty wiki. Not many languages, and looking at some tasks, most of the stuff wasn't very useful. For example, I looked at the file I/O task, and there were no versions for C, C++, Java, C#, VB (not that I'd want that), PHP (idem) nor anything like that - but there was a mIRC scripting version...

    Might be worth posting somewhere once there's actual useful content, but just not now.

    But then again, I'm sure the editors didn't even look at it either before posting. There's nothing news worthy or interesting there - yet.

  5. Re:Usage by Short+Circuit · · Score: 3, Informative

    I'm not sure the right idea is to "know how to do something" in a particular language. If programmers are encouraged to learn algorithms specific to a particular language, how will they ever adapt once their pet language sinks? (By using an algorithm repository to re-learn rote code?) Rosetta Code was largely inspired by a page on Wikipedia where the classic "Hello World" example was shown in a few hundred languages.

    Rosetta Code takes the concept behind Hello World, and spreads it to other tasks.

    At any rate, I think this site has already encountered a problem which is only going to escalate as it grows: code isn't cross-indexed properly at all. For example, there are many "programming tasks" with solutions in C, but there is nothing on the C page. I think this problem stems from the fact they used MediaWiki. Actually, this is (almost) intentional. I want people to be able to learn about the languages they're using. I've been filling in the pages as I've had the opportunity. (I'm a full time college student, and president of a student organization.) Check the page on GCC, for example.

    MediaWiki's great for something like... well, Wikipedia. But it doesn't support a cross-referenced database like this. The wiki concept is good for this site, but the server needs to be running some software designed better to the task. I'm open to suggestions. (And assistance, if it'll go that far.)
  6. In a more focused form by aero6dof · · Score: 3, Informative

    Sourceforge has hosted to Programming Language Examples Alike Cookbook project for a while now. It does something similar, filling out "Perl Cookbook" recipes for a fairly wide range of languages...

    http://pleac.sourceforge.net/