Template repo for th Code Specs & Refactoring project:
Branch: master
Clone or download
Pull request Compare This branch is 39 commits ahead, 6 commits behind gh-pages.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
0-how-to-use-these
game0
game1
game2
game3
game4
game5
game6
more-samples
LICENSE.md
README.md
tictactoe.css

README.md

TIC TAC TOE refactor

This series of mini-projects builds up to a uselessly simple tictactoe board. You're thinking "Guh. Why another tictactoe?". Well, because you probably know how to play already and maybe even wrote your own tictactoe app before. Hopefully this means you'll be able to spend more time thinking about specs and good programming, and not so much time figuring out what you're supposed to be making. We're here to learn after all.

The primary learning objective for this lesson is to understand how to use detailed code specifications as a tool for reading and understanding source code. We believe this is an invaluable skill both for beginners trying to learn what code means, and for more experienced programmers beginning their careers as developers. This is why we place specs at the core of our curriculum. You learn to plan projects with specs and to collaborate with specs. Many projects and assignments are assigned as specs, and for every project you will be expected to turn in accompanying documentation (ie. reader-friendly specifications).

We recommend you follow these steps:

  1. Set up your dev environment: fork or clone this repo, open it in your favorite text editor, and get your browser ready. Set aside at least a half-hour to get your head in the game. To learn the most from these examples you need to study them in a very special way, it'll take a little getting-used-to but it's totally worth your time.
  2. Read up on specs right here.
  3. Read through /0-how-to-use-these. This folder explains the best way to study this series of projects.
  4. Then for each /gameX folder you should:
    1. Read, run and try to understand the code provided
    2. Write specs for the code in the provided specs-X.md file.
    3. Hide the original code and try to rebuild it in my-code-X.js using only your specs.
    4. Take some notes on what you just learned. Be sure to note what changed from the last version and what that change did for the application. Then move on to the next folder.

By the time you're finished, you'll have learned a few tricks for building clean projects. More importantly, I hope you'll have a new appreciation for how helpful specs can be.

Challenge:

(This lesson is featured in a post from our blog)