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.

16 of 215 comments (clear)

  1. No Fair! by Watson+Ladd · · Score: 4, Insightful

    A lot of the tasks assume imperative programing, e.x. assigning values to an array. This should be about algorithms that we can all implement, not code fragments that assume a particular style of programing.

    --
    Inventions have long since reached their limit, and I see no hope for further development.-- Frontinus, 1st cent. AD
  2. Usage by mgiuca · · Score: 5, Insightful

    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?)

    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.

    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.

    1. Re:Usage by cp.tar · · Score: 3, Insightful
      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?)

      But this kind of thing should be very good for someone learning a new language - you know how to do it in one language, now you're looking it up in another one... like learning the most common phrases first when learning a natural language.

      I hope this project will amount to something; it can be really useful.

      --
      Ignore this signature. By order.
  3. Should I be impressed? by Fulkkari · · Score: 4, Insightful

    The site has absolutely no real content. There are only a couple of pages on the whole site. The most advanced thing found there is something along the lines of how to open a file with mIRC scripting (no C/C++/Java) and that bash scripts (usually) start with #!/bin/bash. Oh, please. Should I be impressed?

    --
    I demand the Cone of Silence!
    1. Re:Should I be impressed? by LiquidCoooled · · Score: 3, Insightful

      It got to the frontpage because its an interesting idea.
      The firehose will help with things like this.

      I agree it was empty and its implimentation feels flawed, but it gives a baseline for thoughts other people may be having.
      I know *I* have been thinking about this since I saw it and how it should/could be once filled.

      It gets a thumbs up from me.

      --
      liqbase :: faster than paper
    2. Re:Should I be impressed? by Short+Circuit · · Score: 1, Insightful

      I'm sorry it doesn't meet with your approval. It's a wiki. Care to improve it?

  4. Re:It may prove useful. by arevos · · Score: 4, Insightful

    But as a seasoned programmer I also know that some tasks can't be ported. A more efficient method is to actually resolve the problems at link time since most object files doesn't really care about which language you use. If you look at the programming tasks the website attempts to translate, you'll notice that they are extremely basic and generic. I don't think the aim of the website is to translate some complex library into another language; rather to provide a learning resource where programmers can see how to map simple tasks from one language to another, which presumably will help them better understand a new language. Remember that the original Rosetta stone was used for a similar purpose.

    This site could be useful, but MediaWiki doesn't seem the best tool to use, and the content so far is rather sparse. I'm uncertain whether this will prove a success; it's an interesting concept, but many interesting concepts have fallen by the wayside.
  5. Re:Pointless, don't bother! by JoshJ · · Score: 5, Insightful

    Right now it may be "pointless" for someone looking at it. It is certainly not "pointless" for contributing to it. Posting it to /. , technocrat, and similar means that it will get exposed to a lot of potential contributors.

  6. Re:Pointless, don't bother! by Zadaz · · Score: 2, Insightful

    Then add something.

    Whoops, my fault. Being a hater is easier.

  7. This is the reason why software sucks by Anonymous Coward · · Score: 1, Insightful

    We are always reinventing the wheel, recreating frameworks and libraries from codesnippets. software has failed, if it succeeded then we could just "connect" together from a library of existing "components" / "objects" but no, we have too much fucking ego so we have to always "create" something, must create must create, how about no? Just "BUILD"!

    Are you really afraid to accept that software is a BLUE COLLAR job today? I think that is why we MUST (re)CREATE something every fucking time.

    It is like an arms race, proliferation of code.

    Implement it once and reuse it many times. Yes I know it is the holy grail but this is not a TECHNICAL problem, it is more of a POLITICAL problem. This is why software will continue to suck. /Rant

  8. But... by Brandybuck · · Score: 2, Insightful

    But all Real Programmers know all languages! At least that's what Slashdot keeps telling me...

    AC: Stupid article, the guy could have used Haskell and solved his problems
    BB: But maybe he didn't know Haskell?
    AC: Then he deserves get fired!

    --
    Don't blame me, I didn't vote for either of them!
    1. Re:But... by arevos · · Score: 2, Insightful

      An old saying: "Jack of all trades, master of none."

      This is true for programming as well. You can aquire a deep understanding of a few languages, or basic survival skills in dozens. Aquiring a deep understanding in dozens of languages is a truly exceptional feat. I agree that it's difficult to acquire a deep understanding of most languages. One can study Java and all its related libraries and frameworks for years and still not learn it all. Indeed, my last job was as a Java programmer, and whilst I'm pretty familiar with several web frameworks, libraries and GUI toolkits, I have little knowledge about, say, the SecurityManager class, or J2ME, or JMS.

      But on the other hand, I disagree that a deep understanding of a single language is more useful than a working knowledge of a dozen (as you seem to imply). A good programmer needs to know the limitations of the environment that he or she is working in, and the only way to do this is via comparison. Furthermore, learning different languages exposes you to different ways of thinking about a problem; if you don't learn a good spread of languages, your perspective is severely limited, and this naturally affects your ability to solve problems efficiently. To use a metaphor, I believe stepping back and seeing the whole wood is more important than gaining detailed information about a single tree.

      Finally, I'm not sure I'd say that the only alternative to a deep understanding is "basic survival skills". Perhaps instead:

      You can aquire a deep understanding of a few languages, or a good working knowledge in dozens.
  9. Re:It may prove useful. by arevos · · Score: 4, Insightful

    Just out of curiosity, why not? And what would you suggest instead? A Wiki is essentially just an editable website. It must be manually ordered; tables of contents put in, pages linked to other pages, and so forth. This is find for data that has a very general structure, such as an encyclopaedia or a manual of some kind. But the Rosetta Stone concept is highly structured, cross-referencing programming languages with programming problems, and it seems to me as if this cross-referencing would be better done automatically, rather than making several Wiki pages and maintaining them manually. The site concept would be better suited to some sort of customised CMS, or perhaps something designed from scratch.
  10. Re:It may prove useful. by Raffaello · · Score: 2, Insightful

    Only if you're allowed to write an interpreter or compiler for the more powerful language in the less powerful one.

    This is what has been called the "Turing Tarpit." In a formal logical sense, all turing complete languages are equivalently powerful. But that means that punching holes in a paper tape by hand is technically as powerful as a high level language. We have high level languages so that we don't have to twiddle ones and zeroes.

    High level languages themselves differer in expressiveness. They can all accomplish the same tasks, but some languages make certain tasks a whole lot easier. For some language pairs, the only way to easily accomplish certain tasks in the less powerful language is to write what amounts to "an ad-hoc, informally-specified bug-ridden slow implementation of half of " the more powerful language.

    As a consequence, there is no "basic" or "generic" list of programming tasks. Tasks that one has become accustomed to do in many languages are a non-issue in some other languages. "Design Patterns" in some languages don't exist in certain others because the language itself makes them unnecessary (see Google's director of search quality, and AI expert Peter Norvig's treatment of the subject especially this slide)

    A site like Rosetta Code could only be useful for languages that are so similar that they essentially differ mostly in surface syntax. For languages much different than this their whole paradigms are different, and many of the tasks themselves are no longer the same.

  11. Re:Pointless, don't bother! by Marxist+Hacker+42 · · Score: 2, Insightful

    It must have hit the front page.

    The whole idea of a wiki is for the community to build the content. The Rosetta Code is rather new, of course it's not complete. But it's a damned good idea, and deserves wider advertising so that the wiki will be filled!

    However, having said that, I agree, which is why I wasn't sure about firehosing this journal entry just yet. Better to let the professional FOSS experts at Technocrat have a crack at it first.

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  12. Re:I don't know about firehosing it by Anonymous Coward · · Score: 1, Insightful

    Oh, there we go, modded offtopic now, though criticism of capitalism usually gets you a troll label pretty quick. I guess the kids(mods) were just a bit slow yesterday.

    But this does not explain how an enlightened mod crept in and modded you up earlier. It is encouraging to think that there might be one non-redneck who earned mod points around here.

    The censors here will clamp down on anything critical of the fatal flaws of capitalism pretty quick usually.

    I find it very strange that a basically open source software and nerd site is so strongly dominated by right wing a-holes. They have a way of taking over every public forum I have ever come across. I suspect that they are motivated to defend the evil of capitalism because they know at heart that it is morally just about as wrong and evil as the human soul can get, therefore it needs all the reinforcing propaganda and dogma that it can get.

    Let him who hath understanding...