« 01.03.2010 - 31.03.2010 | Main | 01.01.2010 - 31.01.2010 »


Context sensitive acronyms

One of the things that email and newsnet has brought us is a plethora of acronyms that I've unconsciously started to use in my work-related writings. I sometimes get a rude surprise when I have people ask me WTF are you saying in this document? IMHO these people should spend more time online and decoding IIRC seems ovbious to me.

While writing something the other day I noticed that some of the new acronyms are context sensitive; for example "WTF". The meaning of "WTF are you doing?" is generally accepted to be "What TF are you doing?". However, the sentence "WTF did you hide the book?" expands to "Where TF did you hide the book?" and "WTF did you buy this POS" is "Why TF did you buy this POS". An of course there's "WTF are you?" which is "Who TF are you?"

WTF is an excellent example of a context sensitive acronym which, when the googlebots come by, will be the 5th use of this phrase on the internet (at least in Googlespace). WTF also shows up problems with machine translation as one needs to understand the meaning of the sentence in order to properly expand WTF. The phrase {w_word}TF is widely used in English where {w_word} is a member of the set: {who, what, where, when, why}. In order to decode WTF in context one needs to be familiar with the use of this phrase in English which is used to add some emphasis to {w_word}. Interestingly all 5 words in the set are involved with acquisition of information regarding an event/object/person. My knowledge of semantics is completely informal but it seems that "WTF" is a particularly versetile context sensitive acronym. Now I'll be searching for other context sensitive acronyms and hopefully this won't be as bad as my palindromic phase 30 years ago when I was reading everything backwards looking for palindromes.

Posted by Boris Gimbarzevsky at 11:21.35
Categories: Miscellaneous


Google loves spammers

Google loves spammers. I can say this with complete assurance as I've sent 4 applications to Google asking them to cease and desist with the misuse of my name and not a reply from them at all. The whole issue concerns a temporary blog I created on blogger when I was shutting down my practice in Vancouver. This was at drgimbarzevsky.blogspot.com. If one clicks on this site, one now finds that it is associated with the Canadian Pharmacy spam criminals who also forge a lot of spam with drgimbarzevsky.com as the origin. I'm hopefully making a bit of an impact on their operations as all mail directed at drgimbarzevsky.com is sent to the abuse address of the most recent chicom server they're spamming from. Every few months I re-enable mail to come to one of my email addresses, find the IP of their newest server and then change my MX records to divert the millions of emails/year that are bounced back to me as a result of poorly configured mail servers (it's a simple operation to do a nslookup of "drgimbarzevsky.com" to see if it matches the IP address of the actual sender. If they don't match the header is forged and there is absolutely no reason to send it back to me).

I decided to look where this group of assholes is hanging out now and, lo and behold, they're now using a US server! Must be getting really hard up as usually they use chicom servers which seem to be happy to send any amount of spam as long as they get paid. I've got a list of Chinese IP addresses and don't let any of them through to any of my machines and building the equivalent of the great wall on the internet around China would result in a massive decrease in spam. OTOH this US based machine could be part of the botnet and all my email to the abuse department will do is result in one less zombie.

Here's the latest start of "medical services plan" which is what one gets if one clicks on drgimbarzevsky.blogspot.com

  • 20 يونيو, 2008
  • Medical Services Plan
  • Canadian Pharmacy with high quality medications!Bonus pills added to your order!
  • Canadian Pharmacy offers high quality medications: Viagra, Cialis, Levitra, and many medications! Various payment methods available: Visa, Wire transfer, echeck, Western Union or MoneyGram.

The first link maps to:

Lets see who owns nslookup gives:

  • 02/26/10 20:04:35 dns
  • nslookup
  • Canonical name: c-n080-u0390-18.webazilla.com
  • Addresses:

Then let's do a whois on this IP address:

  • OrgName: WZ Communications Inc. Org
  • Address: 131 W Wilson Street
  • Address: Suite 600
  • City: Madison
  • StateProv: WI
  • PostalCode: 53703
  • Country: US
  • NetRange: -
  • CIDR:
  • OriginAS: AS40824
  • NetName: WZCOMM-US
  • NetHandle: NET-199-80-52-0-1
  • Parent: NET-199-0-0-0-0
  • NetType: Direct Allocation
  • NameServer: NS1.WEBAZILLA.COM
  • NameServer: NS2.WEBAZILLA.COM
  • NameServer: NS3.WEBAZILLA.COM
  • Comment: Please send abuse complaints to
  • RegDate: 2009-03-05
  • Updated: 2009-09-25
  • OrgAbuseHandle: WZCOM1-ARIN
  • OrgAbuseName: WZCOMM Abuse
  • OrgAbusePhone: +1-408-404-3912
  • OrgAbuseEmail: abuse@webazilla.com
  • OrgTechHandle: WZCOM-ARIN
  • OrgTechName: WZCOMM NOC
  • OrgTechPhone: +1-408-404-3912
  • OrgTechEmail: bk@webazilla.com

