hacker-school-friday-june-27th-2014

In Friday's job preparation workshop, we were writing a task that is interfaced through a web server. I have never written a web server; well, not since 2001 or so. It was good to get a basic idea of what tools to use to do this. Since I am working in Python, Tom recommended I use Flask, because it is easy to get started. I think that was a good call. I didn't complete the actual project, because I spent all of my time learning how to use Flask, but that was a fine use of time, and I got far enough that I felt good about it. I now feel like I could build a basic web-based program without struggling overmuch on the server part of it. I at least know where to find the answers to likely problems.

The task reminded me of a personal project idea I have. It is a web-based game with two players. The players will have a joint session, and they will both respond to a specific input. When both have committed a response, their responses are revealed and the next iteration starts. It seemed to me like Twisted Web would be a good way to do this.

Emboldened by my success with Flask, I started trying to learn Twisted Web. This was harder. I did several of the examples in a succinct series by Jean Paul Calderone called Twisted.Web In 60 Seconds. The examples assume little outside context, and don't waste time. I thought they were well done.

However, there came a point where I seemed unable to generalise and get variations of the examples that I was thinking of working. I started feeling a characteristic physical discomfort that I experience only in the context of programming frustration. This is the first time I've felt it since I got here, even though I've had some other frustrations. It was a signal to stop and rethink.

After a break, I decided that this indicated that I didn't understand the underlying model well enough, and that I was seeking a solution with too shallow a commitment to learning. So I have committed to approaching the task as a Beginner, and trying again. I plan to start with this more comprehensive document, Configuring and Using the Twisted.Web Server.