I would like to compare 25+ different coding (same programming language, if possible Java but other languages are fine too) implementations of the same homework. Where can I find such homework solution datasets?

  • Thanks, but the difficulty of obtaining such data set says long on the lack of data sharing culture in academia (+ privacy hampering research)... I am hoping some MOOC will release interesting data sets at some point, although they are fighting with lawyers right now (not sure how actively though). Commented Mar 29, 2014 at 4:23
  • Does it have to be homework specifically? You could put together a 'code challenge' and post it CodeGolf.SE
    – Joe
    Commented Mar 31, 2014 at 1:49
  • Any homework is good, but simple homework is better (say < 200 SLOC). I fear golfing around might produce some weird code :) and also I'm interested in commonalities between solutions while SE golf solutions try to not overlap too much. I have just made my that that request PL-independent to broaden the search. Commented Mar 31, 2014 at 2:10
  • Are you looking for datasets?
    – Ulrich
    Commented Apr 4, 2014 at 9:43

3 Answers 3


Including to other answers, here is one that may help to create a database.

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

As the about section said, project Euler is a collection of many mathematical problems and users try to solve them one by one with programming languages. Unfortunately, there isn't a limitation on the programming language you have to use. But if someone track them and collect only those that want, it would create a nice database.

  • I don't know if Project Euler shares their participants' code, but many are hosting on GitHub: github.com/…
    – philshem
    Commented Apr 2, 2014 at 8:26
  • They don't have an api to share them, but when I am logged in, I can see the forum with all the answers.
    – Tasos
    Commented Apr 2, 2014 at 8:33
  • 1
    Let the scraping begin!
    – philshem
    Commented Apr 4, 2014 at 7:28

Note: I've been thinking about this question since it was asked because I think doing text analysis on human-typed computer programming langauges is a very novel idea. I don't think this answer is spot-on, but I hope that it starts the discussion and gets us to a better answer.

The idea

  • GitHub is the source of many programming codes these days, in addition to other resources (data sets, code snippets, writing, team projects, etc).
  • Many courses and contests require or suggest posting code to GitHub. For that reason, you have many implementations of the same "homework" or assignment.

Option 1:

  • Kaggle is a predictive modeling and analytics competition (contest) platform with many projects and 95,000 participants (source).

  • Participants may post their code submissions to GitHub.


  • Visit GitHub and search "kaggle" - direct link

  • The left menu bar has a breakdown by programming language. Kaggle is heavy with R and Python. The popularity of Java with data-science people is decreasing (more info here). Or maybe it is just Java in general - N-grams link, indeed.com job trends.

Search results from "kaggle"

  • So let's choose Python from the filter - search results.

  • One recent contest was a handwritten digit recognizer. 36 Python results for searching "kaggle digit" and 30 "kaggle digits" on GitHub. Here is a random example of code.

  • You can see contests have the largest turnout, and then create GitHub searches for those in particular. After some digging you may find one that is Java-centric.

  • These repositories can be easily and openly be obtained. If you aren't familiar with Git, you can download all the code, or use their API to search and collect code that meets your criterea. Here is the documentation about API search.

Option 2:

Option 3:


Rosetta Code might help you in your task :

Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another. Rosetta Code currently has 711 tasks, 131 draft tasks, and is aware of 530 languages, though we do not (and cannot) have solutions to every task in every language.

You can find all the programming tasks on the relevant page and on the page with candidates.

  • 1
    Thanks but for a given problem each solution is written in a different different language. +1 though as it might be useful someday! Commented Mar 31, 2014 at 14:04
  • Oops, I didn't read your question properly indeed.
    – SylvainD
    Commented Mar 31, 2014 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.