Email to abuse address sent right after this posted. Lets see what happens when one contacts the server:

  • 02/26/10 19:28:14 Browsing
  • Fetching ...
  • GET /go.php?data=vI HTTP/1.1
  • Host:
  • Connection: close
  • User-Agent: Sam Spade 1.14
  • HTTP/1.1 302 Found
  • Date: Sat, 27 Feb 2010 03:28:15 GMT
  • Server: Apache
  • X-Powered-By: PHP/5.2.12
  • Expires: Mon, 26 Jul 1997 05:00:00 GMT
  • Last-Modified: Sat, 27 Feb 2010 03:28:15 GMT
  • Cache-Control: no-store, no-cache, must-revalidate
  • Cache-Control: post-check=0, pre-check=0
  • Pragma: no-cache
  • Location:
  • Content-Length: 0
  • Connection: close
  • Content-Type: text/html

Not that exciting so lets try which gives the same result. Interestingly trying the huge datastring crapped out SamSpade so perhaps it was designed as a means of preventing people from using tools like SamSpade to probe this spamsite. Most likely the data string has the origin of the link encrypted within it so the spammers know which are the productive blog pages and probably some botnet control info but I'm just guessing here. No, I'm not bored enough to start trying to crack this data as I've got way more important stuff to do.

Never, never, never click on one of those links using M$ IE as your chances of acquiring malware are very high. So lets try Opera hoping that this group of criminals hasn't got any Opera exploits. To ensure that nothing sneaks through lets also start Wireshark and log all of the traffic to and from my machine in the process.

Interestingly there's a totally different webpage displayed when one goes through Opera than when goes through Firefox. Pasting the above URL into Opera goes through at least one other IP address (all information captured by Wireshark running in the background) and eventually one is on the site: http://www.canadasmedicine.com/?c=click&ck=26492

Let's see what unethical registrars and ISP's are involved. First nslookup:

  • 02/26/10 20:22:00 dns canadasmedicine.com
  • Canonical name: canadasmedicine.com
  • Addresses:

Interesting, 2 IP addresses but we'll get to those in a moment. First lets find out who the alleged owner of this domain is:

02/26/10 20:22:21 whois canadasmedicine.com@whois.geektools.com

  • whois -h whois.geektools.com canadasmedicine.com ...
  • GeekTools Whois Proxy v5.0.4 Ready.
  • Checking access for xxx.yyy.zzz.aaa... ok.
  • Checking server [whois.crsnic.net]
  • Checking server [whois.tucows.com]
  • Results:
  • Registrant:
  • N/A
  • 13 Av Des Cedres
  • Ville DAvray, 92410
  • FR
  • Administrative Contact:
  • Berder, Ronan ronan@33drugs.com
  • 13 Av Des Cedres
  • Ville DAvray, 92410
  • FR
  • +44.02081338455
  • Technical Contact:
  • Berder, Ronan ronan@33drugs.com
  • 13 Av Des Cedres
  • Ville DAvray, 92410
  • FR
  • +44.02081338455
  • Registration Service Provider:
  • Hover, help@hover.com
  • 416.538.5498
  • http://help.hover.com
  • Registrar of Record: TUCOWS, INC.
  • Record last updated on 19-Jan-2010.
  • Record expires on 06-Jun-2010.
  • Record created on 06-Jun-2008.
  • Registrar Domain Name Help Center:
  • http://domainhelp.tucows.com
  • Domain servers in listed order:
  • Domain status: ok

The spammer says he's French but who knows where he's really from. All that this record tells us is that we have to do some more digging. Lets start with the domain servers and 33DRUGS.COM seems like a logical place to start.

  • 02/26/10 20:29:14 dns 33drugs.com
  • Canonical name: 33drugs.com
  • Addresses:

If those IP's seem familiar it's because they're the same two that popped up when we did nslookup on canadasmedicine.com. Lets find where these are located:

  • Results:
  • % This is the RIPE Database query service.
  • % The objects are in RPSL format.
  • %
  • % The RIPE Database is subject to Terms and Conditions.
  • % See http://www.ripe.net/db/support/db-terms-conditions.pdf
  • % Note: This output has been filtered.
  • % To receive output for a database update, use the "-B" flag.
  • % Information related to ' -'
  • inetnum: -
  • netname: AIRMARK
  • descr: TURKEY
  • country: TR
  • admin-c: HE337-RIPE
  • tech-c: HE337-RIPE
  • status: ASSIGNED PA
  • mnt-by: AS9121-MNT
  • source: RIPE # Filtered
  • person: HAKAN ERMAN
  • address: TAKSIM ISTANBUL
  • e-mail: hakan@air-mark.com
  • phone: +90 212 245 44 65
  • fax-no: +90 212 245 44 86
  • nic-hdl: HE337-RIPE
  • source: RIPE # Filtered
  • % Information related to ''
  • route:
  • descr: TR-TELEKOM-960902
  • origin: AS9121
  • mnt-by: AS9121-MNT
  • source: RIPE # Filtered

