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.
We are currently working on assignments in:
- ruby
- javascript
- coffeescript
- clojure
- elixir
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/sharedThis 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.rband the sample solution is called
example.rbFor 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.
- Install mongodb with:
brew install mongodborapt-get install mongodb - Get it running: follow instructions to load the server at startup. Ensure that server is currently running
- Install gems with:
bundle - Get a client id/secret from Github at https://github.com/settings/applications/new.
- Name: whatever
- URL: http://localhost:4567
- Callback url: http://localhost:4567/github/callback
- Run the database seed with
ruby scripts/seed.rb - Start server with:
EXERCISM_GITHUB_CLIENT_ID=xxx EXERCISM_GITHUB_CLIENT_SECRET=xxx rackup -p 4567 - Login at http://localhost:4567.
- Run MailCatcher with
mailcatcher, and open your browser to localhost:1080.
- Install node and npm
- osx: brew install node
- others see: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
- Install lineman via
sudo npm install -g lineman cd frontendand start lineman withlineman run
- note lineman watches for file changes and compiles them automatically, it is not required to be running for the server to run
If you want to send actual emails, you will need to export the following environment variables:
EMAIL_USERNAMEEMAIL_PASSWORDEMAIL_DOMAINEMAIL_SMTP_ADDRESSEMAIL_SMTP_PORT
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
There's a script in bin/console that will load irb with the exercism environment loaded.
Run tests with: rake test
Make sure that mailcatcher is running.
To enable code coverage run:
COVERAGE=1 rake test
Browse the results located in coverage/index.html
Let Heroku know that Lineman will be building our assets. From the command line:
heroku config:set BUILDPACK_URL=https://github.com/theotherzach/heroku-buildpack-lineman-ruby.git
This is a really weird request, but as long as this is a private repo every time someone forks it, all the collaborators get added to the fork as collaborators, which seems a bit excessive.
I'd be delighted if you just worked on branches on the main repo and submit pull requests from there, until we get to a place where we know where this is going, and can open source the thing, at which point we can use the usual GitHub flow with forks etc.