theotherzach / exercism.io

Exercises with crowd-sourced code reviews.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exercism.io

Application to support working through sequential programming problems, with crowd-sourced code reviews.

Supports two types of users

  • admin/nitpicker
  • practitioner

Supports multiple tracks, e.g.

  • ruby
  • javascript
  • go

A practitioner starts a trail, and is given the first assignment, then follows several rounds of code review until an instructor accepts the assignment.

Both nitpickers and practitioners who have successfully completed an assignment can provide code reviews / feedback / comments on an assignment.

The Data

We are currently working on assignments in:

  • ruby
  • javascript
  • coffeescript
  • clojure

Only ruby currently has been approached systematically.

The warmup exercises are collected from all over the web.

The common data for assignments are in

assignments/shared

This includes some metadata that gets sewn into a README, as well as a blurb that can be shown on the website.

Not all assignments will be appropriate for all languages.

The actual assignment consists of

  • a test suite, where all test are skipped except the first one
  • a sample solution that passes the test suite

Each language is configured with a test extension and a code extension.

For ruby, both of these are 'rb', so the test suite is named:

test.rb

and the sample solution is called

example.rb

For JavaScript, the test extension is spec.js, and the code extension is js, giving test.spec.js and example.js.

The extensions are also used to detect which language a user is submitting an assignment to via the API (they may be on several trails simultaneously).

The languages/trails are configured in lib/exercism.rb.

The list of assignments is just a really big array of assignment slugs in the order that they will be assigned.

Different languages/trails do not need to have the same assignments or the same order.

Setup

  1. Install mongodb with: brew install mongodb then follow instructions to load the server at startup. Ensure that server is running
  2. Install gems with: bundle
  3. Get a client id/secret from Github at https://github.com/settings/applications/new.
  1. Add yourself to the admin_users method in user.rb
  2. Run the seeds with ruby scripts/seed.rb
  3. Start server with: EXERCISM_GITHUB_CLIENT_ID=xxx EXERCISM_GITHUB_CLIENT_SECRET=xxx rackup -p 4567
  4. Login at http://localhost:4567.

Optional steps

Copy the export values from scripts/boot.sh.example into your ~/.bash_profile or ~/.zshrc or Copy bootrunner cp scripts/boot.sh.example scripts/boot.sh

Testing

Run tests with: rake test

About

Exercises with crowd-sourced code reviews.


Languages

Language:Ruby 78.0%Language:JavaScript 15.4%Language:CoffeeScript 4.7%Language:Clojure 1.9%