So one of our webservers is in Turkey and there are only 15 IP addresses in the IP block which suggests that either someone is making a bit of money on the side by sending spam, or more likely, one of the computers in that IP block is a zombie and part of a botnet. Now lets find the other server:

  • Results:
  • % This is the RIPE Database query service.
  • % The objects are in RPSL format.
  • %
  • % The RIPE Database is subject to Terms and Conditions.
  • % See http://www.ripe.net/db/support/db-terms-conditions.pdf
  • % Note: This output has been filtered.
  • % To receive output for a database update, use the "-B" flag.
  • % Information related to ' -'
  • inetnum: -
  • netname: CZ-SUPERNETWORK-20060214
  • descr: SuperNetwork s.r.o.
  • country: CZ
  • org: ORG-SS59-RIPE
  • admin-c: ZC10-RIPE
  • tech-c: ZC10-RIPE
  • tech-c: DC1000-RIPE
  • tech-c: ML7551-RIPE
  • status: ALLOCATED PA
  • mnt-by: RIPE-NCC-HM-MNT
  • mnt-lower: SUPERNETWORK-MNT
  • mnt-routes: SUPERNETWORK-MNT
  • mnt-domains: SUPERNETWORK-MNT
  • source: RIPE # Filtered
  • organisation: ORG-Ss59-RIPE
  • org-name: SuperNetwork s.r.o.
  • org-type: LIR
  • address: Bilejova 407
  • address: 46303
  • address: Liberec
  • address: Czech Republic
  • phone: +420296826296
  • fax-no: +420482731466
  • e-mail: zdenek@superhosting.cz
  • admin-c: DC1000-RIPE
  • admin-c: ZC10-RIPE
  • admin-c: ML7551-RIPE
  • mnt-ref: RIPE-NCC-HM-MNT
  • mnt-by: RIPE-NCC-HM-MNT
  • source: RIPE # Filtered
  • person: Zdenek Cendra
  • address: U Pergamenky 2
  • address: Praha 7
  • address: 170 00
  • address: Czech Republic
  • e-mail: zdenek@superhosting.cz
  • phone: +420296826296
  • nic-hdl: ZC10-RIPE
  • source: RIPE # Filtered
  • person: David Cermak
  • address: PRO-ZETA spol. s r.o. Praha
  • address: Mukarovska 1567/25
  • address: Praha 10
  • address: 100 00
  • address: Czech Republic
  • e-mail: david@prozeta.cz
  • phone: +420222742702
  • nic-hdl: DC1000-RIPE
  • source: RIPE # Filtered
  • person: Miroslav Laus
  • address: U Pergamenky 2
  • address: Praha 7
  • address: 170 00
  • address: The Czech Republic
  • e-mail: mirek.laus@superhosting.cz
  • phone: +420296826296
  • nic-hdl: ML7551-RIPE
  • source: RIPE # Filtered

This IP block obviously belongs to an ISP in the Czech Republic and, is probably another zombie PC. I'm sure that if you perform nslookups on canadaspharmacy.com on a daily basis you'll find that the servers change frequently. The whole process is an attempt to try to prevent people from tracking them down and I'm sure that there's no link between the online pharmacy spammers and this trail of evidence aside from control packets sent to the botnet and the only way that one would catch them would be to have a packetsniffer running constantly on one of the botnet zombies to record the control packets. If I was doing this, I'd also route control packets through multiple zombies before they ended up at the target machine and use either an internet cafe computer as the source of the control packets or on open WiFi link found while warwalking. Wouldn't surprise me in the least if this further level of paranoia was part of their SOP.

One of the enabling factors in this whole process is Google; one knows Google must be crooked when Al Gore is on their board of directors. This slimeball has raked in millions with the AGW scam and who knows what other shady deals are going down with Google; after all they are actively helping the chicoms censor internet access in China. Since I've notified Google multiple times regarding the misuse of my name in relation to canadaspharmacy.com and because they have done nothing, I can only conclude that they have some financial stake in this and are thus involved in illegally distributing spam. The other alternative is that those report forms on blogger are routed to dev/null and they could care less what someone puts on blogger unless it gets significant exposure in the MSM. It will be interesting to see if Google comes after me for the accusations I've made in this blog post. There is one potentially inflammatory comment if one sentence is taken out of context. Taking things out of context is what mindless programs are really good for. If Google's software looks for people accusing Google of performing nefarious acts then maybe I'll hear from Googles legal department the next time googlebots crawl my site. At that point we can talk about what it takes for me to remove my non-flattering references to Google both in this post and in the Keywords

