Posts

Smoking cessation as a result of a natural experiment - linking smoking to seasickness

Image
In Stanley Kubrick's film A Clockwork Orange (based on the novel by Anthony Burgess ), the protagonist, Alex, undergoes operant conditioning , or aversion therapy , to modify his (ultra)violent tendencies. He's forced to watch film clips with violent scenes while drugged, and thus develops a strong negative response to violence. The movie and the novel raise questions about the morality of such treatments while at the same time illustrating their efficacy. I had an analogous experience where something of this sort happened to me - really quite by accident - and I always thought it was an interesting bit of psychology/physiology and, unlike the scenario depicted in the movie and the novel, there are no troubling moral issues. This is because at the age of 18, I developed a strong association between cigarette smoking and seasickness, with the net result that I haven't touched another cigarette for going on 40 years. Moreover, I retain strong negative associations to ev...

Getting Tramp to work on Xemacs

What is Tramp? Tramp is an ange-ftp like utility for Emacs/Xemacs that allows remote file viewing. More modern than ange-ftp, it's normally used to invoke secure protocols like scp, ssh etc., whereas ange-ftp was ftp based as its name implies. Tramp is actually an acronym for 'Transparent Remote (file) Access, Multiple Protocol'. The Xemacs documentation for Tramp may be found here . What goes in Xemacs config file?      (require 'tramp)      (setq tramp-default-method "scp")      (setq tramp-default-user "yourusername")  What syntax do you use to open a file on a remote machine? The online manuals specify this pretty clearly but I somehow didn't take what they said to heart. To avoid invoking "efs" (Which Xemacs needs for package downloading, so it can't be turned off, but is FTP based which we don't want) we need to use Tramp-like syntax which means use square brackets around the machine name.  ...

Fedora 14 - Asus Motherboard - PS2 lockups Solved

Addendum: Somewhere along the line during one of the Fedora upgrades this blacklist file got saved off to an rpmsave file and the asus_ast0110 is happily being loaded with no ill effects. So I guess this issue has been fixed somwhere along the line. Ever since installing FC14 on a ASUS P7P55D-E Pro system I was plagued with PS2 lockups. The only fix I was able to come up with was to bypass PS2 altogether and go with USB keyboard and mouse. Which worked fine but OTOH, things should just work, right? Well finally the answer is in. Thanks to Bob P on the Fedora Forums as well as others such as Brad and Josh on the Ubuntu forums the problem seems to be related to a driver conflict between the PS2 driver and the asus_atk0110 driver which apparently has something to do with fans and fan speeds. For Ubuntu this is bug #632048 which is a duplicate of bug #557065 . The fix (or the workaround) is to blacklist the asus_atk0110 driver by simply editing the file /etc/modprobe.d/blacklist....

Pacino on Pacino - Impressions after seeing the great actor on May 20, 2011 at the Durham Performing Arts Center (DPAC)

First Impressions: When he first comes out one's struck by how short he is. You don't necessarily expect him to be tall, but he's shorter than you expected. A second impression is that if you had to cast a Keith Richards role in a film or on stage, Pacino would clearly be your guy. The impish smile, the wrinkled visage, the swagger - it's all there. New York Origins: Pacino says he's from South ("Sout") Bronx and then moved to Greenwich Village later in while in his 20s. He's obviously a New Yorker through and through - you hear a lot of "Dese" and "Dose" and he's spent a lifetime watching the denizens of New York under his actor's microscope. He's obviously played a lot of New Yorkers over the years. Being a New Yorker informs his world view - he has that particular mix of cynicism, world weariness, optimism and delight at the passing human parade that I think you especially find in New York. Needless to say h...

SSH with port forwarding for VNC sessions

The problem:                | Client   ------|--- SSH server -----  VNC server                |             firewall (Of course this doesn't really have to be VNC - it could be any application such as web, mail etc.). We'd like to access the VNC server by establishing a tunnel via the SSH server. (Note, the way VNC handles display numbers is that it constructs ports as offsets from the base port number of 5901. Thus VNC display :6 is mapped to port 5906.) Let 10.10.10.10 be the ip address of the VNC server. Let 10.10.10.20 be the ip address of the SSH server. Connect to the SSH server which in turn connects to the VNC server. Here we are making VNC server port 5906 (display :6 in VNC terms) available locally as port 9999.         ...

Perl - easy way to get 64 bit containers (and beyond) - bigint, bignum.

You can pretty much do anything you want in Perl but sometimes the trick is to do it easily and with a minimum of hassle. I often use Perl scripts to parse output I've taken from embedded applications. If the embedded application uses 64 bit values and you want to do arithmetic operations on those values (shifts, masks, add, multiplies, divides) Perl will by default assume 32 bit containers and you won't get the answer you want. Solution: use bigint;      or   use bignum; Use the first if you need integer representations and the second if you need floating point behavior (I needed to calculate some percentages which required me to use bignum.) The beauty is one line of perl code and you're done - no complicated libraries, no getting modules from CPAN, just simplicity itself. Maybe most folks already know this but it was new to me so I thought I'd share. Apparently you're not limited to 64 bits either - I have not tested this however. My perl version wa...

Quicken for Windows - "One Step Update" hangs

As a longtime Quicken for Windows user,  I've been plagued by this problem for years.  You click "One Step Update" to update all of your online accounts and all operations complete but the dialog box goes into what seems to be an infinite loop and the only way I could find to stop it was to kill the process. Fortunately this never resulted in any lost data, or database corruption but then on the other hand, it's pretty awful engineering to sell a program that  requires a kill signal to be sent to terminate a normal operation. Of course Intuit claims that if there's a problem it's with anything other than their program.  They advise to check your internet connection, contact your Financial Institutions (FI's in Quickenspeak) - all the usual crap - instead of fixing their obviously defective software. Not to mention that Intuit's response is absurd on its face. A program just shouldn't hang - regardless of cause. If something is wrong with the c...