exercism

The devil is in the details

Practice

About

Solve Problems (62! in the JavaScript track)

Mentor

Provide useful critiques (nits) to others' solutions

Make the tests pass

You start with some code. Talk about it a little.

Rewrite the code a bit, then post the new version. Make it better.

After a few cycles you've got improved code, and perhaps even a new friend!

Challenge

Benefits

Non-trivial exercises

Feedback

Get (and give) targeted feedback

No hand-holding tutorials

Start conversations about the code, best practices

Install the CLI

Workflow

Configure the CLI

Fetch an exercise

Solve the exercise

Make the tests pass

Submit for review

1.

2.

3.

4.

5.

6.

Review other solutions

7.

Mac

Install CLI

Linux

brew tap homebrew/binary
brew install exercism
curl -O https://raw.githubusercontent.com/exercism/cli-www/master/public/install
chmod +x install
./install

Windows

1.Download the zip file for your Windows version (32-bit or 64-bit).
2.Extract exercism.exe to a folder of your choice.
3.Add that folder to your PATH.

Configure CLI

exercism configure --key=YOUR_API_KEY

Find your API Key

Set the CLI API Key

Fetch Exercise

exercism tracks

Get a list of all tracks

exercism fetch javascript

Fetch first problem in JavaScript track

Solve Exercise

Create a file with name of exercise 

var Bob = function() {};

Bob.prototype.hey = function(what) {
    // Your solution to the exercise goes here
};

module.exports = Bob;

It should be able to be loaded by npm:

(JavaScript)

e.g. for "Bob" exercise, create

bob.js

Use your normal editor to write the code

Hint: You can use ES2015 syntax

Make Tests Pass

Install jasmine-node

Enable more tests

(JavaScript)

Run the test suite

npm install -g jasmine-node
jasmine-node bob_test.spec.js
// To enable a test, remove the "x":
xit("shouting", function() {...});

// Becomes:
it("shouting", function() {...});

Submit Exercise

exercism submit path/to/your/code.js

When you're ready

exercism unsubmit

Oops, didn't mean to submit 

exercism submit path/to/your/code.js

Make another iteration

Made with Slides.com