I have some ideas of what the fate of spammers should be. SamSpade is a very nice tool with lots of convenient internet related tools in one package and I highly recommend it as well as Wireshark. Didn't realize how many SMB packets were flowing through my home network until I ran wireshark and captured >400,000 packets during the time it took me to write this. Time to take a look at WTF the offending machines are doing as they don't need to talk that much with one another.

Posted by Boris Gimbarzevsky at 19:30.22
Edited on: 26/02/2010 21:42.27
Categories: Computers, Medical


Olympic idiocy - Drapeau's baby comes to BC

I have been told that the winter olympics are taking place in Vancouver at this time. When I think that a little more than a year ago I used to live in the west end I'm just so glad that I left Vancouver before this idiocy started. I have no idea what's going on in the olympics as I don't watch TV news, I don't read newspapers and my daily news comes from high information content blogs such as wattsupwiththat, small dead animals and climateaudit. I have noticed that CSI has been nothing but reruns and was very annoyed when I got home from a long day at hospital/clinic that Numb3rs was also a rerun. Looking at the online TV guide indicates that huge amounts of bandwidth are given over to coverage of the performance of various brainless "drug-free" state-trained humanoid robots that perform certain specialized athletic tasks several milliseconds faster than unsuccessfull "drug free" state trained humanoid robots.

If someone wants to spend their life seeing how fast they can go down an ice covered hill without killing themselves, then they are perfectly free to do so but I don't see why my taxes should be wasted to support this. The olympics is the modern version of the Roman "bread and circuses" that governments use to distract the population from their incompetence. The olympics has nothing to do with sport, but rather the desire of those in power to impress other statists with their excesses. Once the Drapeau's baby effect on BC provincial finances is felt then hopefully moonbat Campbell and his fellow Lieberals will be booted from office and replaced by a more fiscally responsible party. If the BC communist party wins the next election, the Wildrose Alliance may be in power in Alberta and I'll be moving east.

The Vancouver olympics were the last straw when it came to deciding where I was going to live. Various megalomaniac politicians took what was once a perfectly good city and turned it into the hellhole that exists today. When I first came out to Vancouver 31 years ago I had a feeling of this is where I wanted to stay for the rest of my life. Vancouver in 1979 had a very liveable downtown core, lots of parks, Wreck beach and the UBC campus seemed like paradise compared to the grungy university of Ottawa where I had come from. Working at UBC was extremely enjoyable and I spent many pleasant hours walking the expansive campus grounds and nearby beaches writing programs in my head when I worked as a researcher there. If I had to pick one event which started Vancouver's decline it would be Expo 86. For some unknown reason a politician decided that Vancouver needed a worlds fair and major demolitions of perfectly functional industrial facilities were undertaken. I regret that I didn't take as many photographs in 1979 as I do now, but then I did use a film camera and it was relatively costly to take a photograph. I liked False Creek in 1979 and can't imagine living again amongst the huge masses of people who now inhabit tiny cubes in the sky (when they're not stuck in gridlocked traffic) where sawmills and railway tracks once existed.

When I first came out to Vancouver, it was on a beautiful spring day and the contrast between sitting in a plane on a Winnipeg airport in a blizzard while the plane wings were deiced and wandering around downtown Vancouver a few hours later was unbelievable. I still think that, in terms of sheer natural beauty, Vancouver is by far the best place I've lived. In terms of speed of deterioration of a cities environment, Vancouver also tops the list. Most people that I knew who moved to Vancouver and ended up living there had similar stories of coming there first on one of those incredible sunny days where one doesn't want to be anywhere else. Few people who first visited in Vancouver during the depressing and dreary wet periods of winter were inspired to move there.

For some reason politicians from the Vancouver area don't seem to think that just being in Vancouver is enough and they feel that they have to advertise Vancouver to the whole world. When people who have never heard of Vancouver come there on one of those beautifull sunny days when the view of the mountains and ocean tickles the brains emotional centers in that peculiar way that only standing on prospect point in Stanley park can, they start making plans on moving to Vancouver. As there isn't enough housing in Vancouver for them, new tall condominium towers arise. As speculators see the money being made in real estate they too come into Vancouver and very rapidly what was once a really nice place to live becomes a very expensive criminal infested shithole with nice views.

Instead of concerning themselves with the deterioration in the Vancouver social environment caused by narcissistic provincial politicians, municipal politicians are just as ready to strut on the international stage. Instead the municipal politicians get outraged that Walmart would dare want to build a store in Vancouver, the importance of making Vancouver a "nuclear free zone" and the importance of not having freeways in Vancouver. I would have much rather seen a freeway on False creek than what currently exists there. The other problem with Vancouver, as I discovered after living there for a few years, is that Vancouver is full of moonbats and is also a moonbat-magnet. Right now I can't think of a single reason why I would want to visit Vancouver again

