Git Product home page Git Product logo

pminten / exercism.io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exercism/exercism

0.0 2.0 0.0 8.76 MB

Exercises with crowd-sourced code reviews.

Home Page: http://exercism.io

License: GNU Affero General Public License v3.0

Ruby 33.43% Clojure 5.30% CoffeeScript 2.52% Elixir 6.66% Erlang 2.28% Go 2.25% Haskell 16.92% Java 0.79% JavaScript 18.35% Objective-C 3.62% PHP 0.66% Python 4.30% Rust 1.82% Shell 0.33% CSS 0.76%

exercism.io's Introduction

exercism.io

Build Status Code Climate Gemnasium

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.

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

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 postgresql with: brew install postgresql or apt-get install postgresql-9.2
  2. Copy .ruby-version.example to .ruby-version if you use a Ruby version manager such as RVM, rbenv or chruby
  3. Install gems with: bundle
  4. Get a client id/secret from Github at https://github.com/settings/applications/new.
  1. Presuming you have Postgres installed (if not: brew install postgres):
  • create db user with: createuser exercism
  • create database with: createdb -O exercism exercism_development
  1. Run the database migrations with rake db:migrate.
  2. Run test database migrations with RACK_ENV=test rake db:migrate (This is only useful for test environment)
  3. Run the database seed with rake db:seed (if you want LOTS of data: rake db:seed[1000] or some other big number).
  4. Copy the boot script scripts/boot.sh.example to scripts/boot.sh and fill in your GitHub details
  5. Start the server with ./scripts/boot.sh
  6. Login at http://localhost:4567.
  7. Run MailCatcher with mailcatcher, and open your browser to localhost:1080.
  8. Work through 'Frontend development setup' below and run lineman for correct styling at http://localhost:4567

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

You can do this in scripts/boot.sh for development.

Console

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

Testing

Make sure your migrations are up-to-date with: rake db:migrate RACK_ENV=test

Make sure that mailcatcher is running.

Run tests with: rake test

To run a single test suite, you can do so with:

ruby path/to/the_test.rb

If it complains about dependencies, then either we forgot to require the correct dependencies (a distinct possibility), or we are dependening on a particular tag of a gem installed directly from github (this happens on occasion).

If there's a git dependency, you can do this:

bundle exec ruby path/to/the_test.rb

For the require, you'll need to figure out what the missing dependency is. Feel free to open an issue on github. It's likely that someone familiar with the codebase will be able to identify the problem immediately.

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

Thank you for wanting to contribute! โค๏ธ๐Ÿ’–โค๏ธ

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

For more details, please read the contributing guide.

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.

exercism.io's People

Contributors

arr-ee avatar bryanschoeff avatar bxt avatar cypher avatar darthstrom avatar doncruse avatar etrepum avatar gaelan avatar henrik avatar ihid avatar jeremy-w avatar jordelver avatar keighty avatar kytrinyx avatar lalalainexd avatar markijbema avatar maxim-filimonov avatar meaganewaller avatar mikegehard avatar robinhilliard avatar rubysolo avatar seeflanigan avatar sgrif avatar splattael avatar tevanoff avatar theotherzach avatar tmcgilchrist avatar tonkpils avatar vosechu avatar wilmoore avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.