Apprenticeship at 8th Light - Week 4

Task: Play tic tac toe in a browser

Last week I spent a significant amount of time chasing down a configuration bug in my .rvmrc file. I was getting a message:

“error: cannot load such file -- rack/protection/frame options”

I didn’t really know what rack is or does, and after some tinkering around my understanding is that it is part of the framework upon which Sinatra is built, so that meant something was wrong with the configuration. Once I got rid of the .rvmrc file everything started working again. This was both enlightening and a relief. Enlightening, because I found the solution to my problem. A relief, because had I continued down the route of setting up a virtual machine (or multiple tries at setting up a VM) I could have wasted even more time because the problem .rvmrc file would have remained in my VM load path, causing the error to persist.

After resolving this issue I was able to map out some of the things I will need to learn in order to make my tic tac toe game playable on the web. A partial list:

- HTML
- HTTP methods
- web cookies
- embedded Ruby
- API patterns
- Ruby Gem creation and use

Ultimately my user interface class must be abstracted one level further such that any user interface can be substituted for it. In addition, the Liskov Substitution Principle must be adhered to. The LSP states that “Subtypes must be substitutable for their base types” (Agile PPP, 111). That is, any other user interface should be able to substitute in place of my console user interface without interfering with any other parts of the program.