Since moving to Kamloops I've seen a worrisome number of patients who see me in the walkin clinic (because they can't find a doctor in Kamloops) who are ecstatic about how much nicer Kamloops is compared to Vancouver and I hear the same stories over and over about why they would never live in Vancouver again. Now if the olympics in Vancouver causes another large influx of people from around the world who, for some deranged reason, decide they want to live in Vancouver, then the efflux of disillusioned and fed up people from Vancouver to Kamloops will dramatically increase. After all, Kamloops is the nicest place in south central BC; Kelowna is nice but I don't think that paying Vancouver housing prices so one can occasionally see the lake is worth the money. This will mean that Kamloops will start to have traffic jams like Vancouver and start down the path to unlivability. I hope I'm wrong about this but it might be prudent to start checking out properties in Spuzzum in case I have to move again.

Posted by Boris Gimbarzevsky at 22:55.34
Categories: Miscellaneous


Stellaris Design Contest

In 2005 I entered a Circuit Cellar Ink magazine design contest as I had the urget to build some sleep monitoring hardware and the system that I came up with didn't win any prizes or even get mentioned, but it allows me to monitor sleep leg movement and do breath by breath monitoring alone with recording SaO2 and HR. A partial writeup is in my first abortive blog attempt here.

On 28/1/2010 as I checked my email I saw there was a new design contest, this time with the TI Stellaris LM3S9B96 CPU which is an ARM M3 core with 96 Kb of SRAM and 256 Kb of flash RAM as well as the obligatory A/D converters, serial ports, timers, I2C ports etc that seem to come along with every new embedded systems design nowadays. I naievely assumed that the DK-LM3S9B96 was the part I'd be getting to play with for the design contest and typed up my idea for a project and sent it off in about 10 minutes.

This CPU is powerfull enough to finally implement an idea of mine that has been kicking around in my head for 15 years or so and that is an ambulatory physiologic monitoring system. If I get a digital holter monitor out of this project I'll be happy, but what I was also planning on doing besides EKG was to have 2 3-axis accelerometers (one on each leg), temperature sensor (finally will be able to hook up that I2C output sample high precision temperature sensor), ambulatory pulse oximetry, ambient sound, etc. The concept is fairly simple, attach a bunch of sensors of various types to a person and feed all of their outputs to an embedded processor which will timestamp all the data chunks and write them out to some form of storage. Right now flash memory cards come in huge capacities and a 4 Gb card would be good for a few days of monitoring. Until recently, the only way one could get all of this physiologic data was to have theperson sitting in a lab next to a computer.

I could have easily done this project in 1987 as long as the person didn't walk more than a few feet from the data acquisition system which ran on a PDP-11/23 Minc system controlled by a PDP-11/34 which had massive, for the time, storage capacity of 2 60 Mb drives! If one threw in the tape drive which was often used as the primary means of storage of experimental data, the total system probably weighed in at over 1000 lb. The PDP-11 was a real joy to program and is still my favorite processor.

To put the memory space one is dealing with in perspective, the PDP-11 had 56 Kb of RAM that was directly addressable unless one used bank switching to access more memory which was, IIRC, 512 Kb on our PDP-11/23. This RAM wasn't used during data acquisition as it was simpler to just stream data from the 11/23 to the 11/34 over a parallel interface and thencefrom to disk or tape.

So in one sense, all the software has already been written and it's just a matter of porting it to a different hardware platform, or so I thought. In contrast to the HCS08 based Zigbee boards that I used in 2005, the EKK-LM3S9B96 comes with thousands of pages of documentation and an IDE that seems to have a lot steeper learning curve than the HSC08 Metroworks CodeWarrior IDE. The LM3S9B96 is a 32 bit processor with a rich instruction set and is not something that I could start hacking the same evening as I got the development kit as was the case with the HCS08. It looks like I'm in for a few evenings of reading before I can even power up the device and run the embedded systems version of the ubiquitous "Hello world" program.

One of the things that one is expected to do with the Stellaris development kit is to use the SafeRTOS as part of the project. This will be a real novely for me as any embedded designs I've thus far done have had no OS besides the boot loader to flash new programs into flashram. I've been used to writing all of my interrupt routines and using a periodic timer tick to run a low priority subroutine to make sure data is moving through the device as it should. I'm tempted to just use SafeRTOS in debugging and data display mode and turn it off for ambulatory data acquisition.

