Today’s nerdtacular tip is brought to you by the letter π and the number e: if you telnet into port 80 of a webserver, you can write your HTTP requests by hand. I haven’t quite figured out how to use this to my advantage yet, but I’m pretty sure it’s there somewhere… I can now fill in my own custom values when submitting forms, without bothering to download and edit the source for the page with the form on it, if nothing else (though I’d still need to look at the source to see what parameters the form contains).
(bold words are what I typed)
$ telnet www.hmc.edu 80 Trying 184.108.40.206... Connected to www.hmc.edu. Escape character is '^]'. GET / HTTP/1.0 HTTP/1.1 200 OK Date: Thu, 16 Nov 2006 07:59:59 GMT Server: Apache/1.3.29 (Unix) PHP/4.3.2 mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.7c Connection: close Content-Type: text/html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> ... </body> </html> Connection closed by foreign host.
This evening, Benji, Liviu, and I went to the King’s Head Pub again for trivia night. Partway through the evening, some dude and 3 women walked in and joined our team. Then Dominic (former Mudder! class of ’99) stopped by. Of the ~10 teams playing, the 8 of us took 3rd! We won a $15 gift certificate to the pub, but gave it to our 4 other teammates because they really helped out (none of us Googlers know anything about NFL quarterbacks or American Idol winners). At 10:30, we left the pub and went back to the office to play pool for a while. It was a wonderful evening.
Watching tech talks on Google Video introduced me to aspect oriented programming, which is a really cool idea wrapped up in a very tedious, abstract, and boring sort of way. It’s a cross between object oriented and event oriented programming: you take your object-oriented code and put in extra functions, and rules about when to call these extra functions. But these rules have to do with the behavior of your original code: the example they used was the observer pattern, which is some code that watches your objects to see what has changed, and then does something when things do change (the canonical example is that when something changes in the graphics you want to display, the observer pattern should update the screen). With traditional OOP, the observer is spread throughout the code, but doesn’t actually get mentioned in any designs of the classes. With AOP, the observer is its own little module, and it gets called any time a function whose name contains “Draw” or “Update” returns successfully (without any explicit mention of this in the DrawLine() and UpdateShape() methods themselves!). It’s an interesting idea, though I’m not sure it will ever catch on.
Finally, a little news before I get too far behind: yes, the Democrats made sweeping advances in both the House and the Senate. We now also have 2 independent Senators (Joseph Lieberman in Connecticut and Bernie Sanders in Vermont), which is interesting but probably inconsequential. Unfortunately, I don’t expect much to change with the new legislature; many of them are still pretty conservative Democrats who could just as easily be considered pretty liberal Republicans.
Also, South Africa legalized gay marriage this past Tuesday, which is pretty cool. They’ve really come a long way towards tolerance and acceptance of everyone since 1994.