This is learning diary post from Uni Helsinki course Software Factory / Facebook academy – SocketIO team. For more info about this course read “Ready, Set, Start Coding!”.
You can find open issues and questions I collect from past week in my quick project notes.
Too long travel time
At the weekend all the members of Facebook Academy traveled to San Francisco for the kickoff hackaton meeting in Palo Alto. The trip from Paderborn to San Francisco was extremely tiring. I had to leave Paderborn the night before my flight since, there were no trains going to Dusseldorf airport early enough to catch my flight to Paris, where I had my change. So I left Paderborn around midnight via Soest to Dortmund and finally Dusseldorf Airport for my flight around eight o’clock.
Hackaton weekend in San Francisco
At the first day we had a bus transportation to University of Stanford, where Jay Borenstein welcomed us to this year’s Facebook Academy. Afterwards Scott Chacon GitHub Co-Founder gave a speech ‘How to use GitHub’. I would argue that for most of the people there using GitHub is trivial, but luckily the talk was about how to use GitHub “profoundly”.
Three interesting days in the coding hive
Next stop on was Facebook office and a meeting room, that turned out to be the geek hive for us, where we would spend the next two and a half days. Socket.io -team had a big table reserved at the middle of the room. After short and really informal introductions we gathered around the table for confronting the bugs in Socket.io.
From test case to fixing a feature
In the Hackaton I continued fixing the issue what I had started earlier issue 232, creating a simple test case for FlashSocket support in Engine.io-client. Even from the beginning the issue seemed so small that there had to be something buried.
As thought it turned out that FlashSockets was never tested and seemed that no one had ever used it in Engine.io-client. There was something wrong even though the implementation works in Socket.io.
The first encountered problem was that Engine.io did not receive flash socket policy request from web-socket-js module/flash. With the help of Roman, our second mentor, we figured out that the problem was Node.js’s way of handling messages and how fast path is implemented.
Flash policy request, a message that has no headers and contains only following:
Finally the mentors decided that Engine.io would not implement flash policy handling at all and Engine.io-client would implement a way to specify where flash policy could be downloaded. Responsibility of providing the policy would be user’s , they could easily implement own policy request handling server, as in this example.
Other obstacle on the way was that in Engine.io policy handling had some obsolete legacy code that was never called, this caused some extra confusion on the way to finding out what was wrong.
The greatest learning experience of this whole thing was how to debug Node.js program. For anyone encountering problems with Node.js I would recommend using debug module and extensive use of debugger; – call that fires up debugger in browser.
Visiting Humble Bundle office
Facebook provided us hotel rooms for our official and after that I stayed at my friend’s place, who works at Humble Bundle and visiting their office in the center of San Francisco was one of the nicest things during my trip.
Trudging around San Francisco
On Tuesday and Wednesday I had plenty of time on my own since my friend went back to work, so those were the days for sight seeing. Here couple of pictures from the way.
Next things on the list
I am planning to write stress tests from Engine.io to see how well it perform and to find out some bottlenecks in the current implementation.