What never ceases to amaze me is how much more powerfull embedded systems are every year. Unfortunately they get more complex also and I'm tempted to stick with CPU's that I've had a long and comfortable relationship with like the 680x0. I have a couple of NetBurner development kits and the project I built on them had 90% of the time trying to figure out how to set switches in the compiler and how to reflash parts from my laptop instead of actual programming. That was the nice thing about the PDP-11; just fire up a text editor, write FORTRAN or assembly code, compile it and then debug through the console. The debug capabilities of the new embedded systems are way more powerfull than my stepping through code one instruction at a time or doing octal dumps of RAM on an LA36 printer like I did in the 1980's, but it took way less time to learn how to do it.

One of the reasons for going with the ARM is that this is a very widely used CPU architecture for embedded systems; my Palm TX uses and ARM processor and they are ubiquitous in other devices. At some time I have to learn the architecture of the ARM and what better way to do it than put myself under the time pressure of having to produce a working project by 23/6/2010. The other thing I need to do is learn about how USB devices work and how to interface to them on a low level. I grew up with serial ports and still have many devices that I use that communicate through RS-232 links. New computers no longer have serial ports (it really pissed me off when the parallel port was removed) and instead rely on USB or firewire for external inputs. RS-232 I/O is very easy to code but when one gets to USB the problem is non-trivial. I have to learn the low level details of the USB specification and get into low level windoze driver calls to grab data from USB connections. USB 2.0 is a lot faster than RS-232 which, in my experience, maxes out about 110 Kbaud but to do low level USB I/O in VB is going to take me a week or two of intense study.

The other thing that the EKK-LM3S9B96 has is an ethernet interface and I've never done any low level coding of ethernet capable devices. I've spent a lot of time looking through Wireshark output to trace down network problems. The Stelleris development kit comes with a rich set of drivers for doing ethernet I/O, but if one wants to debug projects a detailed understanding of TCP/IP is necessary so time to find my book on the subject.

Probably the most annoying thing about this project is that documentation no longer comes in book form. The LM3S9B96 programmers manual alone is over 1200 pages and I'm not about to print this out. Then one has all of the technical documents, other documents that deal with the peculiarities of the Keil IDE, etc. What I really used to look forward to was to lie back with a programmers manual for a new CPU architecture and just browse. You can't do this with an electronic document, not at least in the way that I like reading a book. The most serious problem with reading a PDF of a book is the damage to laptops that occurs during the process. One of the hazards of reading in a supine position like I do, often at the end of a 12 hour workday, is that I'll fall asleep during the process. As muscle tone decreases the book falls out of my hands and onto the floor. No problem with a paper book although I did sustain chest injuries from dropping the one volume edition of Harrison's Principles of Internal Medicine during medical school. I've trashed laptop HDD's by falling asleep reading an on-screen PDF. What is needed is a very sturdy PDF viewer which will have the screen resolution of a book, the ability to make notes in the margins (all of my books are extensively annotated) and survivability from either being dropped or sat on by a 200 lb physician. Just remembered that I have a ToughBook laptop that's not currently being used for anything -- this platform should survive in the book emulation application.

Posted by Boris Gimbarzevsky at 22:39.50
Categories: Computers


Electronic medical records

Updated version to come RSN.

Posted by Boris Gimbarzevsky at 23:20.36
Edited on: 16/05/2010 20:55.06
Categories: Computers, Medical


Musings on reality creation

Had a major breakthrough today in terms of neurobiology of consciousness. I have to admit that I haven't done much reading in this area recently but my pattern of medical inquiry has been to work independantly for a time to formulate my own theories on a particular topic and then to go to the literature and start talking to people in the field to find out what they're doing. It's been a very productive way of doing things as it allows me to not be biased by orthodoxy when I first start in an area and then I can see how far from orthodoxy I am when I've come up with a coherent model.

In 2000 I had one of the most profound intellectual experiences of my life when I read Tor Norretranders, book The User Illusion. I had picked this book up at a used computer bookstore in Bellingham thinking it had something to do with GUI design which, at one level, it did. What Norretrenders did in that volume was to demonstrate convincingly that reality is an illusion and had hard neurophysiologic evidence to back it up.

What I got out of Norretranders is that what we experience as conscious existence is neurobiologically a two part process. The experience of consciousness, which anyone who reads this is intimitely familiar with, and the generation of the artificial reality in which this consciousness resides are two seperate processes. The virtual reality generated by the brain is of such high quality that it fools most people into thinking what they percieve is the same as reality.

Benjamin Libet was the first to discover that the brain reorders time. This was done in several seminal experiments in which people were asked to press a switch whenever they felt like it or had their primary somatosensory cortex stimulated during neurosurgery. In the switch pressing experiment the subjects had their EEG recorded continuously and the pressing of the switch was the signal to back-average the EEG. What Libet found was that starting from 0.5-1 second before the switch was pressed there was a clear electrical signal which was unambiguously present when one backward averaged a sufficient number of spontaneous switch presses. This is the readiness potential and, while the duration of the readiness potential may be in dispute, it exists. If you ask the subjects who were performing the task how long the duration between them deciding to press the switch and pressing it was they answered that as soon as they decided to press it their finger went down. Obviously there is a disconnect between percieved reality and external reality here.

