Tuesday, February 25, 2014

Week 4 Day 2: I Am But Thy Humble Server

Major activities of the day: We started out today with a lab debugging a program with some intentionally inserted bugs (lack of require statements, a missing bracket, an improperly parsed hash, etc.)  It was a great way to get a taste of taking over a code base, having to analyze it and understand what's doing what, then zero in on the problems and debug.

We broke for blog posts (as usual), and then went immediately to work on a lab to learn how to use Rack, a simple server for constructing web apps.  It drills through a stack of middleware, then works its way back up, finally producing content which is sent back to the user.  We practiced adding middleware and creating a stack that returns a specific result, which is dependent on accessing the env (environment) argument which is passed in when each piece of middleware is called.

After lunch, we had another lecture discussing how the internet works.  The highlight was a demo with actors (i.e. student volunteers) pretending to be a client, a DNS, and a set of servers with different information.

Finally, we worked through another lab about Rack middleware, generating middleware and using it through the Config.ru file.

Skills developed: Debugging other people's code, Rack

QOTD: "Anyone who has lost track of time when using a computer knows the propensity to dream, the urge to make dreams come true and the tendency to miss lunch." - Tim Berners-Lee

No comments:

Post a Comment