Satya's blog - 2009/04/

Apr 29 2009 21:34 Javascript programming

I spent most of last weekend programming in Javascript (or ECMAscript). I don't ordinarily do that, but I do have a couple of Firefox extensions and a couple of Greasemonkey scripts to my name. I was writing scripts for the web-based Pardus game. It's pretty heavy (for me) Javascript programming and DOM (Document Object Model) manipulation. All the stuff I just mentioned is on my Pardus Auto-mapper page. Usually I just do Ruby on Rails with some light Prototype/Scriptaculous javascripting. But this is about writing apps with just the client (Firefox).

Tag: geeky programming javascript

Apr 08 2009 20:34 Custom library path in Ruby

To add a custom or additional library path to a Ruby program: $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'

This "unshifts" onto the LOAD_PATH list, the full path to the lib directory, relative to the current file (which is the ruby program). Current file's location is guven by calling dirname on __FILE__.

This was useful for me when I was trying to get railroad to run from my home directory. (Railroad is a utility to graph Ruby on Rails' model/controller relations, very useful, I recommend it.)

Tag: geeky ruby

Apr 08 2009 20:29 The Internet on South Park

I just watched the South Park episode "Over logging". In it, they showed "The Internet" to be a giant Linksys router (the blue plastic SOHO type, such as WRT54G, with wireless -- I'm a dork, yes). It was a lot like Stargate, underground bunker and all. They should have also had a caption saying "This is what many people actually believe", because this *is* what many people actually believe. "I mean, have you ever *seen* The Internet?" They flash a similar caption when telling the story of the Book of Mormon and of Sci-- I mean, the Super Adventure Club. Oh come on, it would have been funny.

Tag: geeky tv