Skip to content

Exercises with crowd-sourced code reviews. The gem repo is at http://github.com/kytrinyx/exercism

License

Notifications You must be signed in to change notification settings

Thiez/exercism.io

 
 

Repository files navigation

exercism.io

Build Status

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

WARNING

This an early-stage experiment. In other words: Shield your eyes, children, the code is bolted on.

We welcome contributions as we work to figure out what this beast is.

Features may be here today, gone tomorrow.

What we think we know

The discussions are the most important thing in the application. That and the evolution of the code. It's not about getting code perfect or right, but using the pieces of code to talk about the little details of what makes code expressive.

Each code submission seems very ephemeral right now. You submit. You resubmit, the old submission goes into hiding along with the discussion about it.

There are excellent discussions, and it would be great to be able to extract the learning from these discussions, perhaps into blog posts, perhaps into checklists to help teach nitpicking.

We believe that there's learning in doing the exercises and receiving feedback, and there's also learning in reading other people's code and providing feedback.

It would be great if there were a way to have meta-discussions about providing feedback.

The messaging right now is a disaster. The site is confusing, the process is opaque, and it's hard to figure out where you need to look to figure stuff out.

The Data

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 pending 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:

SLUG_test.rb

and the sample solution is called

example.rb

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/curriculum/LANGUAGE.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 or apt-get install mongodb
  2. Get it running: follow instructions to load the server at startup. Ensure that server is currently running
  3. Install gems with: bundle
  4. Get a client id/secret from Github at https://github.com/settings/applications/new.
  1. Run the database seed with ruby scripts/seed.rb
  2. Start server with: EXERCISM_GITHUB_CLIENT_ID=xxx EXERCISM_GITHUB_CLIENT_SECRET=xxx rackup -p 4567
  3. Login at http://localhost:4567.
  4. Run MailCatcher with mailcatcher, and open your browser to localhost:1080.

Frontend development setup

  1. Install node and npm
  1. Install lineman via sudo npm install -g lineman
  2. cd frontend and start lineman with lineman run
  • note lineman watches for file changes and compiles them automatically, it is not required to be running for the server to run

Sending Emails

If you want to send actual emails, you will need to export the following environment variables:

  • EMAIL_USERNAME
  • EMAIL_PASSWORD
  • EMAIL_DOMAIN
  • EMAIL_SMTP_ADDRESS
  • EMAIL_SMTP_PORT

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

Console

There's a script in bin/console that will load irb with the exercism environment loaded.

Testing

Run tests with: rake test

Make sure that mailcatcher is running.

Code coverage

To enable code coverage run:

COVERAGE=1 rake test

Browse the results located in coverage/index.html

Deployment

Let Heroku know that Lineman will be building our assets. From the command line:

heroku config:set BUILDPACK_URL=https://github.com/testdouble/heroku-buildpack-lineman-ruby.git

Contributing

Fork and clone. Hack hack hack. Submit a pull request and tell us why your idea is awesome.

License

GNU Affero General Public License

Copyright (C) 2013 Katrina Owen, [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

About

Exercises with crowd-sourced code reviews. The gem repo is at http://github.com/kytrinyx/exercism

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published