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:
- 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.
- Read up on specs right here.
- Read through /0-how-to-use-these. This folder explains the best way to study this series of projects.
- Then for each /gameX folder you should:
- Read, run and try to understand the code provided
- Write specs for the code in the provided specs-X.md file.
- Hide the original code and try to rebuild it in my-code-X.js using only your specs.
- 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.
- Refactor your tictactoe series into a production-style repo. Study Studentius Ficticious's repo for inspiration.
(This lesson is featured in a post from our blog)