The other experiment involved direct brain stimulation in awake patients who were undergoing neurosurgery and the electrical stimulus was delivered directly to the primary somatosensory area where the body is mapped in an anatomic fashion. This homunculus is a distorted human as hands and face have disproportionately large areas of cortex devoted to their sensory representation. Libet stimulated the area of the brain corresponding to various bodily areas and found that a minimum of 500 msec of stimulation was required before the person felt anything. If their knee was touched and the primary sensory cortex area corresponding to the knee was stimulated simultaneously, then the subjects reported that they felt their knee being touched about half a second before they felt the, probably quite bizarre feeling, knee sensation from the brain electrical stimulation.

Libet's interpretation of these results is that consciousness is 500-1000 msec behind and that the brain reorders time in order to make this delay disappear. When I first read this it seemed immediately obvious and I was surprised today when I did a search for Libet's papers on Ebsco of how much contraversy there is regarding his theory.

The reason Libet's explanation seems so obvious to me is because of an experiment I did in 1993 when I was a resident. I had written a program that ran on a PDP-11 which timed events to 0.2 msec precision (which I used for testing fingertapping) and which also generated random intervals so that I could measure people's simple reaction times. The program was written for the UBC open house in March of 1987 and I got the PDP-11/23 a few years later when the lab I used to work in moved to newer computers.

What I had found puzzling was how my data on auditory and visual reaction time differed. Visual reaction time was tested by lighting up one or more LED's and then I would press a switch when I saw the flash. I replicated the well known phenomenon of inverse dependence of reaction time on stimulus strength; it took me less time to react to 4 LED's flashing at once than one. I then decided to look at auditory reaction time and this is where things got interesting. I thought my visual reaction time was too slow as it ended up being about 180 msec (all times from memory and will look them up RSN) but mean auditory reaction time was 128 msec, a full 52 msec faster.

This is a huge time difference and, as a musician, I can easily produce sequences of finger movements which are within 1 msec of each other when I repeat the movement and I can audibly discern even shorter auditory intervals. Initially I thought my setup must be faulty and I repeated the experiment multiple times and the results were identical.

I then setup the apparatus so that I would listen to the sound and see the light at the same time; obviously I was only able to respond to the auditory stimulus as auditory reaction time was shorter. My perception during this experiment was that the sound and flash occurred simultaneously. It was quite eerie when I realized that I'd stumbled over something quite significant but I couldn't explain it at the time. When I read Norretranders book I had an AHA moment as the explanation for the results of the experiment was that my brain was reordering subjective time.

A quick look at the medical literature today revealed that there is not one single paper in the neurophysiology or neurology literature which uses the terms "reality generation" or "reality creation" (there were some papers that used the term but most dealt with "post-modern science" ie they were unscientific crap. It seemed that what I needed to look at was the neurobiology of consciousness and there was no dual process consciousness generation paper that I could find aside from Libet's work. Admittedly I've only spent a couple of hours on this today and will continue to look.

For the last 10 years I've practiced medicine under the assumption that consciousness is comprised of two parts: (1) the self awareness part that we percieve as being conscious and (2) a reality generating algorithm (RGA) which creates the illusion of reality. (I know, RGA is a bad term but since I've used it in my writings for the last 10 years, it stays). RGA is responsible for reordering time and for only bringing certain parts of external reality into percieved consciousness.

To make things easier to follow (and require less typing on my part), lets refer to external reality as R. R is the part of the universe outside of the body in 3-space and is unknowable as we will never have the sensors to fully quantify R. The artificial reality that everyone percieves as "external reality" will be referred to as r*. Te reason for this is that the two hemispheres have quite differing views of R and produce virtual realities r for the dominent hemisphere and r' for the non-dominant hemisphere. Because of the corpus callosum, these two virtual realities are blended in varying ways and so we get r*.

Because humans can react far faster than 500 msec, most of our actions are subconscious with the RGA making up a story after the fact to explain why we did what we did half a second ago. Humans are excellent rationalizers and much of getting a patient history is cutting away the rationalizations to get to what really is going on.

