Thursday, October 2, 2008

Crowd Programming

Now here is one of these weird ideas I keep having, although people are asking me to cut the crap. But I think, as usual, that it is really great, and so I leave it up to you to decide if this makes sense, or just constitutes a parody of a Web 2.0 service.

Imagine a webservice for programmers, let's call it "Codr", where programmers would translate each others verbal commands into code for, let's say, Python.

A typical example:
  1. Jane logs into Codr and adds a verbal command she'd like to see translated, such as "print out the square root of a number".
  2. John likes to translate verbal commands into code, sees the verbal command on the "new commands to translate" page and translates it into his favorite programming language, Python. The translation reads print math.sqrt(number). Codr is able to deduce required modules and input variables from the given statement, so it can put the statement into other contexts. John also marks "a number" from the command to be replaceable by any int or float datatype.
  3. Now Joe logs into Codr and adds a meta-translation for "print the distance between two points", which goes like "for each dimension of a point, subtract the destination number from the starting number, multiply each result with itself, add up all results, then print the square root of the result." Some of these statements still need translation, but the last statement could already be replaced by its translation.
Over time, the database would be filled with semantic translations which would create a huge database of code snippets where users could search for a recipe to solve a coding problem, and since statements can be combined to greater statements, at some point, coders could merely state their intentions of what the code should do, and the site would translate recursively all parts of the implications where Python translations are available.

The longer the site runs, the more problems can be solved, maybe even for different frameworks and languages. Also, library coders could write translations for how their library would solve the problem, for example.

1 comments:

bohan said...

This would be very helpful for people like this:
http://dontclickthis.whatingods.name/asp-rnd.png