Archive for the ‘Programming’ Category

I like Ruby, but I don’t like its per­for­mance, so I’m really antic­i­pat­ing Ruby 2.0. Mean­while, I’ve been dab­bling in Python. Learn­ing a new lan­guage and com­par­ing and con­trast­ing them, really helps with deter­min­ing each language’s strengths and weak­nesses. For exam­ple, you can eas­ily update all your Ruby gems. Unfor­tu­nately, python doesn’t have a direct way of doing this using easy_install. Very odd. I tried using the shell script method, but for what­ever rea­son it just didn’t work as adver­tised. So I wrote a bash alias to take care of it.

(more…)

MyGoogleCal2 no longer works 100% in Inter­net Explorer. A run­time error occurs when nav­i­gat­ing month-to-month or when switch­ing to Agenda mode. The workaround is to sim­ply hide the nav­i­ga­tion inter­face. Now, I don’t know if this bug was intro­duced when Google updated the code last month, or if it’s always been there and I just never noticed. In any case, the run­time error occurs when //"+a.host+"/calendar is replaced by //www.google.com/calendar. Given the poor debug­ging avail­able in IE, I didn’t get very far with fig­ur­ing out why IE breaks. I sus­pect that when IE makes an Xml­HttpRe­quest, it’s dou­ble check­ing that the request URL matches up with the server host, or some­thing to that effect. Since Google obfus­cates the Javascript code, it’s just way too hard to try and fix it. Instead, I’ve opted to cre­ate a new ver­sion of MyGoogle­Cal that uses the orig­i­nal tech­nique for IE but uses the tech­nique from MyGoogleCal2 for all other browsers.

(more…)

One of my read­ers asked for a step-by-step set of instruc­tions to install MyGoogleCal2.php. My orig­i­nal posts for restyling Google Cal­en­dar did assume a cer­tain level of exper­tise. This should hope­fully help those who are still confused.

(more…)

After many false starts, I decided that I really needed to wrap my head around unit test­ing when writ­ing Rails appli­ca­tions. I more or less com­pleted a Rails 1.2.3 appli­ca­tion with­out any for­mal tests, and I would like to upgrade it to 2.0.2 and make it REST­ful in the process. At the same time, I’ve moved from a Win­dows devel­op­ment envi­ron­ment to a *nix one after installing Xubuntu on my lap­top (an old Com­paq Pre­sario). I’ve also switched from Cream to Emacs. Despite my Win­dows desk­top being more than twice as fast as my lap­top, I just could not stand not being in a true *nix envi­ron­ment. Too much of the Win­dows idio­syn­crasies got on my nerves. And my switch from Cream to Emacs was because I just didn’t like the insta­bil­ity of the hacks required to make Vim less of a modal edi­tor. If I tire of Emacs, I may try pure Vim instead, but I remem­ber installing Cream sim­ply because I didn’t like pure Vim to start with. So with these var­i­ous changes going on with my Rails pro­gram­ming envi­ron­ment, I fig­ured it was an ideal time to learn to for­mally test my appli­ca­tions. Of course the first part is set­ting up the test­ing envi­ron­ment so that it is easy to use, stays out of your way, and is informative.

(more…)