With very similar sensory organs individual humans will have similar primary perceptual signals in response to the same stimulus. Unless a person has altered brain function due either to drugs or a brain injury they will never be aware of the primary sensory stimulus. Everything that comes into consciousness has been processed to an unbelievable degree and what we percieve as r* consists of the output of our individual sensory channel processors. For example, people believe that what they see is identical to what a camera sees but this 1:1 mapping of visual world to neural sensors occurs only on the surface of the retina. Even in the retina processing of the image begins and further processing occurs at the lateral geniculate nucleus of the thalamus, primary visual cortex and secondary visual cortices before we see anything on a conscious level. There is a much faster pathway through the superior colliculus which is why reaction time to a potential object entering the eye causes such a short reaction time blink. I had a patient once who had lost her sight because of bilateral occipital infarcts but she had no problem living on her own. If I quickly moved my hand toward her face she would blink and it was eerie watching her walk around her apartment not bumping into anything while telling me she saw nothing. Her only awareness of the visual world was through feelings such as "I shouldn't go there" when she came up to an obstacle that she would have tripped over if she was truly blind. Her midbrain visual pathways were functioning perfectly well and gave her enough experience of the visual world that she could live independantly.

When one looks at how people look at a scene one finds that there are very distinct patterns of eye movements in people when they look at some things and not others. The fovea has the highest density of photoreceptors in the eye and the portion of the image that lands on the fovea is seen with the greatest resolution. The parts of the scene that the brain doesn't look at are filled in by the RGA. This explains why I've sometimes fruitlessly searched for an item through the whole house and another person will notice that it is in full view in an area that I've searched. I tend to keep certain things in certain places and if an item is out of place, it may as well be invisible. When I first became aware of the selective generation of visual reality I worked on developing a number of visual filters (sort of like one does with the Gimp) to process out everything except what I wanted to see. The most successful one was my hummingbird filter which I used when watching hummingbirds during the summer in the UBC botanical garden. Basically when the filter was active my visual reality was divided into hummingbirds and non-hummingbird objects and I'm not sure if my subcortical or cortical centers made sure I didn't walk into walls or off the trails when the hummingbird filter was active. It was so efficient that I found a hummingbird nest and got to watch the development of the baby hummingbirds that summer. When I'm walking thinking of a problem my visual reality consists of possible routes and obstacles and I've lost track of the number of times people who I know have told me that I've walked right by them and not seen them at all. When I'm walking with my camera intent on photographing anything that looks neat I'm often struck by objects which I had no idea were there before even though I'd walked that route many times in the past (or I'll actually notice people I know).

The RGA choses what comes into consciousness and what stays out. When I lived in downtown Vancouver, I tuned out a lot of noises and simply didn't hear sirens which were a constant feature of living in the west end. The last time I visited Vancouver I was struck by how noisy it was compared to Kamloops. When people experience things that they can't make sense of they create a story that makes sense to them to explain the event which is why eyewitness testimony is so often contradictory.

Not only sensory stimuli are chosen to come into consciousness but so are memories and emotions. A person who is severely depressed has a very different r* than when they are euthymic. In talking with severely depressed people one is struck by how they seem to be completely unable to remember any time in their life that they felt well. Every memory they access is either one of a past failure, a personal rejection or of a bad feeling. Given natures propensity to recycle working algorithms it wouldn't surprise me if the memory recall circuitry is based on sensory pathway circuitry.

What got me going on this whole topic seemingly an endless time ago was the problem of dealing with chronic pain in patients. Someone who is actively working and concentrating hard on a problem doesn't feel pain because their attention is directed elsewhere. People with chronic pain are hyperfocused on the pain and seem to be unable to divert their attention elsewhere. The area of the brain associated with this selective attention is the dosolateral prefrontal cortex (DLPFC) which explains why prefrontal lobotomy is such an excellent treatment for severe pain (if one is concerned only with eliminating the pain). It may also explain why amphetamines augment opiates (reference in an old version of Goodman and Gillman's pharmacology textbook) as this will increase peoples ability to focus on other things.

For years I've been referring to a number of medical and psychiatric problems as "disorders of reality creation". The initial observations over the last 10 years have been entirely as a result of reading Norretranders book in 2000 and only today did I start looking in detail at the literature. Thus far the results are congruent with what I've found aside from the degree of contraversy over Libet's interpretation of his experiments. The next stage is to dive into the literature and find out what the current neurobiologic orthodoxy is at this time. I find that if one is doing something which is unorthodox it helps to know what the standard theories are so that one can prove to people, should ones practice be investigated for doing alternative medicine, that one knows the current consensus thinking and why it is wrong.

This is a preliminary post and will likely be altered substantially over the next few weeks as I get deeper into this area (assuming that I have the time and I haven't fallen too far behind on doing idiotic forms and asinine insurance reports which are the bane of a physicians existence). What we need is a new specialty of administrative medicine in which the anally retentive unimaginative severe OCD physicians would specialize in and any form that needed to be done for a patient would be referred to an administrative medicine specialist making my medical practice so much more enjoyable. It will probably never happen, but I can dream.

Posted by Boris Gimbarzevsky at 1:09.54
Categories: Medical