<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13766433</id><updated>2012-01-31T15:06:12.666-08:00</updated><title type='text'>More Organs → More Human</title><subtitle type='html'>Stupid things I've figured out so that you don't have to.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13766433.post-5054180885238966358</id><published>2010-08-12T14:00:00.000-07:00</published><updated>2010-08-12T14:02:24.114-07:00</updated><title type='text'>The move...</title><content type='html'>So, after more than a year of non-bloggery, I've decided to change things up a little bit and try out a different blogging platform. Going forward, More Organs -&gt; More Human will be located at &lt;a href="http://blog.bedrick.org"&gt;http://blog.bedrick.org&lt;/a&gt;, and will hopefully be updated slightly more often. Thanks, Blogger- it's been great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-5054180885238966358?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/5054180885238966358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=5054180885238966358' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/5054180885238966358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/5054180885238966358'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2010/08/move.html' title='The move...'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-2122070468216595017</id><published>2008-01-28T14:56:00.000-08:00</published><updated>2008-01-28T14:59:54.481-08:00</updated><title type='text'>Notes on the Cuban Internet</title><content type='html'>I was poking around O'Reilly's Radar blog, and found the following post: &lt;a href="http://radar.oreilly.com/archives/2008/01/folks_are_often.html"&gt;O'Reilly Books and the Cuban Internet&lt;/a&gt;. It's about the role that O'Reilly books had in the early development of Cuban Internets. Naturally, it mentions the current state of the Internet in Cuba (short version: heavily censored). I decided to chime in with what was supposed to be a short reply, but turned into a slightly longer blurb than I'd intended. It seemed like the sort of thing that people who know me might be interested in, so I thought I'd re-post it here. Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;I was actually in Cuba a year ago for the medical track of an IT conference, and while there I tried to learn as much as I could about the state of the Cuban Internet experience. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;First, a caveat: I had the opportunity to meet many tech-savvy Cubans from many different sectors of Cuban society, all of whom were friendly and knowledgeable, and none of whom *seemed* to be pulling any wool over my eyes.... however, in Cuba, as an outsider, it is very difficult to know what's true and what isn't. Conversations between locals and foreigners are generally assumed to be under surveillance, and the locals know it and tend to choose their words carefully. There wasn't any reason for anybody to be BSing me- it's not like we were directly talking politics, or anything like that- and people were generally quite open about certain negative aspects to Internet use in Cuba... but I certainly take what I learned with a very large grain of salt, and suggest that you do the same.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;From what I was able to find out, one's ability to use the Internet depends heavily on one's position in Cuban society. The nicer tourist hotels in Havana have (very, very expensive) Internet facilities for their guests to use, but I never saw any actual Cubans using them- not sure if that's because of the price, or because most Cubans aren't really allowed in the tourist hotels in downtown Havana.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Everybody I talked to was quite open about the impossibility of average Cubans having computers and Internet access in their homes-- I don't know one way or the other if that impossibility is "de jure" or "de facto",  but either way, most people have no legitimate way to get online and this was common knowledge among Cuban digerati. Nearly everybody attributed this impossibility to "El Bloquero" (the Embargo). This is not surprising: in Cuba, *everything* is blamed on the embargo... and, to be completely fair, the embargo does indeed affect Cuban society in many ways (some obvious, some not). Without getting into what is an enormously complex subject, I'll just say that it seems plausible to me that some the limits on Cuban Internet access might indeed be caused by the embargo; however, that simply can't be the whole story. It suits two goals of the regime to limit the Internet's penetration in Cuban society: first it allows them to control the potentially disruptive effects of the Internet; second, it gives the government one more thing to blame on the embargo.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;However, many of the doctors and medical researchers I talked to reported having at least some dial-up Internet access in their homes and offices, theoretically for professional use- Cuba has done some really impressive things in terms of using computer networks for medical communication and training, and the dedication on the part of the (ludicrously underpaid and undersupplied) doctors towards their patients was impressive. Being a doctor in Cuba really isn't a 9-to-5 at all, and having access to the national medical intranet (called Infomed) from home is crucial. People being people, however, it is almost a guaranteed thing that many Cubans with legitimate Internet access in their homes are finding ways to share that access with their neighbors in some fashion.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Another way that the Cubans I met were using the Internet was via their schools. Medical students have Internet access through their universities, but only (from what I was told) via public computer labs. I was able to meet on several occasions with students from the local university's IT/CS departments. They all reported having unfettered internet access, though they said it was slow and flaky at times. They all had gmail accounts, and I saw them using various instant messaging clients just as obsessively as college students here in the US do- I don't think they were "Potemkin Email Accounts". Most of them used Linux in some form or another, and reported being able to access message boards without issue. I asked specifically about news sources such as the BBC-- from the conference center and from various hotels, I had been able to access it without issue. The students I talked to reported being able to access it without restriction from their school labs, but who knows if that was really the case or not- furthermore, even if it was the case, who knows what sort of logging or monitoring was being carried out by their schools!&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Incidentally, I got the distinct impression that Cuban Internet users I talked to were well aware of the fact that their online activities were almost certainly being monitored and logged, at least to some extent. Nobody came out and said it, but after a week or two in Cuba I began to be able to pick up on certain hints and cues- the Cuban people are far from stupid, and know perfectly well when they're being watched in real life... it's hard to explain, but they seemed to know the score regarding their online activities. Alternatively, I could have imagined all of it- after a little while, I began to absorb some of the the paranoia that comes naturally from being in what is fundamentally a police state. A very warm and welcoming police state, with many wonderful people and many fine attributes- but a police state nonetheless. One of my traveling companions grew up in an Eastern Bloc country in the 1940s and 1950s, and said that in many ways being in Cuba felt like "being back home," so to speak, and that, in some ways, the Cubans we met had many of the same mannerisms that he remembered from his youth- always looking over their shoulder, being aware of who was around them while they were talking, etc.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I talked to several people involved in the design and operation of Infomed, and according to what they told me, there is plenty of network bandwidth *within* Cuba. There is, however, a severe bottleneck on traffic *leaving* Cuba- partially due to the sketchy nature of their connection (a couple of fiber lines to Venezuela, according to one engineer I talked to) and, presumably, partially due to whatever traffic monitoring system the Cuban government has put in place. It would not surprise me in the least to learn that the Cuban telecom authorities were using some sort of traffic shaping to prioritize tourism-related network traffic (e.g., from hotels and resorts) over Cuban traffic. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Interestingly, several engineers told me that one problem facing Cuban Internet access was that the American government was actively trying to interfere with their traffic, and that every couple of months the telecom engineers who maintained the external connection had to make some sort of routing change to get around whatever blocks the Americans had put in place. I have *absolutely* no way of knowing if this is true or not- I wouldn't be surprised either way. On the one hand, it sounds pretty far-fetched, and as near as I can tell Cuba's national pastime is to find a way to blame everything, up to and including the weather, on the embargo. On the other hand, that's *exactly* the sort of crazy and time-wasting stunt that our government would try and pull. The history of US-Cuban relations is littered with dozens of crazier and further-fetched attempts by both governments to get on each other's nerves, so who knows? &lt;br /&gt;&lt;p&gt;&lt;br /&gt;In spite of the embargo, I saw a fair amount of American tech being used- Cisco routers, HP servers, a couple of Epson scanners, and so on. According to one person I talked to, there are various Latin American resellers who sell Cuba American electronics at a significant markup. I also saw several Chinese telecom companies exhibiting their wares- apparently, much of the Cuban telecom infrastructure is built on Chinese equipment. Interestingly, I saw a surprising number of Apple machines in use, mostly by the team developing Cuba's homebrew radiology imaging system. I hadn't been expecting to see *any* Macs besides my own, so seeing five or six set up demoing a PACS application was a pleasant surprise.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Wow, this really ended up being a lot longer than I'd intended it to be. There's all kinds of stuff that I'm probably leaving out, so shoot me an email if you want to hear more. Basically, the bottom line is that Internet use in Cuba is growing, but in a very controlled and directed fashion. At some point, the floodgates will *have* to open, just as they have everywhere else in the world, and I think the government knows it... but they're delaying for as long as possible. Their reasons presumably have less to do with keeping Cubans from getting information from the outside world- there is plenty of foreign media available in Cuba, especially to people who are connected in some way to the tourism industry (which is an awful lot of people these days...). I suspect that the government's reasons for not wanting the general population to have Internet access have more to do with restricting the sorts of communications Cubans can have with one another- I don't imagine that they'd want Cubans to be able to set up Google Groups to complain about the government, or for underground groups to be able to communicate securely. To my mind, this is probably why they have restricted Internet access to individuals with at least some stake in the status quo.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;However, I think the history of the Internet has taught us that betting against the free flow of information is generally a losing bet. People have a way of getting around whatever barriers are put in their way when it comes to accessing and using the Internet, and the sooner governments everywhere learn this and adapt accordingly, the happier we'll all be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-2122070468216595017?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/2122070468216595017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=2122070468216595017' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/2122070468216595017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/2122070468216595017'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2008/01/notes-on-cuban-internet.html' title='Notes on the Cuban Internet'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-40140926846197555</id><published>2008-01-16T17:30:00.000-08:00</published><updated>2008-01-16T17:42:36.711-08:00</updated><title type='text'>Notes from Macworld 2008</title><content type='html'>Live, from the Microsoft "Blogger's Lounge" at this year's Macworld Expo, some disjointed notes and observations:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I had absolutely no &lt;em&gt;idea&lt;/em&gt; how many different companies were attempting to make a business out of carrying, storing, protecting, decorating, or otherwise interacting with your iPod. Seriously, it's insane. Ever third or fourth booth is occupied by someobdy with a new and improved carrying case.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Office 2008 is certainly shiny, and seems to have lots of good features. However, it's introducing a UI innovation not unlike its corresponding Windows version's "Ribbon", and the implementation is flawed. It has lots of flashy animations- when you change to a different "tab" of controls, the new controls sort of swoop in from the left. This is cute the first time, and then gets annoying. Fast. The spokespeople all seemed to agree that there is no way to disable the animations. Lame.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Office 2008 also introduces some basic bibliographic management features. Unfortunately, they only support three or four reference styles: Chicago, APA, and one or two others that I've forgotten about. There's no way to import or add new styles. Double lame. Apparently, you can edit existing ones, but then what are you supposed to do if you need Chicago style for something? I don't think EndNote has anything to worry about.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The people at OmniGroup's booth were friendly. Big congrats for winning the "Best of Show" award with OmniFocus!&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The Nikon D3 is a seriously sexy camera. I took a picture at ISO 3200 that had about the same amount of noise as my D70 has at ISO 400. You can practically shoot in the dark with that thing.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The new Macbook Air is even shinier in person than in pictures. That doesn't change its constrained feature set or exorbitant prices, but it's still impressive. Also, I'm guessing that the target customer for that thing isn't worried about either of those things...&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;More notes as they come...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-40140926846197555?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/40140926846197555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=40140926846197555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/40140926846197555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/40140926846197555'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2008/01/notes-from-macworld-2008.html' title='Notes from Macworld 2008'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-5432024549129415092</id><published>2007-10-24T12:01:00.000-07:00</published><updated>2007-10-24T12:14:24.365-07:00</updated><title type='text'>Word of the day: Rhombencephalitis</title><content type='html'>While reading about the ongoing listeriosis outbreak in Norway, I came across an interesting new word: Rhombencephalitis. Apparently, this is an inflammation of the &lt;a href="http://www.bartleby.com/107/187.html"&gt;rhombencephalon&lt;/a&gt; (or hindbrain)&amp;mdash; the part of the brain that manages our heart rate, breathing, and so on. Needless to say, this is a very, very, very bad place to have an infection. For some informative reading, check out:&lt;br /&gt;&lt;br /&gt; Popescu, G A, Saquepee, M, Poisson, D, Prazuck, T. Treatment difficulties of a listerial rhombencephalitis in an adult patient allergic to penicillins. J Clin Pathol 2004 57: 665-666 &lt;a href="http://jcp.bmj.com/cgi/content/full/57/6/665"&gt;[journal]&lt;/a&gt;&lt;a href="http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=retrieve&amp;db=pubmed&amp;list_uids=15166280&amp;dopt=AbstractPlus"&gt;[pubmed]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Nichter, C. A., Pavlakis, S. G., Shaikh, U., Cherian, K. A., Dobrosyzcki, J., Porricolo, M. E., Chatturvedi, I. Rhombencephalitis caused by West Nile fever virus. Neurology 2000 55: 153 &lt;a href="http://www.neurology.org/cgi/content/full/55/1/153"&gt;[journal]&lt;/a&gt; &lt;a href="http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=retrieve&amp;db=pubmed&amp;list_uids=10891935&amp;dopt=AbstractPlus"&gt;[pubmed]&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-5432024549129415092?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/5432024549129415092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=5432024549129415092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/5432024549129415092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/5432024549129415092'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/10/word-of-day-rhombencephalitis.html' title='Word of the day: Rhombencephalitis'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-860476076658490559</id><published>2007-10-19T14:14:00.000-07:00</published><updated>2007-10-23T11:31:21.391-07:00</updated><title type='text'>PostgreSQL tip: Make sure your indexed columns' data types match!</title><content type='html'>Hello again, kiddies. Today's post describes a particular behavior of PostgreSQL that has bitten me on the bum more than once. Do you have any queries that should be using an index, but aren't? Read on for a possible explanation.&lt;br /&gt;&lt;br /&gt;I've been working with the UMLS a lot lately. For those who are unfamiliar with this acronym, it stands for the "Unified Medical Language System" and is a monstrously large database containing millions of medical terms and concepts in dozens of languages. While it can be a wonderful resource, the adjectives I'd use to describe it do not include "easy to use." One of its nifty features is that, in addition to simply storing medical terms, it stores a little bit of &lt;em&gt;semantic information&lt;/em&gt; about the terms. In other words, if I know the UMLS code number for "Weil's Disease", I can (in theory) find out that it is a type of "Leptospirosis", and that it is therefore a "Zoonotic bacterial infection" and a "Spirochetal infection". &lt;br /&gt;&lt;br /&gt;As you might imagine, this involves writing an SQL query that JOINs data from several tables on a particular set of specified values. Now, given the size of the UMLS, some of these tables have millions of rows. As anybody out there who's done anything with SQL will tell you, you &lt;em&gt;really&lt;/em&gt; want the database engine to do that join using an index scan (as opposed to a simple sequential scan, which would have to visit each and every one of those millions of rows). Luckily, in PostgreSQL, if you are trying to join two tables, &lt;em&gt;and&lt;/em&gt; the column you're joining on is indexed in both of those tables, the system is usually smart enough to do an index scan, and life is good.&lt;br /&gt;&lt;br /&gt;Note the use of that all-important word, "usually". There are certain circumstances in which, in spite of both columns being indexed, the database will insist on doing a sequential scan on one or both of the tables. You'll know when this happens because a query that should take under one second will instead take ninety (depending, of course, on how large your tables are). The first step for diagnosing a slow query should always be to use the "&lt;code&gt;explain&lt;/code&gt;" command. When you do &lt;code&gt;explain&lt;/code&gt; your mysteriously slow query, the odds are good that you'll see the dreaded "&lt;code&gt;Seq Scan on...&lt;/code&gt;" listed as one of the steps instead of "&lt;code&gt;Index Scan using...&lt;/code&gt;". &lt;br /&gt;&lt;br /&gt;There are all sorts of reasons why Postgres could be choosing not to use an index, but the reason that has gotten me most often over the years is that the columns involved in comparisons (i.e., the columns that are being specified as the join conditions) are not using the same datatype. The first time I ran into this problem, I was using two tables that were involved in storing customer shopping cart data. For some reason that I've long since forgotten, we'd used &lt;code&gt;bigint&lt;/code&gt; (i.e., &lt;code&gt;int8&lt;/code&gt;) as the datatype for a column in one table, and only used &lt;code&gt;int&lt;/code&gt; (&lt;code&gt;int4&lt;/code&gt;) for the corresponding column in the other table. Even though each table had a column index for the relevant column, Postgres was doing a sequential scan, which began to absolutely murder our query's performance once one of the tables got to having more than 100,000 rows or so.&lt;br /&gt;&lt;br /&gt;The solution was refreshingly easy: in the query, simply cast one of the columns to the appropriate datatype. In this case, we casted the &lt;code&gt;int4&lt;/code&gt; column to &lt;code&gt;int8&lt;/code&gt;, and *boom*, the query ran thousands of times faster.&lt;br /&gt;&lt;br /&gt;Today, in the UMLS, I found myself running into the same problem trying to do a join between mrhier (~8,000,000 rows) and mrconso (~ 4,000,000 rows): for some reason, the &lt;code&gt;mrhier&lt;/code&gt; table's &lt;code&gt;paui&lt;/code&gt; column is set to &lt;code&gt;varchar(10)&lt;/code&gt;, whereas every other column storing an AUI is &lt;code&gt;varchar(9)&lt;/code&gt;. I forced my query to start casting to varchar(9), and things suddenly started using their appropriate indices. I don't know if the difference in data types is a bug in the UMLS SQL load scripts, or what&amp;mdash; MRCOLS.RRF tells me that the PAUI column should have a maximum of 9 characters, so that spare character is almost certainly anomalous.&lt;br /&gt;&lt;br /&gt;For example, consider the following query: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;select str from mrconso where aui in (select distinct mh.paui from mrhier mh where mh.aui = 'A2883423');&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that I'm using a subquery mostly out of convenience. &lt;code&gt;explain analyze&lt;/code&gt; gives the following output: (Blogger's screwed up the formatting, you might need to copy and paste into Text Edit or something)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;umls=# explain analyze select str from mrconso where aui in (select distinct mh.paui from mrhier mh where mh.aui = 'A2883423');&lt;br /&gt;                                                                           QUERY PLAN                                                                           &lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt; Hash IN Join  (cost=164014.37..352398.59 rows=43224 width=32) (actual time=2008.163..50013.062 rows=2 loops=1)&lt;br /&gt;   Hash Cond: (("outer".aui)::bpchar = "inner".paui)&lt;br /&gt;   -&gt;  &lt;span style="color: red;"&gt;Seq Scan on mrconso  (cost=0.00..166340.32 rows=4322332 width=63) (actual time=0.100..43613.254 rows=4322332 loops=1)&lt;/span&gt;&lt;br /&gt;   -&gt;  Hash  (cost=164014.36..164014.36 rows=2 width=34) (actual time=0.205..0.205 rows=0 loops=1)&lt;br /&gt;         -&gt;  Subquery Scan "IN_subquery"  (cost=163814.12..164014.36 rows=2 width=34) (actual time=0.189..0.197 rows=2 loops=1)&lt;br /&gt;               -&gt;  Unique  (cost=163814.12..164014.34 rows=2 width=34) (actual time=0.185..0.192 rows=2 loops=1)&lt;br /&gt;                     -&gt;  Sort  (cost=163814.12..163914.23 rows=40045 width=34) (actual time=0.184..0.185 rows=3 loops=1)&lt;br /&gt;                           Sort Key: paui&lt;br /&gt;                           -&gt;  Index Scan using x_mrhier_aui on mrhier mh  (cost=0.00..160080.82 rows=40045 width=34) (actual time=0.075..0.096 rows=3 loops=1)&lt;br /&gt;                                 Index Cond: ((aui)::text = 'A2883423'::text)&lt;br /&gt; Total runtime: 50049.380 ms&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Crikey! This thing took almost a minute to run! I've highlighted the culprit in red: that dang sequential scan. Let's change the query a little bit, and use the casting trick, like so:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;select str from mrconso where aui in (select distinct mh.paui&lt;span style="color: red;"&gt;::varchar(9)&lt;/span&gt; from mrhier mh where mh.aui = 'A2883423');&lt;/code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I've highlighted the cast. Let's run &lt;code&gt;explain analyze&lt;/code&gt; again:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;                                                                        QUERY PLAN                                                                        &lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt; Nested Loop  (cost=164014.34..337010.71 rows=43224 width=32) (actual time=40.762..87.066 rows=2 loops=1)&lt;br /&gt;   -&gt;  Subquery Scan "IN_subquery"  (cost=164014.34..164214.59 rows=2 width=31) (actual time=0.232..0.261 rows=2 loops=1)&lt;br /&gt;         -&gt;  Unique  (cost=164014.34..164214.57 rows=2 width=34) (actual time=0.229..0.249 rows=2 loops=1)&lt;br /&gt;               -&gt;  Sort  (cost=164014.34..164114.46 rows=40045 width=34) (actual time=0.227..0.232 rows=3 loops=1)&lt;br /&gt;                     Sort Key: (paui)::character varying(9)&lt;br /&gt;                     -&gt;  Index Scan using x_mrhier_aui on mrhier mh  (cost=0.00..160281.04 rows=40045 width=34) (actual time=0.091..0.111 rows=3 loops=1)&lt;br /&gt;                           Index Cond: ((aui)::text = 'A2883423'::text)&lt;br /&gt;   -&gt;  Index Scan using x_mrconso_aui on mrconso  (cost=0.00..86127.91 rows=21612 width=63) (actual time=43.368..43.382 rows=1 loops=2)&lt;br /&gt;         Index Cond: ((mrconso.aui)::text = ("outer".paui)::text)&lt;br /&gt; Total runtime: 87.286 ms&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Look, ma, no sequential scans! Pretty remarkable performance improvement, eh? Sub-100-ms vs 50,000 ms! Amazing what a good index will do on sufficiently large tables.&lt;br /&gt;&lt;br /&gt;So, long story short, Postgres' query planner is very picky about column data types, even down to how many characters a &lt;code&gt;varchar&lt;/code&gt; is given. If a query is misbehaving, try experimenting with some casting and see what you get.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Update:&lt;/strong&gt; For the sake of completeness, I should mention that the PAUI column is not supposed to be 10 characters long- it's supposed to be 9 characters long, but there's a bug in the sql load file that the UMLS gives out wherein the column is set to 8 characters by mistake. To "fix" this bug, I set it to 10, thereby introducing this other bug. This all happened before I had found the master data dictionary for the UMLS; if I were to run into this problem today, I would have been able to discover that the correct column width for PAUI is 9 characters and this never would have happened. However, the larger point of the article--- that it's important to JOIN on similarly-typed columns--- is still valid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-860476076658490559?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/860476076658490559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=860476076658490559' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/860476076658490559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/860476076658490559'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/10/postgresql-tip-make-sure-your-indexed.html' title='PostgreSQL tip: Make sure your indexed columns&apos; data types match!'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-5890835069484218623</id><published>2007-09-24T20:00:00.000-07:00</published><updated>2007-09-24T20:20:55.385-07:00</updated><title type='text'>Bubonic Plague and Mongolian Cooking</title><content type='html'>There exists an excellent and widely-read infectious disease notification listserv, published by the International Society for Infectious Diseases. It's named ProMED, and it covers pretty much any interesting disease outbreak going on in the world. The best part is actually the commentary--- once a report makes it onto ProMED, other readers are able to contribute their opinions and findings back to the group. The listserv's editors are all experienced infectious disease specialists, and they often offer useful commentary as well.&lt;br /&gt;&lt;br /&gt;This afternoon's ProMED contained a &lt;a href="http://www.promedmail.org/pls/promed/f?p=2400:1001:16155610718481397597::NO::F2400_P1001_BACK_PAGE,F2400_P1001_PUB_MAIL_ID:1000,39439"&gt;fun little report&lt;/a&gt; of bubonic plague in Mongolia--- apparently, a 16-year-old boy was skinning a marmot his father had caught and cut his finger in the process. Marmots apparently serve as the main plague reservoir in Mongolia, and our unfortunate Mongolian teenager soon found himself infected with glandular bubonic plague. Luckily, he lived in an area with plenty of doctors and medicines, and recovered nicely.&lt;br /&gt;&lt;br /&gt;So far, this is an interesting but not particularly funny disease report. Immediately following the initial report, however, were the ProMED editors' comments:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;[Plague is endemic in Mongolian marmots and their fleas, but as roast&lt;br /&gt;marmot ("boodog" in Mongolian) is a popular dish there, some unlucky&lt;br /&gt;hunters catch it every year.  See marmot photo at&lt;br /&gt;&lt;a href="http://www.bobak.ru/pics/view/Marmota%20sibirica.jpg"&gt;&amp;lt;http://www.bobak.ru/pics/view/Marmota%20sibirica.jpg&amp;gt;&lt;/a&gt;;&lt;br /&gt;and recipes at&lt;br /&gt;&lt;a href="http://www.e-mongol.com/mongolia_culture_cooking-recipes.htm"&gt;&amp;lt;http://www.e-mongol.com/mongolia_culture_cooking-recipes.htm&amp;gt;&lt;/a&gt;;&lt;br /&gt;- - Mod.JW]&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Yup, you read that correctly: a link to actual roast marmot recipes, following a link about a case of one of the world's most feared pathogens! The recipes themselves sound pretty good--- apparently, standard marmot-roasting practice involves packing the body cavity of a cleaned and de-boned marmot with extremely hot rocks, sealing it up again, and letting it cook from within, making for very tender and tasty meat. Best of all, according to the recipe, this dish (called boodog) is a risky one to prepare: there is a chance that an improperly-packed marmot could explode during cooking due, one imagines, to gas buildup.&lt;br /&gt;&lt;br /&gt;Three cheers for infectious disease epidemiology! One learns new things every day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-5890835069484218623?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/5890835069484218623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=5890835069484218623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/5890835069484218623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/5890835069484218623'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/09/bubonic-plague-and-mongolian-cooking.html' title='Bubonic Plague and Mongolian Cooking'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-2614528530670548448</id><published>2007-06-22T22:32:00.000-07:00</published><updated>2007-06-22T22:42:09.666-07:00</updated><title type='text'>Word of the Day: Lithopedion</title><content type='html'>OK, boys and girls, it's time to learn a new word: Lithopedion. Roughly translated from the Greek, lithopedion essentially means "stone child". Apparently, some ectopic or abdominal pregnancies result in fetuses that are too large for the mother's body to reabsorb. Very, very, very rarely, in this cases, the mother's immune system walls off the necrotic fetal tissue by calcification, after which the lithopedion can remain present and undetected for decades. While hacking away at our medical image retrieval program this afternoon, we ran across this &lt;a href="http://www.mypacs.net/cgi-bin/repos/mpv3_repo/wrm/repo-view.pl?cx_subject=72398&amp;cx_image_only_mode=off&amp;cx_repo=mpv4_repo"&gt;radiograph&lt;/a&gt; in our collection. Pretty wild, eh? Here's some further reading:&lt;br /&gt;&lt;br /&gt;Lithopedion: laparoscopic diagnosis and removal.&lt;br /&gt;Fertil Steril. 2007 May;87(5):1208-9. Epub 2007 Feb 6. &lt;br /&gt;PMID: 17289039&lt;br /&gt;&lt;br /&gt;Lithopedion presenting as intra-abdominal abscess and fecal fistula: report of a case and review of the literature.&lt;br /&gt;Am Surg. 2006 Jan;72(1):77-8. &lt;br /&gt;PMID: 16494190&lt;br /&gt;&lt;br /&gt;Old abdominal pregnancy presenting as an ovarian neoplasm.&lt;br /&gt;J Korean Med Sci. 2002 Apr;17(2):274-5. &lt;br /&gt;PMID: 11961318 &lt;br /&gt;&lt;br /&gt;Lithopedion: a case report.&lt;br /&gt;Clin Anat. 2001;14(1):52-4. &lt;br /&gt;PMID: 11135399&lt;br /&gt;&lt;br /&gt;For those of you who don't have access to medical libraries, I can pull any of these articles for you if you're interested.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-2614528530670548448?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/2614528530670548448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=2614528530670548448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/2614528530670548448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/2614528530670548448'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/06/word-of-day-lithopedion.html' title='Word of the Day: Lithopedion'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-4316708019740103334</id><published>2007-05-20T15:37:00.000-07:00</published><updated>2007-05-20T15:58:45.745-07:00</updated><title type='text'>Mixed-Effects Drinking Game</title><content type='html'>While trying to figure out how to get SPSS to calculate a mixed-effects model, I have accidentally invented a new drinking game. To play, you'll need the following:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;A latop with a relatively recent copy of SPSS installed;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Data with both fixed and random effects;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A bottle of the liquor of your choice. I suggest either some quality tequila or some ice-cold Jägermeister.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Construct your model, and have SPSS run it. You'll probably get an error message. If not, take two shots and pass the laptop to the next player, you lucky S.O.B. Otherwise, take shots according to the following schedule:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"Model cannot be fitted because number of observations is less than or equal to number of model parameters."&lt;/em&gt; &amp;mdash; one shot, and try again after specifying a different covariance type in the "Random" dialog box or in the "/RANDOM" parameter of your syntax.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"Iteration was terminated but convergence has not been achieved. The MIXED procedure continues despite this warning. Subsequent results produced are based on the last iteration. Validity of the model fit is uncertain."&lt;/em&gt; &amp;mdash; two shots, and try again after specifying a different covariance type in the "Random" dialog box or in the "/RANDOM" parameter of your syntax, or after changing some of the parameters in the "Estimation" dialog box.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"The final Hessian matrix is not positive definite although all convergence criteria are satisfied. The MIXED procedure continues despite this warning. Validity of subsequent results cannot be ascertained."&lt;/em&gt; &amp;mdash; three shots, and try again after specifying a different covariance type in the "Random" dialog box or in the "/RANDOM" parameter of your syntax. This one gets three shots because, in spite of its warnings about the "validity of subsequent results", it apparently gives perfectly usable output... except when it doesn't. Nobody seems to be able to tell me if there's any way to tell if, when presented with this error, the user should be worried about the "validity of subsequent results", or if he/she should just go ahead and use them. Hence the extra shots.&lt;br /&gt;&lt;br /&gt;Eventually, you'll either pick a covariance type that &lt;em&gt;doesn't&lt;/em&gt; error out, or you'll fall over drunk. &lt;br /&gt;&lt;br /&gt;Note how the solution is basically the same for all of those? A surprisingly large number of statisticians and websites seem to advocate "blindly changing covariance type until you get one that works" as the proper way to deal with mixed-effects models in SPSS. I'm becoming convinced that nobody actually understands mixed-effects models, and that it's all some sort of conspiracy to prevent us from getting interpretable data. Really, from what I can tell, being wasted while trying to deal with SPSS's mixed-effects output couldn't make things any &lt;em&gt;more&lt;/em&gt; difficult, and the more I think about it, the more it seems like that those error messages might actually make more sense with a couple of tequila shots under my belt.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-4316708019740103334?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/4316708019740103334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=4316708019740103334' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/4316708019740103334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/4316708019740103334'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/05/mixed-effects-drinking-game.html' title='Mixed-Effects Drinking Game'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-7443794996161099673</id><published>2007-04-24T10:44:00.000-07:00</published><updated>2007-04-24T10:46:04.834-07:00</updated><title type='text'>Epidemiology of Zombies</title><content type='html'>Some sort of disjointed half-written blurb about my Cuba trip is forthcoming, but, in the meantime, check &lt;a href="http://www.lablit.com/article/145"&gt;this&lt;/a&gt; out. It has officially Made My Day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-7443794996161099673?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/7443794996161099673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=7443794996161099673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/7443794996161099673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/7443794996161099673'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/04/epidemiology-of-zombies.html' title='Epidemiology of Zombies'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-117503829373299922</id><published>2007-03-27T17:30:00.000-07:00</published><updated>2007-03-27T17:33:27.116-07:00</updated><title type='text'>Argentina, Part 2: "Uhhh... ¿como se dice 'asynchronous callback function'? "</title><content type='html'>In my previous post, I mention taking a taxi from the airport to my hostel. As the taxi pulled out from the airport, I was feeling pretty good about my level of Spanish ability. After all, I'd managed to change currency, clear customs, get my bags, and get a taxi, all entirely in Spanish! As the taxi began to enter traffic, I remember thinking to myself something along the lines of: "Hey, I remember more Spanish than I thought! I can do this, no problem."&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; About two seconds after having this particular musing, my taxi driver started trying to initiate conversation, and I learned rather abruptly exactly how much the Central American Spanish I learned in high school differs from Argentine Spanish. The accent here is incredibly thick, and there are many different words used, even major ones like pronouns. Instead of "tu" for an informal pronoun, they use "vos". Any "ll" is pronounced somewhere between "sh" and "zh" and a hard "j". Sibilants are extremely soft (not quite a lisp as heard in Spain, but close), and frequently the last phonetic chunk of words are dropped entirely. Of course, everybody here speaks at about a hundred miles per minute. All of this makes listening comprehension kind of difficult, especially over (for example) cell phones or in loud bars or clubs. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; On top of all of that, even when I can clearly hear what people are saying, that's no guarantee that I'll understand a damn word. Let's talk about all that Spanish we all took in high school. Remember all the insipid little skits we had to act out about ordering different kinds of drinks, and so on? Yeah. All that. I think I learned about five different words for "soda", since the textbook couldn't include any alcoholic drinks&lt;a name="arg_2_head_1"&gt;&lt;/a&gt;&lt;a href="#arg_2_foot_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;. Well, allow me to present a few words and phrases that they &lt;em&gt;didn't&lt;/em&gt; teach us, all of which came up multiple times within my first 24 hours in Argentina.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;"Join"; as in "May I join you?" Actually, my dictionary lists several different words for "join", but I'm kind of afraid to use any of them--- it seems quite likely that at least one of them actually means something that could earn me a slap in the face&lt;a name="arg_2_head_2"&gt;&lt;/a&gt;&lt;a href="#arg_2_foot_2"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;"Fork", "Spoon", "Napkin", etc. As in "May I have a fork, please?"&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Various cuts of beef. "Lomo"? "Asada"? "Cogote"? Apparently, in Argentina, you don't just order a steak, you order an anatomy lesson. More on this later. Admittedly, this is somewhat Argentina-specific, but it's incredibly disconcerting to look at a menu and not know what a single thing on it is.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;"Waiter". The aforementioned insipid skits made a major point of teaching us that the word for "waiter" was "camarero". This is not, in fact, the case (at least in Argentina). Apparently, the word for "waiter" is "mozo" or "moza", and if you use "camarero", it is simultaneously confusing and insulting to all involved parties.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;"Medical Informatics". As in "I am a medical informatics graduate student", in response to "¿Que haces para trabajar?" I've actually built up a little spiel describing what I'm doing in Argentina; I'm not sure quite how well it works--- it's possible that a good chunk of Buenos Aires now thinks I'm a medical student or something. But at least I'm no longer flailing about trying to remember the word for "research" ("investigación"). Also, there isn't really an easy way to say "graduate student" or "graduate school", since the educational system here is quite different from ours. I usually have to go about explaining it as more school following University, but I'm pretty sure there's a better way to handle that.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;"Electoral College". Yeah. Try explaining the bizarre inner workings of our confusing political system in horribly broken Spanish. It was apparently hilarious to those around me; hopefully, they were laughing at how crazy our system is, not how bad my explanation was (&lt;em&gt;Yeah, right, and I'm a water buffalo-- ed.&lt;/em&gt;).&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt; Now, with the exception of the last two items, all of these are relatively easily dealt with; the problem is that they are pretty basic, everyday use phrases. I can recall all sorts of completely useless hours spent learning how to describe different kinds of movies ("horror", "ficciones de ciencias", etc.), none spent learning how to offer to share a bottle of wine.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Another language-related problem I've encountered is that, in addition to hanging out around bars and hostels, I spend a lot of time hanging out with programmers and bureaucrats at hospitals and ministries of health. Let me tell you three more areas that my high-school Spanish didn't cover: programming, medicine, and politics. Yeah, good luck trying to discuss object-oriented programming, or the relative merits of different Linux distributions, or various epidemiological concepts. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Technical vocabulary here is a bizarre mix of English words, Spanish-ified English words ("basé de data" for "database", "historia medico electrónico" for "electronic health record", etc.), and then completely different words (for example, "graphical user interface" is something entirely different--- so different, in fact, that I've completely forgotten it). Similarly difficult is describing the US health care system--- partially because it is absurdly complex and counter-intuitive, and partially because we didn't learn words like "reimburse" or "deductible" back in high school, and the authors of my dictionary didn't seem to think they were all that important.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The upshot of my complete and total lack of a technical vocabulary is that I spend a lot of time sounding like a five-year-old while trying to discuss difficult concepts. Thus far, I've managed to communicate reasonably well, but it can get kind of frustrating at times. I imagine that this will improve with time, though. Already, in the week that I've been here, my Spanish listening comprehension has improved significantly, as has my spoken Spanish.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;a name="arg_2_foot_1"&gt;&lt;/a&gt;&lt;a href="#arg_2_head_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;: Of course, in reality, alcoholic drinks would have been &lt;em&gt;far&lt;/em&gt; more useful for me to have learned words for in high school. While plenty of people drink soda, they simply call it "Coka" or "Coke". Alcoholic drinks, however, have all sorts of strange and interesting nomenclatures, which can result in hilarious mishaps involving rum. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; &lt;a name="arg_2_foot_2"&gt;&lt;/a&gt;&lt;a href="#arg_2_head_2"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;: Actually, from what I've observed thus far about people's views on sex down here, a slap in the face is a relatively unlikely outcome. Argentine society seems pretty up-front and comfortable about sex, or at least far more so than the US. A far more likely outcome is some minor embarrassment on my part, and major amusement on the part of everybody within earshot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-117503829373299922?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/117503829373299922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=117503829373299922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503829373299922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503829373299922'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/03/argentina-part-2-uhhh-como-se-dice.html' title='Argentina, Part 2: &quot;Uhhh... ¿como se dice &apos;asynchronous callback function&apos;? &quot;'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-117503820605907024</id><published>2007-03-27T17:26:00.000-07:00</published><updated>2007-03-27T17:32:07.763-07:00</updated><title type='text'>Argentina, Part 1: "Disculpa, no yo entiendo. Más despacio, por favor."</title><content type='html'>So, I made it down here in one piece. This was the first time I'd flown Continental Airlines in years, and I was pleasantly surprised. Compared to United or Delta, their planes are pretty new and in excellent shape. Best of all, they actually give a somewhat substantial snack/meal during the flights--- even for a relatively short jaunt from San Francisco to Houston. It's clear that the airline is pinning its hopes on its inventory of Latin American routes. Their flight staff are all bilingual, and all in-flight announcements are in both English and Spanish. It certainly was no Singapore Air in terms of general "shininess", but it beat the heck out of most US airlines.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The days immediately preceding my departure were partially spent trying to find a place to stay once I got here. I knew that I needed to find a hostel of some sort, since hotels--- while certainly cheaper than in the US--- are still a bit too spendy to stay at for a week. Beyond that, however, I didn't know much. There are dozens of different hostels in Buenos Aires, and I didn't have time to do any kind of serious research. I solicited recommendations from several Argentines of my acquaintance, sent off a bunch of emails, and hoped for the best. By the day of my departure, I had heard back from a few hostels, and none of them had any vacancies. Luckily, about ten minutes before I boarded my flight from Houston to Buenos Aires, I called home to have somebody check my email for me one last time, and, lo and behold, the hostel that I'd been most interested in had replied and had rooms available. I had somebody send a reply reserving a private room (only 10 pesos more per night than a communal room, and worth every centavo), and proceeded to board my flight.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Upon landing around nine in the morning, the English got turned off, and the Spanish got turned on.  I'll surely discuss the language issue in more detail in a subsequent post, but suffice to say that, in my case, "turned on" is a somewhat misleading phrase. It makes it sound like flicking on a light switch and suddenly having a ton of light. In reality, it's more like starting up an old, leaky, backfiring Model-T with one flat tire using some sort of hand-crank apparatus: it takes a while, doesn't sound pretty while you're doing it, may require hours of poking and prodding with wrenches and what-not, and, once you've finally got the thing running, it doesn't even drive very well. Long story short, language-related hilarity has been ensuing on a more or less continuous basis since I got here. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Anyways, I was able to make it through customs without being arrested and change dollars into pesos without being ripped off too badly. The next challenge was to obtain a taxi. This turned out to be surprisingly easy, as the airport has little kiosks for several of the reputable taxi companies. You simply go up to the counter and tell them where you're going. They quote a price, you agree, and then an employee takes you and your bags to the waiting taxi. Then, said employee tries to solicit a tip, which you, not yet having learned that &lt;em&gt;nobody&lt;/em&gt; tips in Argentina, happily give him. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Once in the taxi, we left the airport and started heading for Buenos Aires proper. Prior to coming on this trip, I'd heard horror stories about BsAs's crazy drivers and awful traffic. While there was in fact a great deal of truth to the stories, I'm pleased to report that the drivers here are nowhere near as bad as they're made out to be. I've developed a sort of mental logarithmic scale from one to ten, where one is "No particular fear of death upon entering a vehicle" and ten is "Fully expecting major trauma or organ system failure as a direct result of the drive". The scale is normalized such that Portland is a one, and Calcutta is a ten. New York is maybe a two or three. I'd put Argentina as a whole somewhere between six and eight, depending on who's driving and where you are (e.g., on the bus heading downtown at rush hour, in a taxi at three in the morning, on the highway outside of town, in somebody's personal vehicle  etc.). Crossing the street can be an... exhilarating experience, but by and large it's not too bad.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Anyways, after an only very mildly hair-raising ride, we made it to my hostel. I stayed in a neighborhood named "Abasto", which is kind of off the beaten tourist path. I chose it largely due to its close proximity to the hospital where my only BsAs contacts worked, and knew nothing about the neighborhood itself. I found it to be a wonderful location: right next to a subway stop, with lots of interesting shops, cafes, and bars nearby. It is perhaps a ten-minute subway ride from the main downtown area, and a very pleasant 30-minute walk. One of the granddaddies of modern tango--- Carlos Gardel--- lived there, and it continues to be a major hotbed for local music. Because it was so far away from the major tourist areas, prices at restaurants and stores were incredibly low. A gigantic, tasty steak dinner comes to perhaps five or six US dollars. Å ten-dollar sweater closer to downtown would cost maybe seven dollars in Abasto.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The hostel itself is in the top two floors of a converted apartment building or brownstone. You enters from the street through a pair of typical Argentine doors--- ludicrously tall, skinny, and heavy--- and goes up a narrow marble staircase. At that point, you're in the main living area, which contains a few couches, a dining room, a hallway leading to the kitchen and one of the dorms, and also a staircase going up to the second floor. My single room was upstairs, at the very end of the hallway. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The crowd staying at the hostel was your typical motley multinational assortment of students, travelers, etc. I found that there were very few residents who spoke English, which gave me a sort of trial-by-fire when it came to conversation. Everybody was very friendly, and we had a "good ol' time" running around BsAs together. A number of the people there were in Argentina for extended periods of time, so their local friends frequently dropped by. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; My first order of business upon arrival was to obtain a cell phone. This is astonishingly easy in Argentina. Any given city block has at least two stores where one can buy a phone, activation chip, and phone card. Through extensive use of hand-waving and dictionary consultation, I managed to pick the whole package up for about 100 pesos, or about thirty dollars. The number was ready to use within minutes, and no two-year contracts were required. Absolutely wonderful.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The next order of business was to obtain lunch. Using an extremely scientific process of "wandering around", I found a nice looking restaurant where I obtained my first taste of Argentina's amazing beef. The dish was called "asado", not to be confused with the cultural practice of "asado" or the Mexican dish "carne asada". In this case, "asado" refers to a particular cut of beef. It is sort of like a transverse section through the ribs. In other words, rather than having the ribs be present as long skinny bones, the meat is cut such that the rib bones appear as small, short cylinders. For nine pesos (three dollars), I got three gigantic pieces of meat--- perhaps consisting of four or five ribs each, and maybe an inch or two think. Grilled right there, fresh to order. Absolutely delicious.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; I also learned something about Argentine salads: they are extremely literal. If the menu says that a salad is, for example, a potato and tomato salad, that is exactly what you'll get. A giant bowl of diced tomato and diced potato, in roughly equal proportions. If the menu says that a particular salad is a celery salad, you'll get a huge bowl of diced celery and nothing else. This is not &lt;em&gt;necessarily&lt;/em&gt; a bad thing; however, it is somewhat surprising the first few times.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; On my first night in Buenos Aires, I got a crash course in the ludicrous hours kept by Argentines. Some of the other residents of the hostel invited me to go bar-hopping with them, and I of course accepted. None of them spoke a word of English, but I was able to follow enough of the conversation to understand that we would be leaving "pretty early", perhaps around 11:30 or 12:00. We ended up walking halfway across the city to a neighborhood called Palermo, which is currently the trendy part of town. It was founded at least a hundred years back when the residents of San Telmo--- which had been the former trendy neighborhood--- were forced to change neighborhoods by yellow fever. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; This is actually something of a recurring theme. Most of the nicer neighborhoods' histories seem to follow a general plot description along these lines: "Nice Neighborhood XYZ was first established by an influx of wealthy residents from the former nicest neighborhood of ABC fleeing a Yellow Fever outbreak." From what I read and saw, it sounds like Yellow Fever, in fact, seems to have historically been one of the major driving forces in urban planning in Buenos Aires.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; At any rate, we made it to Palermo and began the hunt for an appropriate bar. This took a good half-hour, and involved sticking our heads in probably half a dozen bars. I was never really able to follow exactly why any given bar was deemed inappropriate, but by a aggressive program of smiling, nodding, and following, I managed to keep up. Finally, at probably about 1:00 in the morning, we found what we were after, and proceeded to hang out until about 4:00. At this point, the bar was still totally packed. In fact, in the three hours since our arrival, it had grown steadily more crowded. Our table was immediately grabbed upon our departure. This was a Thursday night, and people were still actively arriving at bars at 4:00 in the morning!&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The next day was Friday, and I was scheduled to meet with the informatics team at the Hospital Italiano. The hospital is located about ten blocks from where I was staying, so it was a very straightforward walk down there. I was met by the director of the informatics group, whom I had met during her visit to Portland earlier this year. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The hospital itself is (partially, at least) in a gorgeous old building and is more than a century old. It is one of the largest private hospitals  (i.e., not part of the public health system) in Buenos Aires, and is considered one of the top hospitals in South America. In addition to the main hospital, there are a variety of satellite outpatient clinics as well as a health insurance plan. My main interest in the hospital is their informatics program, one of only a few such programs in Latin America. Medical residents can choose to do a full residency in the informatics group just as they might choose to do a radiology or general surgery residency, and medical students rotate through the department as well.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The main activity of the informatics group seems to be working on their fascinating homebrew electronic health record. It is used in both the ambulatory and inpatient settings, though there is no order entry in the inpatient system due to Argentina's lack of legal digital signatures. The whole thing is built on top of the Spanish-language version of  SNOMED-CT, and the terminology system that ties it all together is a thing of beauty. The crown jewel, as far as I'm concerned, is a master thesaurus of something like 40,000 Argentine medical phrases, acronyms, idioms, etc. The residents and students spend a great deal of time modeling locally-used medical concepts within the SNOMED framework and combing through progress notes and other user-created content to find things to add to the master index. It's actually a pretty slick bit of DHTMl hacking, and is quite usable.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The whole thing is a really impressive piece of work, all the more so when one considers the paucity of resources under which it has been developed. I met with about four or five of their programmers, and they are really working miracles. Comparisons with similar setups in the US are very difficult due to the completely different nature of our health care systems and the fact that I'm hardly an EHR expert, but I'd say that their system in general, and their terminology server in particular, are at least on par with anything I've seen anywhere in the US. The prescription component was certainly comparable to Vanderbilt's, and, again, the terminology server was absolutely incredible.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Given that I visited the hospital on a Friday, the informatics residents were curious about my plans for the evening. At that point, I didn't have any, so they took it upon themselves to dig up an incredibly comprehensive list of every party, concert, show, etc. taking place in the entire city of Buenos Aires that night. This was how I heard about a show called the "Choque Urbana", whose Friday-night performance I ended up attending. Apparently somewhat well-known in Argentina, they are somewhere between a musical act and a "performance art" group. Sort of like Stomp, only more... Argentine. The show consisted of an extended percussion concert making use of pots, pans, oil drums, paint buckets, the floor, a large organ-type thing made of copper pipes, megaphones, bicycles, etc. etc. etc. The whole thing was hung over some sort of basic plot, which I was (of course) completely unable to follow. So, for me, it was a primarily musical experience. The small theater it took place in was three blocks from my hostel&lt;a name="arg_head_1"&gt;&lt;/a&gt;&lt;a href="#arg_foot_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;, and excellent seats were 25 pesos (approximately 8 dollars).&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; When the show got out at 11:00 or so, it was time for dinner. This ended up being my first taste of Argentine pizza. Due to a large number of Italian immigrants in the 19th century, Argentina has a serious love affair with pizza and pasta. This seems like a good time to mention an important observation about restaurants in Argentina: essentially all restaurants, no matter how small, invariably have three main staple items on the menu. The first is an astonishingly wide assortment of meat served fresh from the &lt;em&gt;parilla&lt;/em&gt;, the omnipresent barbecue grill found in every home, business, street corner, hospital, soccer stadium parking lot, etc. in the entire country. A full discussion of the social, zoological, and gastrointestinal implications of the &lt;em&gt;parilla&lt;/em&gt; could easily fill multiple volumes, and will have to wait for a later essay. The second basic category is pasta, typically spaghetti, ravioli and perhaps one or two other varieties (gnocchi is quite popular). The third is pizza, invariably cooked fresh to order in a stone oven.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Since the pizzas are so fresh, and are invariably cooked in a proper oven (as opposed to one of the weird conveyer-belt-style ovens so frequently found in the US), they are almost always excellent. The crust is usually pretty thin, and there is always a ton of cheese--- either mozzarella, provolone, or occasionally blue cheese. There are, however, two major shortcomings. The first is the topping selection. Pepperoni seems to be unknown here; the only meats commonly found on pizzas are ham and occasionally anchovies. The second major shortcoming involves the sauce. Namely, their nearly complete lack thereof. Most pizzas here will contain the merest hint of tomato sauce, which causes problems given the thin crust and massive amounts of cheese and topping. Pizza, as a food group, must strike a delicate balance between the four pillars of crust, sauce, cheese, and topping. Too much of any of these relative to the others results in a culinary experience which, however tasty it may be, falls short of perfection. Argentina's pizza tends to be somewhat philosophically lopsided. (Now &lt;em&gt;there's&lt;/em&gt; a sentence that can't come up too often!)&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Sauce-related deficiencies notwithstanding, the pizza here is generally excellent, especially when one considers the (relatively) miniscule price. Also, they introduce a cheese-related innovation that might be ready for its American debut: some forms of pizza involve slices of provolone cheese augmenting the standard mozzarella, which gives them an interesting flavor and texture. Incredibly delicious. Future research is needed  to determine which toppings go best with provolone, or if it is possible to get the cooks to use more than just a light brushing of sauce. Luckily, I was able to secure external funding to cover food expenses while in the city of Rosario, so we may be able to obtain results on this trip. If not, future investigators will have to pick up where we left off.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Well, that's enough of a side-track. The next day was Saturday, which I spent sightseeing. Buenos Aires is a gorgeous city, and reminds me more of Prague than anyplace else I've ever been. The buildings are gorgeous--- brick faced with marble and terra-cotta, with balconies at every window. As previously mentioned, the doors are very dramatically proportioned, which makes everything seem even taller than it really is. Some of the streets are still cobblestone, and the sidewalks are mosaics of smaller tiles rather than large cement slabs. Apparently, in 2000, Bs As was considered one of the world's most expensive cities, on par with Tokyo and New York. Then, when the convertibility system that had been artificially pegging the peso to the dollar collapsed, and took the Argentine economy down with it, Bs As became known as one of the best bargains in the entire continent of South America. Of course, along with the bargain travel came a corresponding increase in street crime, and guidebooks from the 2002-2004 period feature many dire warnings about how to avoid kidnapping and mugging. Today, things have rebounded quite a bit, which has helped with the street crime. I felt very safe at all times in Bs As, even in areas that were clearly not squeaky clean. Compared to Calcutta, beggars were relatively few and far between, and the few stray dogs I encountered were mostly wandering about on their own as opposed to in packs. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Mobile phones are everywhere, and the bars and cafes are always full. Even after rebounding somewhat, the city remains an incredible bargain to American travelers. A decent lunch can be found for $5, and a stellar dinner for under $10. The subway is 0.70 pesos per trip, which works out to something around 25 cents.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; My first goal on Saturday was "The Obelisk", a large monument constructed right in the center of downtown Buenos Aires. It is found at the intersection of Corrientes (one of the city's major arterial streets) and Ave. 9 de Julio (both Femoral and Carotid arteries combined). It seemed like a nice "getting one's bearings" sort of destination for my first real day of sight-seeing.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; The walk to the Obelisk took about an hour, and involved passing through several of Buenos Aires' less touristy neighborhoods. These included one called "Once" (pronounced "on-say", just like the Spanish word for "eleven"), which historically has been one of the city's larger Jewish neighborhoods. Various books and people had told me that most of the Jewish residents have moved elsewhere, but there was a definite ultra-orthodox presence on the streets and in the shops. Several Sephardic sects have apparently set up shop in the district, and on this Saturday morning there were several large families clearly walking to or from synagogue. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Once is also one of the largest shopping districts in the city, and Ave. Corrientes from Abasto to the Obelisk is lined with stores of all sorts--- clothing, electronics, books, music, food, etc. The side streets are similarly full of shopping possibilities, and the total result of all of this is that the place is packed with people. Families, kids, old folks, all types. It makes for fascinating--- but slow--- walking.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; As I walked downtown on Corrientes, the shops got progressively more expensive and upscale, until finally I ran into Ave. 9 de Julio. "Ran into" is definitely the phrase to use--- the experience was roughly comparable to hiking through the woods for an hour and then suddenly hitting the Pacific Ocean. 9 de Julio is the single biggest street I've ever seen in my life, featuring at least nine lanes of traffic in each direction. It takes two traffic signal cycles to cross, and is an incredibly harrowing experience. Even when the lights are supposedly in your favor, there are so many interlocking lanes of traffic that people are constantly turning, changing lanes, going up on sidewalks, etc., and it's not always clear where the various lanes deposit traffic.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Once I eventually managed to cross this behemoth, I found myself in what was unquestionably the downtown heart of the city. The businesses were mainly large banks and other downtown-ish types of organizations, punctuated by the occasional tourist-oriented pedestrian walkway full of overpriced leather stores and sidewalk vendors selling maté gourds. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Also found downtown was an excellent and mysterious art museum. I say mysterious because it lacked any signs about its name, and nobody I asked later on seemed to think that there was such a museum anywhere near where I had been. Mystery notwithstanding, the place was clearly a large, established museum with an extensive collection of contemporary Argentine art, and two major traveling exhibitions in residence.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; After wandering around downtown for a little while, I began heading towards my next destination: Tribunales, the Argentine Supreme Court building. This involved re-fording the mighty Ave. 9 de Julio and then heading back uptown several blocks. The Tribunales building is supposedly one of the loveliest in the entire city. Unfortunately, it is currently undergoing restoration, and its exterior is completely covered by a huge black tarp, except for the doors. So, while it certainly should get some sort of award for, say, "Largest Tarp", or something, it can't really lay any claims in the "Lovely" division at the moment. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; However, immediately across the plaza from Tribunales lies the Teatro Colón, the city's primary opera house. This, too, is undergoing restoration, but only on one of its faces, leaving the main edifice spectacularly visible. Several times on this trip I've found myself wishing I knew more about architecture, the better to describe the buildings I'm seeing. This is definitely one of those times. The building is gorgeous and impressive, and the main lobby is even more so.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; This lobby is mostly marble and mosaic tiles, with a great vaulted ceiling and huge windows letting in amazing light. The room is filled with display cases containing various opera-related artifacts, and there are some absolutely incredible marble sculptures dotted throughout. I don't know whether it's that I've never paid attention before, or maybe I've just never seen any decent statues, but until the Teatro, I'd never seen a marble figure that looked alive before, or whose clothing looked like frozen silk and not marble. Absolutely incredible stuff.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; One block away from the Teatro is one of the oldest synagogues still in use in Buenos Aires. Built some time during the 1800's, it is a beautiful and very solidly built building facing the same park/plaza that the Teatro and Tribunales buildings face--- a very central location. This is also the location of the Jewish Museum of Buenos Aires, which I was keen to visit. Unfortunately, the museum's hours are extremely limited, and emphatically do not include Saturday.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; That night, I went with some other folks from the hostel to a party at a different hostel in Palermo. We took a cab to the general vicinity, and then wandered around for a bit trying to find the place. When we finally did, it turned out to be behind an essentially unmarked locked door on a quiet, completely shuttered street. Some rapid-fire Spanish was spoken over the intercom, and somebody who apparently knew my companions came to let us in. The door turned out to open to a long, dark alleyway, which eventually led to a sort of open outdoor courtyard area. The courtyard was pretty small--- maybe twenty feet on a side--- and featured doors leading off to a kitchen and a side room, and also had a large staircase going up to what was presumably the hostel's main level. A DJ was spinning a really interesting mix of North and South American dance music from the balcony on the second level.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Since it was pretty early--- barely past midnight--- there weren't all *that* many people there. The courtyard was pretty full, but it was still possible to move around. This rapidly began to change, and by the time we'd been there for an hour, there were so many people that just going to the kitchen for a drink refill meant making ten or fifteen new and very close friends. The crowd kept getting heavier, which had certain repercussions vis-a-vis the Ideal Gas Law--- imagine people as atoms in a gas state, stuck in a rigid volume. Add more atoms, and pressure and temperature both have to increase. The crowd was mostly made up of younger hostel types, but there were a fair number of obvious "grown-ups", which I found confusing at the time.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Around 1:30, there was something of a commotion over in one corner, and the DJ's music stopped. The commotion turned out to be four older guys with drums, who proceeded to give an incredible performance. I later found out that these guys were a well-known Cuban drum troupe, and were possibly the raison d’être for the party in the first place. This explained the relative diversity of ages amongst the guests, and maybe even some of the crowding. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; By the time we left, at about 4:30, the party was so crowded that nobody was dancing- we were all sort of just bouncing semi-rhythmically off of one another. I'd never really understood when books talked about being "swept" along with a crowd, or used aquatic metaphors like "tide" or "wave" to describe crowds. This party changed all of that--- I now fully understand the tidal metaphor. Whenever a new group of people arrived--- which happened every couple of minutes, from who-knows-where--- the whole crowd sort of surged a few feet in one direction to make room for the newcomers. I'm not quite sure how this worked, since the courtyard was consistently completely full, but somehow we managed. Nobody seemed bothered by the fire-escape-related implications of the whole thing, so I tried not to worry about it too much. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Whenever I travel to another country, I often find myself having to consciously tell my standard-issue American, worry-about-everything "inner safety monitor" to shut up. On this trip, this has generally taken the form of not worrying about seatbelts in cars, not worrying about sharing maté straws, and being willing to eat various strange and terrible parts of cows (more on this in a subsequent post). That night, though, it took the form of telling my inner fire marshall not to worry.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;a name="arg_foot_1"&gt;&lt;/a&gt;&lt;a href="#arg_head_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;:  Although the theater was located very close to my hostel, actually &lt;em&gt;finding&lt;/em&gt; it proved to be a little bit challenging, as the roads in that part of town are not exactly on what I'd call an orderly grid. During my wandering about, I passed a large building with a Star of David on the outside, and with many people coming and going. "Aha!", I thought to myself. "You've found a synagogue! It's Friday night, you should go check it out!" I began walking up to the front door, and was almost immediately stopped by a police officer, who said something to me very quickly in heavily accented Spanish. I tried to explain that I was Jewish, and was curious about what was inside the building, but did not have much success. The first police officer summoned a second one (at this point, I noticed that there were quite a few police officers around this particular building, and that there were no cars parked for a block in either direction), who spoke even faster and with an even heavier accent. Eventually, they decided that I was more confused than dangerous, and gestured for somebody from inside the building to come and talk to me. Luckily, this newcomer spoke a &lt;em&gt;little&lt;/em&gt; bit of English, and was nice enough to speak very slowly in Spanish so as not to confuse the gringo too badly.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Him: "What do you want?"&lt;br/&gt;&lt;br /&gt; Me: "I'm just curious, what's inside the building?"&lt;br/&gt;&lt;br /&gt; Him: "It's a... um... cómo se dice... a club."&lt;br/&gt;&lt;br /&gt; Me: "Ah, a club for Jews?"&lt;br/&gt;&lt;br /&gt; Him: "Yes, that's right. A club for Jews."&lt;br/&gt;&lt;br /&gt; Me, starting to walk towards the door: "Great!"&lt;br/&gt;&lt;br /&gt; Him: "Wait! Are you a member? You can't go in unless you're a member."&lt;br/&gt;&lt;br /&gt; Me, thinking that he means "member of the tribe" or something: "Sure, I'm a member!"&lt;br/&gt;&lt;br /&gt; Him: "Do you have proof?"&lt;br/&gt;&lt;br /&gt; Me, wondering whether he expected me to (for example) drop my pants in public to demonstrate my Jewish-ness: "Umm... what sort of proof?"&lt;br/&gt;&lt;br /&gt; Him: "You need a membership card."&lt;br/&gt;&lt;br /&gt;&lt;p/&gt;&lt;br /&gt; Right around this point, I had begun to notice that all the people going in or coming out were carrying backpacks or gym bags, and that many of them were in workout clothes. When he asked for a membership card, I realized that this was a Jewish athletic club. At the same time, he realized that I thought it was a synagogue. We were quite quickly able to sort the whole thing out, and I went on my way, but it was far from the last time that this sort o thing happened. Language is a funny thing- sometimes, I think it'd be better not to speak any Spanish at all, rather than speak just enough to get myself in trouble.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-117503820605907024?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/117503820605907024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=117503820605907024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503820605907024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503820605907024'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/03/argentina-part-1-disculpa-no-yo.html' title='Argentina, Part 1: &quot;Disculpa, no yo entiendo. Más despacio, por favor.&quot;'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-117503784343992823</id><published>2007-03-27T17:21:00.000-07:00</published><updated>2007-03-27T17:31:57.330-07:00</updated><title type='text'>Pre-Trip Stuff I Wanted to Put up Weeks Ago</title><content type='html'>&lt;em&gt;Note: This post was actually written in mid-June of 2006 and is just now seeing the light of day.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;What follows are some &lt;em&gt;completely&lt;/em&gt; random notes that I had intended to put online before leaving for my camping trip two weeks ago, but for various reasons am just now jotting down in a hostel in Buenos Aires. &lt;br /&gt;&lt;br /&gt;First: some general comments on the Macintosh version of National Geographic's "Topo!" software. After having long admired it at REI, I finally let myself get talked into buying it. Naturally, I didn't end up needing to print any maps using it, but it did come in handy for trip planning a few times, and I have high hopes for its use in the future. I had expected the OSX port to be yet another crappy, half-assed port of a Windows program. I was almost completely wrong on that point--- whoever did the port did a bang-up job. Not only does it function quite well, it looks and feels more or less like a native Mac program should. It uses various OSX UI features such as sheets and drawers appropriately, and performs pretty well to boot. Being the massive geek I am, my first thoughts were along the lines of "I wonder which cross-platform framework they used?". When it comes to Windows &amp;amp; OSX, there are several options--- WxWidgets and Qt being chief among them. I could definitely be wrong, but Topo! doesn't look or feel like it was built with either of those. It actually feels like a "real" OSX app. &lt;br /&gt;&lt;br /&gt;The software itself is fantastic--- every USGS map for the entire state of Oregon, plus a pretty good chunk of the parts of Washington and Idaho that border Oregon. I suspect that there is similar coverage coverage of California and Nevada as well, but haven't checked. My only significant gripe is with the printing--- the maps that come out are disappointingly low-resolution (in terms of dots-per-inch of ink on the page, not scale). They are perfectly usable, but could be much better. I'm guessing it's because the map data are stored in some raster file format, and space was at a premium. Future versions would do well to improve this aspect of the software, however. &lt;br /&gt;&lt;br /&gt;Two more minor gripes are with export capabilities and a minor bug in the waypoint list feature. There are various ways to export maps from the software, but none of them are meant to be used with other GIS or mapping software applications, such as Google Earth. These programs typically want input images that are projected in a certain way, and also frequently want scale information. There is a standard file format called GeoTIFF which is designed for this; however, the only way that I've found to get GeoTIFFs out of the software is to buy the more expensive "Pro" version. Since this capability seems to be the major difference between the "Consumer" and "Pro" versions, I suspect that the limitation is artificial and has more to do with marketing than with software.&lt;br /&gt;&lt;br /&gt;The second aforementioned minor gripe is that, on the Mac version, the GPS waypoint list display widget seems to max out at 1,000 items. While this might seem like a relatively rarely-encountered use-case, many datasets from the USGS include far more than 1,000 points. For example, the USGS master list of coordinates for the nation's hot springs contains well over 1,800 points. While Topo! imports and overlays these files perfectly on the map display, any information in the "note" field of the waypoint is only accessible from the waypoint list view, which, as previously mentioned, only displays the first 1,000 points. Since Oregon's points start just &lt;em&gt;after&lt;/em&gt; point number 1,000, this causes some problems.&lt;br /&gt;&lt;br /&gt;Luckily, the solution was pretty easy. There is an excellent OS X interface to a program called "GPS Babel" which is designed for reading, writing, and transforming various GPS-related file formats. It is able to read in the ".tpg" file provided by the USGS. It is also able to filter out points based on a variety of criteria, including distance from a particular set of coordinates. So, I was able to open the file, remove any points more than 300 miles from Portland, and then re-import into Topo!. This did the trick, and I was able to get the information I needed.&lt;br /&gt;&lt;br /&gt;The other item to mention is REI's "Half-Dome 2" tent. For the price, it is extremely solid and held up well under a week of camping. It packs down reasonably small, and is also light enough (around 5.5 lbs) that would be possible to take it backpacking if needed. We found that one person working alone can erect the tent in under five minutes, and two can do it even faster. The only slightly complicated part is the rain fly--- it is pretty irregularly shaped, which makes it kind of tricky to drape and then later re-fold.&lt;br /&gt;&lt;br /&gt;The tent itself is plenty roomy for two people, though the vestibules are a little on the small side. Actually, if I had to come up with a complaint about the tent, it would be with the rain fly. It is just a tiny bit too small, which results in the vestibules being a little bit tight. It also results in the fly being in contact with parts of the tent that you really don't want rainfall runoff directed to, i.e. the head and foot sections. During the one rainstorm we encountered on our trip, it performed well enough... but I'm a little bit concerned about how it would handle longer bouts of precipitation.&lt;br /&gt;&lt;br /&gt;All in all, though, the "Half-Dome 2" is a good tent at a great price. Definitely worth looking into.&lt;br /&gt;&lt;br /&gt;W.r.t. the camping trip the tent was used for, &lt;a href="http://www.erdbeeregirl.net"&gt;others&lt;/a&gt; &lt;a href="http://www.soundandfury.info"&gt;have&lt;/a&gt; done an superb job of writing it up, so I won't. It was a ton of fun, the weather was great, we saw lots of beautiful stuff. I got some decent pictures, particularly of squirrels and a few nice macro shots of a hover-bug that paid my water bottle an extended visit. For some reason, many of my pictures were apparently taken at something of a slanting angle, which is kind of annoying. My camera can display hairlines in the viewfinder to aid in composition, and I almost always leave these enabled. In the past, this has helped me keep everything more or less level. So, when I saw that a lot of my (otherwise pretty decent) pictures from Crater Lake were about 15 degrees off of horizontal, it was a real surprise. A few other pictures came out slanted as well, but those were probably due to the odd angle I had to take them from--- perched on uneven rocks with a tripod at an odd angle, etc. I suppose another possible explanation is that I myself am at some sort of odd angle, and what I think of as being "level" is actually a few degrees off.&lt;br /&gt;&lt;br /&gt;At any rate, because of this, I'm trying to pay very close attention to my leveling these days. This inevitably seems to result in my over-thinking the whole thing, which undoubtedly has resulted in more off-kilter pictures. We shall see...&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note: I have since concluded that the problem is, in fact, with me being slightly off-level, and I've been getting better at correcting for it.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-117503784343992823?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/117503784343992823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=117503784343992823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503784343992823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503784343992823'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/03/pre-trip-stuff-i-wanted-to-put-up.html' title='Pre-Trip Stuff I Wanted to Put up Weeks Ago'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-117503744421972657</id><published>2007-03-27T16:54:00.000-07:00</published><updated>2007-03-27T17:31:44.436-07:00</updated><title type='text'>I'm not dead!</title><content type='html'>OK, everybody, stop the presses: I am not, in fact dead. That said, I do understand how so many of you may have managed to fall under this particular misconception, since apparently I haven't done anything with this site since May of last year. I've had a couple of half-written posts that have been sitting on my computer since last June, and I decided at the time that I would wait to put anything new up until I finished those posts. This strategy made sense when I thought that it would just be a few weeks until I finished writing... but here we are, going on nine months later, and the whole thing is just ridiculous at this point. :-) The posts I'm talking about were written while I was traveling in Argentina, and, more recently, Cuba. My usual travel writing pattern goes like this:&lt;br /&gt;Days 1-3: Write lengthy essays about what I'm up to.&lt;br /&gt;Days 4-8: Try and capture a few entertaining anecdotes, make well-intentioned noises about "filling in the details later"&lt;br /&gt;Days 8-n: Write nothing, feel guilty.&lt;br /&gt;&lt;br /&gt;This is, obviously, sub-optimal, and in the future I intend to try a more sustainable approach. However, what I've got from my last two trips-- and what's been blocking my blogging pipeline-- are a couple of pages of "Day 1-3"-style material. I'd like to post them-- there's some stuff in there that I think you guys would get a kick out of-- and then get this blog back to its usual technical format. However, my inner grammar cop is upset with the fact that these posts were written months and months ago, and were meant for immediate publication, and therefore make heavy use of the present tense.  A couple of times, I've thought about going through and re-writing things to use the past instead of the present tense, and that hasn't really worked out due to time considerations.&lt;br /&gt;&lt;br /&gt;So, here's what I'm going to do: I'm going to put up what I've got, and ask that you all keep in mind that I wrote most of this months ago. Also, while I am planning on writing more about my adventures in Argentina and Cuba, I won't be able to keep up the level of detail that I go into in these half-written-and-edited posts (&lt;em&gt;&amp;lt;sarcasm&amp;gt;What?! Shocking. However shall we survive? --ed.&amp;lt;/sarcasm&amp;gt;&lt;/em&gt;). Anyway, if anybody stumbles across these, shoot me an email and let me know what you think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-117503744421972657?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/117503744421972657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=117503744421972657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503744421972657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/117503744421972657'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2007/03/im-not-dead.html' title='I&apos;m not dead!'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114831835164488969</id><published>2006-05-22T10:16:00.000-07:00</published><updated>2006-05-22T10:19:11.656-07:00</updated><title type='text'>Java Question</title><content type='html'>Okay, is there anybody out there who can tell me what the heck is up with Java's Dimension object? Its accessors and mutators give and take double-precision numbers, which makes sense. What &lt;em&gt;doesn't&lt;/em&gt; make sense is its constructor&amp;mdash; which only takes integers! WTF?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114831835164488969?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114831835164488969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114831835164488969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114831835164488969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114831835164488969'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/05/java-question.html' title='Java Question'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114719639059789769</id><published>2006-05-09T10:38:00.000-07:00</published><updated>2006-05-09T10:42:41.793-07:00</updated><title type='text'>R Clinic: xtabs()</title><content type='html'>As promised, here's another entry in my ongoing quest to document all of the stupid stuff that &lt;em&gt;seems&lt;/em&gt; like it ought to be really easy but turns out to be kind of tricky. Today, we're going to learn how to load SPSS data into R, and then how to do cross-tabulations on that data. In SPSS, this is insanely easy. It turns out not to be all that bad in R, but the whole thing depends on a particularly poorly-documented aspect of the program. We'll start with the easy part: the data import.&lt;br /&gt;&lt;br /&gt;Before we get any further, please note that Blogger has decided to screw up my formatting. There's &lt;em&gt;way&lt;/em&gt; more whitespace than I'd wanted, and I can't seem to get rid of it. Grrr. Anyway, let's move forward.&lt;br /&gt;&lt;br /&gt;Consider an SPSS file called "cvd.sav". It contains stratified data representing aggregated cardiovascular disease figures for some population. The data set contains five variables:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt;A dichotomous gender variable ("male"/"female")&lt;/li&gt;&lt;br /&gt; &lt;li&gt;A categorical "age group" variable with five levels ("25-34","35-44", etc. up to "65-74")&lt;/li&gt;&lt;br /&gt; &lt;li&gt;A dichotomous variable representing blood factor IX levels ("low"/"high")&lt;/li&gt;&lt;br /&gt; &lt;li&gt;A dichotomous outcome variable ("CVD"/"No CVD")&lt;/li&gt;&lt;br /&gt; &lt;li&gt;A "count" variable&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Note that the data are aggregated. If we want to do anything with them in SPSS, we'll have to use the "Weight Cases" function, and weight by "count". We can read this file into R quite easily, using the "read.spss" function:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt; library(foreign)&lt;br /&gt;&gt; cvd &lt;- read.spss("~/cvd.sav", to.data.frame=TRUE)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that if we omit the "to.data.frame" argument, our variable will contain an object, which will make the next step a bit trickier. So, now we have a variable called "cvd". Let's see what it looks like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt; cvd&lt;br /&gt;   GENDER AGEGRP IXSTATUS OUTCOME COUNT&lt;br /&gt;1  Male    25-34     Low   CVD        6&lt;br /&gt;2  Male    25-34     Low   No CVD    75&lt;br /&gt;3  Male    25-34     High  CVD        4&lt;br /&gt;4  Male    25-34     High  No CVD    20&lt;br /&gt;5  Male    35-44     Low   CVD       12&lt;br /&gt;......................&lt;br /&gt;34 Female  55-64     Low   No CVD    37&lt;br /&gt;35 Female  55-64     High  CVD       39&lt;br /&gt;36 Female  55-64     High  No CVD    59&lt;br /&gt;37 Female  65-74     Low   CVD       27&lt;br /&gt;38 Female  65-74     Low   No CVD    24&lt;br /&gt;39 Female  65-74     High  CVD       57&lt;br /&gt;40 Female  65-74     High  No CVD    62&lt;br /&gt;&lt;br /&gt;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now that we've got the data, let's do something useful with it. We'll start with a quick crosstabulation of, say, gender vs cvd. What we'd ideally like to end up with is a 2x2 table looking like this:&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;br /&gt; &lt;tr&gt;&lt;br /&gt;  &lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;CVD&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;No CVD&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;Total&lt;/td&gt;&lt;br /&gt; &lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;br /&gt;  &lt;td&gt;Male&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;a&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;b&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;n&lt;sub&gt;1&lt;/sub&gt;&lt;/td&gt;&lt;br /&gt; &lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;br /&gt;  &lt;td&gt;Female&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;c&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;d&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;n&lt;sub&gt;2&lt;/sub&gt;&lt;/td&gt;&lt;br /&gt; &lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;br /&gt;  &lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;m&lt;sub&gt;1&lt;/sub&gt;&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;m&lt;sub&gt;2&lt;/sub&gt;&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;sum&lt;/td&gt;&lt;br /&gt; &lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Like I said earlier, to get this in SPSS, we'd simply use the "Crosstabs" function. In R, we need to use the "xtabs" function. This function is somewhat tricky in that it takes a "formula" as one of its arguments. It took me quite a while to figure out what to do with this, since the documentation isn't really as straightforward as it should be. Eventually, however, I figured it out. To get our table, we enter the following command:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt; xtabs(count ~ gender + outcome, cvd)&lt;br /&gt;        outcome&lt;br /&gt;gender   CVD No CVD&lt;br /&gt;  Female 260 524   &lt;br /&gt;  Male   233 477   &lt;br /&gt;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;See what happened there? Our "formula" should look familiar if you've ever entered a linear model in SPSS using the raw syntax format, and I think SAS's format is pretty similar. Essentially, you just put the "count" column of your data frame on the left hand side of the "~", and then put whichever columns you want to crosstabulate by on the right-hand side, separated by "+" signs. The order that they appear definitely affects how the table comes out, so it's worth experimenting a bit to see what you get.&lt;br /&gt;&lt;br /&gt;What we're really doing here is creating a "Formula" object, and once you know what to look for in the docs, they're actually pretty helpful (try "help(formula)"). The formula object is also found in the linear and regression modeling equations, so they're handy to learn how to use.&lt;br /&gt;&lt;br /&gt;So, that gets us a simple 2x2 table. What if we want to stratify further, and compare the counts by age group? We can simply tack on one more variable to the end of our formula, like so:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt; xtabs(count ~ gender + outcome + agegrp, cvd)&lt;br /&gt;, , agegrp = 25-34&lt;br /&gt;&lt;br /&gt;        outcome&lt;br /&gt;gender   CVD No CVD&lt;br /&gt;  Female  29 101   &lt;br /&gt;  Male    10  95   &lt;br /&gt;&lt;br /&gt;, , agegrp = 35-44&lt;br /&gt;&lt;br /&gt;        outcome&lt;br /&gt;gender   CVD No CVD&lt;br /&gt;  Female  32 121   &lt;br /&gt;  Male    27 112   &lt;br /&gt;&lt;br /&gt;, , agegrp = 45-54&lt;br /&gt;&lt;br /&gt;        outcome&lt;br /&gt;gender   CVD No CVD&lt;br /&gt;  Female  57 120   &lt;br /&gt;  Male    53  92   &lt;br /&gt;&lt;br /&gt;, , agegrp = 55-64&lt;br /&gt;&lt;br /&gt;        outcome&lt;br /&gt;gender   CVD No CVD&lt;br /&gt;  Female  58  96   &lt;br /&gt;  Male    71  93   &lt;br /&gt;&lt;br /&gt;, , agegrp = 65-74&lt;br /&gt;&lt;br /&gt;        outcome&lt;br /&gt;gender   CVD No CVD&lt;br /&gt;  Female  84  86   &lt;br /&gt;  Male    72  85   &lt;br /&gt;&lt;br /&gt;&gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that if we change the order of our formula arguments, we can get something rather different:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt; xtabs(count ~ agegrp + gender + outcome, cvd)&lt;br /&gt;, , outcome = CVD&lt;br /&gt;&lt;br /&gt;       gender&lt;br /&gt;agegrp  Female Male&lt;br /&gt;  25-34  29     10 &lt;br /&gt;  35-44  32     27 &lt;br /&gt;  45-54  57     53 &lt;br /&gt;  55-64  58     71 &lt;br /&gt;  65-74  84     72 &lt;br /&gt;&lt;br /&gt;, , outcome = No CVD&lt;br /&gt;&lt;br /&gt;       gender&lt;br /&gt;agegrp  Female Male&lt;br /&gt;  25-34 101     95 &lt;br /&gt;  35-44 121    112 &lt;br /&gt;  45-54 120     92 &lt;br /&gt;  55-64  96     93 &lt;br /&gt;  65-74  86     85 &lt;br /&gt;&lt;br /&gt;&gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Possibly useful for other reasons (some sort of Cochran test of trend, perhaps), but not what we were after here. I heartily suggest experimentation: if the xtabs function isn't giving you what you want, it might be a simple matter of re-arranging the terms in your function.&lt;br /&gt;&lt;br /&gt;Of course, as with everything else in R, we can save the output of xtabs() to a variable, which we can then use for hypothesis testing or other analysis. The return value from xtabs() is essentially a special type of matrix, so we can do all of the usual fun stuff one can usually do with matrices. Also, many functions (prop.test, chisq.test, etc.) will take a matrix as direct input.&lt;br /&gt;&lt;br /&gt;There's lots more you can do with xtabs in R, but this should be enough to get you started. I had to screw around with it for a couple of afternoons before I finally figured out what was going on; hopefully, someday this'll help keep somebody else&amp;mdash; or myself, once I forget how to do all of this&amp;mdash; from banging their heads against the wall for as long.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114719639059789769?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114719639059789769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114719639059789769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114719639059789769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114719639059789769'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/05/r-clinic-xtabs.html' title='R Clinic: xtabs()'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114624223934553305</id><published>2006-04-28T09:19:00.000-07:00</published><updated>2006-04-28T10:24:09.726-07:00</updated><title type='text'>Full of goo... mission goo...</title><content type='html'>Normally, I try to keep this blog relatively free of the random, stream-of-conciousness, unloading-of-random-personal-feelings family of writing. At the moment, though, I can't resist. It's a gorgeous Friday morning, it's already almost 70 degrees outside, not a cloud in the sky, and it's early enough in the day that, if I left now, I could go spend the day hiking in the Gorge and still make it back with plenty of time for dinner this evening. &lt;em&gt;Instead&lt;/em&gt;, I'm managing&amp;mdash; through sheer force of will&amp;mdash; to stay in my office, at my computer, doing homework. In an hour, I'll actually go to class. I might even pay attention. Then I'll read the article for today's seminar (or at least skim the abstract while I eat lunch), go to the seminar, return to my office, and continue to work. From my window, I'll have an excellent view of the sun making its way west. Just as it's heading below the hills, I'll  get on the bus and head home. &lt;br /&gt;&lt;p/&gt;&lt;br /&gt;I am in full academic mission mode. I will not be deterred. I am stronger than the weather. I can stay focused. Just a few more weeks until summer vacation, and then I'll have all the time in the world to go hiking. Back to proofreading.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;Something about this sort of weather, though, makes me really, really, really, really, &lt;em&gt;really&lt;/em&gt; not want to stay inside. Yesterday, I spent the better part of the afternoon pretending to pay attention to a recorded lecture that my professor left for us to watch while simultaneously playing the "airfare game"&amp;mdash; you know, the one where you bring up Travelocity or Expedia, enter in some far-off destination, and try to find the best fare: "Hmm... if I fly through London, stay over a night in Daka, and change planes in Bangkok, I can make it to Jakarta for only $1,350!" Or, "Hey, if I bump my return flight back a week, I can get to Tel Aviv and back for under $1,500!" It is for this reason that credit cards are dangerous things. I see some ridiculously huge fare on the computer screen, and I know that it would be a trivial physical motion for me to pull my credit card out of my wallet and enter the numbers into the computer. I know that, if I did that, I could then go  home to get my camera, drive to the airport, get on an airplane, and in a few short hours (ok, actually, quite a few really, really, really loooong hours) find myself somewhere far away having an adventure.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;For now, the simple thought of having to return to the Sisyphusian treadmill of credit card payments is enough to deter me... but I know that, one of these days, I'm just going to actually &lt;em&gt;do it&lt;/em&gt;. I'll type in the numbers, get on a plane, and will find myself in a souk in Amman, or on a beach in Goa, when the thought of consequences finally crosses my mind. I'll slap my forehead, yell a Simpsonian "'Doh!", and... well, I'm not actually sure what I'll do then. I'm sure I'll figure something out... in my mental screenplay of this event, Imagination-Steve engages in some risky-but-profitable, almost-legal money-making scheme with some friendly but somewhat disreputable locals, or maybe with the unsmiling Mosad agent he met at a bar. Possibly something "import/export"-related, or perhaps involving setting up a secure communications channel with a local underground political group, or giving bioinformatics tutorials to some people who, his friends assure him, are faculty members of the local university. Heavily-armed faculty members. Some of whom are middle-aged chain-smoking guys who speak with strong Russian accents, and whose knowledge of molecular biology seems a bit more "applied" than most American biologists', and whose internet connections come over aging Chinese satphone equipment rather than over the city's telephone network. But the money is good&amp;mdash; they offered him his choice of currencies&amp;mdash; and it makes a great story that he can pitch to the editor he sat next to on the airplane from Lisbon.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;Of course, that's just what Imagination-Screenplay-Steve would do. Real-Steve would probably finish his trip, have a great time, come back to the US, and then do a string of annoying and hassle-ridden consulting jobs until his debt to the credit card deities was paid back. That's because Real-Steve is far more sensible than Imagination-Steve... but he has a lot less fun. Of course, he's less likely to end up stabbed and left for dead on the side of the road in Kabul, or arrested and rotting in a cell in Bogota... but he's also a lot less likely to ever get a story written up in the next edition of &lt;a href="http://www.amazon.com/gp/product/0062737384/sr=1-2/002-1095486-4728009?n=283155"&gt;DP&lt;/a&gt;.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;Something about days like this, though&amp;mdash; warm, sunny, large stacks of unpleasant homework that desperately needs doing&amp;mdash; makes Imagination-Steve want to come out to play. Real-Steve keep telling me that the last time I let Imagination-Steve come out to play at all, even in a limited-trial-run sort of way, I ended up puking my guts out on the side of the road in Calcutta, but for some reason even that particular episode doesn't seem so bad in retrospect. It's really just Imagination-Steve rattling his chains and telling me "C'mon, you know you sort of liked it, it wasn't that bad, it makes a great story, you got some great pictures of the whole thing, go on, drink the tap-water, what's the worst that'll happen? They can cure dysentery these days, you know that, right?"&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;I know, enough already. Back to proofreading my paper. We'll be back to our regularly scheduled programming of occasional random geekery soon, I promise. In fact, right after I proofread this paper, I'm planning to write up the new R trick I learned last week (definitely falls into the category of "Stupid Stuff I Figured Out So You Don't Have To", and also the "Stuff I Will Almost Certainly Forget How To Do And Spend Hours Googling For The Next Time I Need It Unless I Write It Down Somewhere" category). Maybe if I really hurry (and stop procrastinating by writing this post), I can get enough done to at least do some of my reading outside this afternoon. The ILL-demigods finally brought my books on current statistical theory of molecular recombination. Big excitement in Real-Steve-land, eh? Meanwhile, Imagination-Steve is intrepidly hiking through the mountains of outside Kabul with his camera and satellite phone, getting ready to call in a story about the latest developments in poppy cultivation or some such thing. Or maybe he's met up with the airline pilots that he met in Calcutta last summer, and is on his way to Cape Verde right now. Or perhaps he's trying to convince his kidnappers that he's Canadian, not American, or that he only &lt;em&gt;looks&lt;/em&gt; Jewish, and that he's &lt;em&gt;certainly&lt;/em&gt; never been to Israel. Real-Steve, on the other hand, is about to pack up his laptop and head off to biophysics class. Today's topic: fluorescence, up close and personal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114624223934553305?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114624223934553305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114624223934553305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114624223934553305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114624223934553305'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/04/full-of-goo-mission-goo.html' title='Full of goo... &lt;em&gt;mission&lt;/em&gt; goo...'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114479603930063529</id><published>2006-04-11T15:30:00.000-07:00</published><updated>2006-04-11T15:53:59.343-07:00</updated><title type='text'>For the record...</title><content type='html'>I would like it noted that I just wrote the following sentence for my statistics homework:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;For simplicity's sake, I used R to calculate...&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I could be wrong here, but I think this may be the first time in recorded history that &lt;a href="http://www.r-project.org"&gt;R&lt;/a&gt; has &lt;em&gt;ever&lt;/em&gt; turned out to be the simplest way to do something. Usually, when people talk about R, they use phrases like "not as bad as I'd heard it would be", or "after a few hours of screwing around with R, I finally...", or "I gave up on R because...". &lt;br /&gt;&lt;br /&gt;For the uninitiated, R is an open-source math program, in the same general family of application as Matlab. It's based on some pretty old numerical computing code, so its syntax is kind of... odd. Once you figure it out, it's not &lt;em&gt;so&lt;/em&gt; bad, getting to that point can take an awfully long time, even for programmers or people who are familiar with programs like Matlab. The upshot is that it can basically do any kind of math you'll ever need, is free, and is easy-ish to integrate with other programs. Until today, I'd never found anything that I needed that it could do faster or easier than SPSS. It turns out, though, that getting SPSS to deal with, say, a 2x2 table when you've already got the data in aggregate form is, while entirely possible, pretty dang unintuitive. So unintuitive, in fact, that it was actually &lt;em&gt;easier&lt;/em&gt; to get R to do what I needed than it was to figure out (from the SPSS documentation) how to get SPSS to do it. In this case, I needed to do what may well be the simplest statistical task involving a 2x2 table: a normal test of the equality of two proportions. In R, it was about two lines of input. In SPSS, it's a pretty convoluted process involving dummy variables, case weighting, etc. &lt;br /&gt;&lt;br /&gt;Part of this has to do with the way that the two programs accept data input. R assumes that you'll be dumping data directly in from some sort of input file (or pipe, or whatever). As a result, its manual interface for entering data is ABSOLUTELY HORRID, and this is what usually trips new users up. The "tutorials" that come with R spend a lot of time talking about some pretty abstract aspects of its data model, and when they finally get around to showing you how to  type your data in, it looks way more complex and tedious than it would be in practice. 2x2 tables, however, are one of the few cases where the usually annoying manual input process is &lt;em&gt;exactly&lt;/em&gt; what is needed. All of R's proportion-comparison functions want their input in the form of two vectors: one for the "successes", and one for the total "tries" (recall that the statistical basis for proportion comparison is usually derived from the binomial distribution). This means that, if you &lt;em&gt;already&lt;/em&gt; have that data, you can just type the darn numbers more or less straight into R, and it will politely give you your results.&lt;br /&gt;&lt;br /&gt;SPSS, on the other hand, assumes that the user will be manually entering their data in an unaggregated way. It basically pretends to be a giant spreadsheet, and does all of the data aggregation and calculation needed for proportion comparisons "behind the scenes". Unfortunately, when your data is &lt;em&gt;already&lt;/em&gt; aggregated, there's really no immediately obvious way to get it to do anything useful. The solution actually makes a little bit of sense, but is pretty non-obvious. For the interested reader, here's how to do it:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Open a new data editor.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Make three numeric integer variables. The first one will be a dummy variable for your risk factor, the second will be a dummy variable for your disease, and the third will be a count.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;For each square in your 2x2 table, enter a new case. For the square containing the count of subjects with the risk factor &lt;em&gt;and&lt;/em&gt; the disease, enter "1" for the risk factor dummy variable, "1" for the disease variable, and the value of that square in your table. For the square containing the count of subjects with the risk factor and &lt;em&gt;without&lt;/em&gt; the disease, enter "1","2", and the contents of the square. Basically, the first dummy variable is for the row number, and the second is for the column number. Do this for each cell in your 2x2 table.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Once you've entered your data, go to the "Data" menu and select "Weight Cases". Tell it to weight cases by your "count" variable.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Now, you can go to the "Analyze-&amp;gt;Descriptive-&amp;gt;Crosstabs" and proceed as you would if your data were entered normally.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;This method should work for arbitrarily sized tables, but I know that many of the analyses that SPSS performs will only really work with a 2x2 table.&lt;br /&gt;&lt;br /&gt;You can clearly see that, in this particular case, R was totally the easier way to go. I don't want to go spreading false R-hope around, though&amp;mdash; for most people, most of the time, if you've got access to SPSS or SAS and know how to use them, R is probably not a good first choice for your statistical computing. If, however, you find yourself needing something a bit burlier than Excel, and don't have anything else lying around, it's definitely worth a shot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114479603930063529?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114479603930063529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114479603930063529' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114479603930063529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114479603930063529'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/04/for-record.html' title='For the record...'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114169333817315870</id><published>2006-03-06T16:43:00.000-08:00</published><updated>2006-03-06T17:02:18.196-08:00</updated><title type='text'>Odd Find of the Day</title><content type='html'>While taking a quick break from "Ye Olde Moutaine of Home-worke", I followed a relatively convoluted clicking path to a &lt;a href="http://www.royal-arsenal.com/"&gt;site&lt;/a&gt; chronicling British maritime history. I was poking around, and found &lt;a href="http://www.royal-arsenal.com/infernal.html"&gt;this gem&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The first ship to be sunk by a torpedo was the &lt;em&gt;Blanco Encalada&lt;/em&gt; in 1891 during the Chilean revolutionary war. Hit by a single torpedo, she sank immediately. The captain, Don Luis Goni, was ejected up a ventilation shaft and into the sea by the explosion, and was last seen swimming ashore with his arm around the ship's mascot, a Llama. The creature was taken onboard HMS Warspite as a mascot, until, having eaten the epaulettes off an Admiral's dress uniform, it was banished to London Zoo in disgrace.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now, I know that, in reality, this probably wasn't actually that funny at the time. &lt;em&gt;However&lt;/em&gt;, at this point in history, I think we can safely find this abso-frickin'-lutely hilarious. Let's break this down, shall we?&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;A Chilean ship had a llama as its mascot. This, in and of itself, is pretty damn funny. With all respect to llamas, they're not really an animal that I typically associate with ships&amp;mdash; a llama therefore strikes me as a comically odd choice of mascot.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Said llama was actually on board the ship, as opposed to simply being represented as a carved figurehead or a painting or something. Imagine the logistics to having a large, stubborn, and opinionated quadruped on board a sailing ship. Brings a smile to the face, doesn't it?&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;During a torpedo attack (the first one in recorded maritime history, apparently), the captain was "ejected up a ventilation shaft and into the sea". Wile E. Coyote, anybody?&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Rather than simply swimming for shore, the captain of the sinking ship tried to make it ashore with the aforementioned llama. It's unclear from this description which of the pair was doing more of the swimming, or if the good captain was simply using the llama as some sort of four-legged floatation device.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;When captured, the llama was adopted by the British ship as... a mascot. Tragedy struck, however, when the critter &lt;em&gt;ate part of an admiral's uniform&lt;/em&gt;! Just picture it! The mental image is priceless!&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;After the unfortunate epaulet incident, rather than simply putting the llama ashore, eating it, selling it, etc., the master of the HMS Warspite transported the poor animal all the way back to London to put in the London Zoo ("in disgrace", no less).&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Really, the entire incident is pure comedic gold. My day has officially Been Made. Now, back to the homework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114169333817315870?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114169333817315870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114169333817315870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114169333817315870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114169333817315870'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/03/odd-find-of-day.html' title='Odd Find of the Day'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114116295189462747</id><published>2006-02-28T13:19:00.000-08:00</published><updated>2006-02-28T13:42:31.953-08:00</updated><title type='text'>Throwing Down the Gauntlet</title><content type='html'>Right, I know, two posts in two days... kind of different that the usual MO around here. But I felt the need to declare before the world that I have officially HAD IT with Tomcat. I have just spent the last two hours of my life&amp;mdash; hours that should have been spent doing something, ANYTHING, other than dealing with Tomcat&amp;mdash; screwing around with JNDI contexts, obscure classpaths, xml configuration files, and so on, trying to figure out why an application that had worked perfectly well on one laptop wouldn't work on another. The answer is annoyingly nitpickingly technical, so go ahead and ignore the next paragraph if you want. &lt;br /&gt;&lt;br /&gt;It had to do with the fact that the application had been written a laptop which, for all sorts of stupid reasons, still has Tomcat 5.0 on it. My newer laptop is much more up to date, and has a relatively current version of Tomcat 5.5 on it. Even though these are only a few minor versions off, they have wildly different configuration file formats, and this is what finally bit me in the ass. See, in pre-5.5-Tomcat, a JNDI resource declaration consisted of a Resource tag and then a ResourceParam tag containing the configuration parameters for your resource. 5.5 does away with this, and now parameters are declared as attributes for the top-level Resource. This change is definitely for the better, and I can see why they made it&amp;mdash; it simplifies a confusing and overly complex configuration process. &lt;br /&gt;&lt;br /&gt;The problem is that if you try and use the old behavior, it fails silently, and then causes your code to break in odd ways. Rather than give an error message, or support the old behavior with a deprecation warning, Tomcat just forges boldly on ahead. Anything that was trying to use those parameters now gets null, which causes all sorts of interesting runtime errors. Would it have killed them to put ten lines of code in to check to see if you were still trying to use ResourceParam tags, and then spit out a warning to stderr? Why do they hate their users so much? Why? &lt;br /&gt;&lt;br /&gt;This change in configuration file format is, in fact, documented... but it's pretty well hidden, as is so much of what one usually looks for in Tomcat's documentation. Gah.&lt;br /&gt;&lt;br /&gt;At any rate, I have now officially Had Enough With Tomcat. No more screwing around with massive XML configuration files&amp;mdash; it's over. Oh wow, that felt good to say. Not sure what I'll be using now... I've really been digging Ruby on Rails, and the 1.1 release will finally add polymorphic relationships and easy support for aggregate functions (count(), sum(), etc.) and group-by statements to ActiveRecord. This news makes me happy... perhaps it's time to see if they've made any progress with easing the pain of hosting a RoR app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114116295189462747?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114116295189462747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114116295189462747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114116295189462747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114116295189462747'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/02/throwing-down-gauntlet.html' title='Throwing Down the Gauntlet'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-114110459757464643</id><published>2006-02-27T21:04:00.000-08:00</published><updated>2006-02-27T21:29:57.666-08:00</updated><title type='text'>Hmmm...</title><content type='html'>Wow, so, long time no post. This quarter's keeping me too busy- this is *so* the last time I take a 16-credit course load. I've basically been eating &amp; breathing linear regression, which is turning out to be fascinating (in spite of the frightening textbook). I've also been getting far more familiar with linkage analysis than I'd ever really wanted to be. I'm working on some software to take in genotype data from a repository of microsatellite data and output some interesting visualizations based on linkage, and the biggest problem is not turning out to be the algorithms. The problem is being that I (foolishly, I see now) decided to use PML (the Polymorphism Markup Language) as the input file format. "It'll be great! Any other app that outputs PML will be able to use my program! Standards are good! Why roll my own representation of pedigree and genotype and haplotype information when there's already a perfectly good standard out there?" Of course, PML turns out to be enormously complex, and really not all that well documented. The documentation consists of a long OMG specification, some sample files, and a giant XSD file. The XSD file is pretty well-documented, and the OMG document goes into quite a lot of detail... but there's no real high-level look at how to represent various types of data using PML. I've been figuring it out as I go along, but it's being more work than I'd hoped. A lot more work. Grrr. Hence my current procrastinating.&lt;br /&gt;&lt;br /&gt;One recent event of note was that I got to play around with a &lt;a href="http://www.intuitivesurgical.com/products/davinci_surgicalsystem/index.aspx"&gt;da Vinci Surgical System&lt;/a&gt;. This is an incredibly fancy computer-assisted surgical unit. Picture the loaders from Aliens, only instead of magnifying human movement, it reduces it. A lot. A whole lot. The device consists of a control console and a bedside unit. The bedside unit is a large and intimidating cabinet that has up to four manipulator arms coming out of it. One of those is for the stereoscopic camera, the other three are for tools. You stick as many of the arms as you want into your patient, and then fire the thing up. &lt;br /&gt;&lt;br /&gt;The surgeon sits at the console a few feet away, sticks his or her head into it, and is immediately presented with a three-dimensional view of whatever the camera is pointing it. From the natural sitting position at the console, the surgeon's hands are perfectly placed to use the manipulator control units. Unlike traditional laparoscopic controls, these are not scissor-grip handles. Rather, they are oddly-shaped and difficult to describe gadgets that your hand fits around &lt;i&gt;perfectly&lt;/i&gt;. The thumb and forefinger grasp a small lever, and then you just move your hands as you would if you had them stuck in the patient yourself. Any motion of your hands or fingers is immediately carried out by the tools being wielded by the bedside unit, only with all of your natural hand tremor removed, and with the motion scaled down by a good bit. That is, a one-inch movement by your hand translates to approximately a third of an inch of movement by the tool.&lt;br /&gt;&lt;br /&gt;The really amazing thing is that the tools have pretty much the same range of motion as your hands do, so anything that you could do with your hands, you can do with the tools. Other laparoscopic systems I've used require significant mental effort to translate what you want to have happen into what the tools are capable of doing in terms of movement and positioning. Operating this thing was completely natural&amp;mdash; it was very easy to forget that I was controlling a machine!&lt;br /&gt;&lt;br /&gt;The display adds to the effect. The laparoscopic systems that I've used had no depth of field, making an already demanding eye-hand coordination task all the more difficult. Because of the stereoscopic camera and immersive display, the da Vinci system had superb depth of field, which made everything &lt;i&gt;far&lt;/i&gt; easier. I was actually able to tie sutures, something that I've never been able to accomplish with traditional laparoscopic tools. Of course, I'm not a surgeon&amp;mdash; so the fact that I was able to sit down at this thing and immediately sew and tie a pretty good (or, at least, not awful) suture is saying something. :-)&lt;br /&gt;&lt;br /&gt;The price tag for these babies starts at around 1.5 million dollars, so it's not for the faint of heart. The possibilities, however, are endless&amp;mdash; both medically, and from an engineering perspective. These things are true works of scientific art&amp;mdash; a beautiful melding of precision hardware engineering with top-notch software engineering. Anybody out there who works at or near a medical facility should try and arrange a demo&amp;mdash; it's hours of fun for the whole family... er, hospital.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-114110459757464643?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/114110459757464643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=114110459757464643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114110459757464643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/114110459757464643'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/02/hmmm.html' title='Hmmm...'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-113659707402654363</id><published>2006-01-06T17:12:00.000-08:00</published><updated>2006-01-06T17:24:34.050-08:00</updated><title type='text'>Ack! Madness!</title><content type='html'>Well, vacation's almost over, and, surprise surprise surprise, I didn't get half of what I wanted to get done done. I spent most of my time up at school working on grants and projects, which is good&amp;mdash; but it means that my photo album is still out of date, my books at home are still completely unorganized, my various half-written accounts of funny things that happened in India and then a few months later in Washington D.C. are still half-written and sitting on my hard drive, etc. etc. etc. I'm all registered for my classes, which are starting next week. The good news is that my stats class now starts at 1:00 pm rather than 7:30 am. The bad news is that my stats class is using a different textbook this quarter than last quarter. &lt;br /&gt;&lt;br /&gt;Last quarter, we had a book called "Princicples of Biostatistics", which was small, cute, and had a nice purple cover with a cool antique chart showing "The Conquest of Pestilence in New York City" drawn sometime in the early 20th century. It cost maybe $65, and weighed in at well under 600 pages. This quarter, our book is a monstrosity named "Applied Linear Systems Models". 1400 pages, definitely lacks a cute purple cover, and ran $185. The fact that I only vaguely understand the freaking *title* of my textbook makes me somewhat concerned. &lt;br /&gt;&lt;br /&gt;My other textbooks seem pretty reasonable. The one on organizational behavior seems nice and fluffy, and my database systems book seems to contain a lot of the mathematical theory that I was hoping for. All told, my textbook bill for the quarter came to somewhere around $450. Luckily, my fellowship covers books&amp;mdash; your tax dollars at work, ladies and gentlemen! Last quarter, I could fit all of my books in my bag if I took everything else out and didn't mind hurting my back a little bit. The only way I'll be able to carry all of my books back and forth this quarter is if I get my big camping backpack out, and even then it might be a stretch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-113659707402654363?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/113659707402654363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=113659707402654363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113659707402654363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113659707402654363'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2006/01/ack-madness.html' title='Ack! Madness!'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-113592007675135370</id><published>2005-12-29T21:15:00.000-08:00</published><updated>2005-12-29T21:22:13.583-08:00</updated><title type='text'>XPath Insanity</title><content type='html'>Yet another entry under the heading of "stupid stuff I figured out so that you don't have to". The other day, a fellow student in my program came to me with what seemed to be a very simple XPath problem&amp;mdash; accessing a namespaced node. I explained to him that dealing with namespaces in XPath is pretty straightforward&amp;mdash; you just prefix the node name or attribute name you're after with whatever prefix you assigned the namespace. E.g., if the node is described in your document as &lt;code&gt;foo:someNode&lt;/code&gt;, you would simply use that in your XPath. He replied that he tried that, and that it wasn't working. We got the sample file loaded onto my computer, and a couple of minutes with Ruby and REXML determined that, in fact, that XPath &lt;em&gt;was&lt;/em&gt; working. He said something to the effect of: "I'm using Java, should that matter?" I replied "Nah, XPath is XPath." Ha. Ha. Ha. He figured that he must've typed something wrong, and that he'd go back and give it another try. A little while later, he came back saying that he'd triple-checked it, and that it still wasn't working. I went down to his computer, and after several hours of cursing and re-compiling, we finally figured it out.&lt;br /&gt;&lt;br /&gt;Without going into the gory details of a very long and heroic debugging story, I'll sum it up by saying this: XPath goes all wonky when your document has both a default namespace as well as other prefixed namespaces. The reasons are fantastically obscure, are rooted in the depths of a W3C spefication document, and don't seem to apply if you're using REXML and Ruby but most definitely do if you're using any Java library based on Jaxen (e.g., Dom4J or DOX). but have a sort of twisted logic to them. For a detailed description, see &lt;a href="http://www.xml.com/lpt/a/2004/02/25/qanda.html"&gt;This article over at XML.com&lt;/a&gt;. I'll also walk through the gist of it below.&lt;br /&gt;&lt;br /&gt;Consider the following XML document describing our generic friend, Joe Smith:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;person&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;&lt;br /&gt;    &amp;lt;given&amp;gt;Joe&amp;lt;/given&amp;gt;&lt;br /&gt;    &amp;lt;family&amp;gt;Smith&amp;lt;/familiy&amp;gt;&lt;br /&gt;  &amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;contactInfo&amp;gt;&lt;br /&gt;    &amp;lt;phone&amp;gt;503-555-1234&amp;lt;/phone&amp;gt;&lt;br /&gt;  &amp;lt;/contactInfo&amp;gt;&lt;br /&gt;&amp;lt;/person&amp;gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;An appropriate XPath expression to get the DOM node containing Joe's surname would be: &lt;code&gt;/person/name/family&lt;/code&gt;. Simple, nice, and easy. Let's up the ante a little bit. Let's say that you're a vampire, and this snippet of XML represents an entry in your "donor list". As a discerning gourmet, you want to encode Joe's blood type (hey, some days are AB+ kind of days, some are  more O-). Not only are you a discerning vampire, you're a properly-trained  programmer (or lazy, take your pick) as well. Luckily for you, the International Brotherhood of Vampires has a published schema for describing blood types:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;bloodType&amp;gt;&lt;br /&gt;  &amp;lt;type&amp;gt;O&amp;lt;/type&amp;gt;&lt;br /&gt;  &amp;lt;rhFactor&amp;gt;-&amp;lt;/rhFactor&amp;gt;&lt;br /&gt;&amp;lt;/bloodType&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Integrating this into your schema is fairly straightforward: add &lt;code&gt;xmlns:vamp="http://www.ibvamps.org/Schema/blood"&lt;/code&gt; to your &lt;code&gt;&amp;lt;person&amp;gt;&lt;/code&gt; tag. Of course, if you add in a second namespace, you typically want to specify a default namespace to refer to your own part of the document. This is accomplished by adding &lt;code&gt;xmlns="http://www.mydomain.com/Schema/donorEntry&lt;/code&gt; right before our &lt;code&gt;xmlns:vamp&lt;/code&gt; declaration. Now, our entry looks like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;person xmlns="http://www.mydomain.com/Schema/donorEntry" &lt;br /&gt;  xmlns:vamp="http://www.ibvamps.org/Schema/blood"&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;&lt;br /&gt;    &amp;lt;given&amp;gt;Joe&amp;lt;/given&amp;gt;&lt;br /&gt;    &amp;lt;family&amp;gt;Smith&amp;lt;/familiy&amp;gt;&lt;br /&gt;  &amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;contactInfo&amp;gt;&lt;br /&gt;    &amp;lt;phone&amp;gt;503-555-1234&amp;lt;/phone&amp;gt;&lt;br /&gt;  &amp;lt;/contactInfo&amp;gt;&lt;br /&gt;  &amp;lt;vamp:bloodType&amp;gt;&lt;br /&gt;    &amp;lt;vamp:type&amp;gt;O&amp;lt;/vamp:type&amp;gt;&lt;br /&gt;    &amp;lt;vamp:rhFactor&amp;gt;-&amp;lt;/vamp:rhFactor&amp;gt;&lt;br /&gt;  &amp;lt;/vamp:bloodType&amp;gt;&lt;br /&gt;&amp;lt;/person&amp;gt;  &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After doing this, try running the XPath expression we laid out earlier to try and get Joe's surname (&lt;code&gt;/person/name/family&lt;/code&gt;). If you're using Dom4J, you'll find that it no longer returns any nodes. You'll be able to access our namespaced nodes if you use an expression like &lt;code&gt;/*/vamp:bloodType/vamp:type&lt;/code&gt;, but not if you use &lt;code&gt;/person/vamp:bloodType/vamp:type&lt;/code&gt;. If you ask your parser to return the document's root node, you'll get a node named &lt;code&gt;person&lt;/code&gt;, which appears correct... but if you run &lt;code&gt;/person&lt;/code&gt; against your document, you won't get any results. So, what gives?&lt;br /&gt;&lt;br /&gt;Without going into more detail than anybody who doesn't work for the W3C cares about, node name matching is done using fully qualified node names (at least, according to the XPath spec). This means that the parser internally translates &lt;code&gt;vamp:type&lt;/code&gt; to something along the lines of  &lt;code&gt;{http://www.ibvamps.org/Schema/blood}type&lt;/code&gt;. This is all well and good for nodes that have a namespace prefix, but what about the nodes that fall under our default namespace? They have no &lt;em&gt;explicit&lt;/em&gt; prefix, but a default namespace &lt;em&gt;has&lt;/em&gt; been specified, so the parser translates to &lt;code&gt;{}person&lt;/code&gt;. Therefore, if we just pass in &lt;code&gt;person&lt;/code&gt;, the parser doesn't see a match. &lt;br /&gt;&lt;br /&gt;The solution is either to not use a default namespace, or to use a way-to-complicated voodoo workaround involving the XPath &lt;code&gt;local-name()&lt;/code&gt; function. It turns out that &lt;code&gt;[local-name()="Person"]&lt;/code&gt; gets around this difficult-to-figure-out behavior, so our final XPath for determining Joe's surname becomes: &lt;code&gt;/*[local-name()="Person"]/*[local-name()="name"]/*[local-name()="family"]&lt;/code&gt;, or simply &lt;code&gt;//*[local-name()="family"]&lt;/code&gt;, depending on how the document is set up. I have no idea what the performance implicactions of this approach are, but, then again, I have no idea how most XPath engines perform ordinarily. Presumably, this doesn't do anything &lt;em&gt;too&lt;/em&gt; awful, expecially for smaller documents. Let's just say that I wouldn't suggest trying this with your 400,000-node XML representation of SNOMED.&lt;br /&gt;&lt;br /&gt;So, there you have it: the end-product of several hours of hair-pulling, reduced to a couple of paragraphs. Go forth, Google, and index this page, so that others will be spared the hours of torment that we suffered.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-113592007675135370?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/113592007675135370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=113592007675135370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113592007675135370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113592007675135370'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/12/xpath-insanity.html' title='XPath Insanity'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-113407937204909960</id><published>2005-12-08T13:53:00.000-08:00</published><updated>2005-12-08T14:43:21.950-08:00</updated><title type='text'>Vacation! (Almost)</title><content type='html'>I'm almost free— I took my last in-class final this morning, and am now working on finishing up my last take-home final. After I'm done with that, the quarter is officially over and I'm on vacation. I plan on finishing up a few half-written writing projects and posting them over the course of Winter Break, but until that happens, here's something that was just too funny to pass up. Check out last week's &lt;span style="font-style: italic;"&gt;Science&lt;/span&gt;, page 1261 (or simply go &lt;a href="http://www.sciencemag.org/cgi/content/full/310/5752/1260a"&gt;here&lt;/a&gt;, not sure if it's open access or not). The article is about interesting observations regarding touch sensors on bat wings, and describes the research of one John Zook at Ohio University.&lt;br /&gt;&lt;br /&gt;Zook has found what appear to be Merkel-like receptor cells which seem to be highly sensitive air turbulence sensors. He found that when he used— wait for it— Nair on bats' wings, they were unable to accurately turn in midair. They could fly in a straight line without incident, but as soon as they had to negotiate a 90-degree turn, their elevation control went haywire. As soon as their hair grew back, their flight patterns returned to normal.&lt;br /&gt;&lt;br /&gt;While this is pretty dang cool, it's not where The Funny comes in. Consider the following quote:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Zook also described another type of receptor in the membranous part of bat's wings. Nerve recordings revealed that these receptors respond when the membrane stretches, even slightly. The most sensitive parts of the wing turned out to overlap with the "sweet spots" where the bats prefer to hit the insects they scoop up in midflight. (Zook mapped the sweet spots by videotaping the bats &lt;span style="font-weight: bold;"&gt;as they gathered mealworms shot out of an air cannon&lt;/span&gt;).&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(From Science 310:1260-1261, doi: 10.1126/science.310.5752.1260a, &lt;br/&gt; emphasis in quote is my own).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An air cannon. That shoots mealworms. For bats to catch in midair. &lt;span style="font-style: italic;"&gt;This&lt;/span&gt;, ladies and gentlemen, is why I love science. What other profession would consider this to be anything other than a slightly odd pastime?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-113407937204909960?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/113407937204909960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=113407937204909960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113407937204909960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113407937204909960'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/12/vacation-almost.html' title='Vacation! (Almost)'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-113315673304098352</id><published>2005-11-27T21:37:00.000-08:00</published><updated>2005-11-27T21:45:33.066-08:00</updated><title type='text'>LinkedHashSet</title><content type='html'>Did you know that you can add null to a LinkedHashSet, and have it take up space and appear in an Iterator? Neither did I, until just now.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;00001:       LinkedHashSet lhs = &lt;span style="color: #0000FF"&gt;new&lt;/span&gt; &lt;span style="color: #000000"&gt;LinkedHashSet&lt;/span&gt;();&lt;br /&gt;00002:       &lt;br /&gt;00003:       lhs.&lt;span style="color: #000000"&gt;add&lt;/span&gt;(&lt;span style="color: #0000FF"&gt;null&lt;/span&gt;);&lt;br /&gt;00004:       &lt;br /&gt;00005:       System.out.&lt;span style="color: #000000"&gt;println&lt;/span&gt;(lhs.&lt;span style="color: #000000"&gt;size&lt;/span&gt;()); &lt;span style="color: #9A1900"&gt;// outputs 1&lt;/tt&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Something about this doesn't seem quite right to me, but I'm not sure what. I guess I'm used to null sort of being, well, null. &lt;br /&gt;&lt;br /&gt;Also, Ruby's officially spoiled me. I've grown horribly used to its excellent "unless" syntax. For instance, to only add something to a collection if it's not null is one line in Ruby:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;00001: someCollection.&lt;span style="color: #000000"&gt;add&lt;/span&gt;(foo) &lt;span style="color: #0000FF"&gt;unless&lt;/span&gt; foo.&lt;span style="color: #0000FF"&gt;nil&lt;/span&gt;?&lt;/tt&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In Java, however, it's quite a process:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;00001:       &lt;span style="color: #0000FF"&gt;if&lt;/span&gt; (foo != &lt;span style="color: #0000FF"&gt;null&lt;/span&gt;) &lt;span style="color: #000000"&gt;{&lt;/span&gt;&lt;br /&gt;00002:          someCollection.&lt;span style="color: #000000"&gt;add&lt;/span&gt;(foo);&lt;br /&gt;00003:       &lt;span style="color: #000000"&gt;}&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It's only a few more lines, but it really messes with the flow of typing somehow. Maybe I'll hack together a quick IntelliJ macro or something...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-113315673304098352?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/113315673304098352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=113315673304098352' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113315673304098352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113315673304098352'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/11/linkedhashset.html' title='LinkedHashSet'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-113210121397481462</id><published>2005-11-15T16:05:00.000-08:00</published><updated>2005-11-15T16:33:34.046-08:00</updated><title type='text'>Gah</title><content type='html'>OK, I really didn't want this blog to be one of those whiney political soapbox blogs. Any thoughts or opinions that I could lay down are already out there on the 'net already, written by others far more eloquent than I. But just this once, I'm feeling the need to vent.&lt;br /&gt;&lt;br /&gt;I've got a real quick message for our government. Quick, quick, quick, and hopefully not too preachy. Here goes:&lt;br /&gt;&lt;br /&gt;Hey, guys? Could we &lt;em&gt;please&lt;/em&gt; stop torturing people now? Please? Oh, and also: please, please stop lying about the torture. Listening to our government try and mince words to justify torturing prisoners is &lt;em&gt;ten thousand times&lt;/em&gt; more excruciating than it was to listen to Bill Clinton try and mince words to get out of having to admit to some extra-curricular nookie. I don't care what you call it- we are, indeed, torturing people. We know it. Other countries know it. The Iraqis sure as hell know it, and so does the rest of the Muslim world. All sorts of people know it, and the further we go down this path of pretend-self-righteousness, the harder it will be to undo the damage we've already done.&lt;br /&gt;&lt;br /&gt;OK, got that off my chest. I could go on and on, but that's not really what my blog's for, and, like I said, others have that base covered far better than I ever could. Back to your regularly-scheduled programming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-113210121397481462?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/113210121397481462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=113210121397481462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113210121397481462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/113210121397481462'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/11/gah.html' title='Gah'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112950730438923473</id><published>2005-10-16T16:39:00.000-07:00</published><updated>2005-10-16T17:03:43.360-07:00</updated><title type='text'>Consulting Hilarity</title><content type='html'>Due to a communications SNAFU, a client I'd been doing some consulting for didn't "get the memo" that my availability would change as soon as school started. Due to the snafu, he approved a quite a few hours of "familiarization"-type work that he (presumably) wouldn't have approved had he known that I would no longer be available. At the time, I was under the distinct impression that he'd been informed about my new schedule... whereas he thought that I'd be around for a lot longer. It's really my fault- I assumed that our go-between (who handles all of the business stuff, and set the whole thing up, etc.) would have made the whole situation perfectly clear to the client. Now, of course, I see that I should have taken it on myself to make sure that we were all on the same page instead of leaving that to somebody else.&lt;br /&gt;&lt;br /&gt;At any rate, because of all of this, I now feel like I owe the client somehow, and don't really feel like I can turn him away when he has work that needs doing. I figure after a month or two, I will have done enough work on his site that his initial investment in letting me familiarize myself with his site will have paid for itself (or at least been worth it to him). Until then, though, I'm stuck dealing with problems that should be trivial to solve but aren't due to the previous guy's craptacular design. &lt;br /&gt;&lt;br /&gt;I've decided that VBScript is the consultant's dream language- it's designed in such a way as to make even the most trivial tasks take &lt;em&gt;far&lt;/em&gt; longer than they would in just about any other language, and it also makes it very, very difficult to have a clean and efficient design. Its lack of useful error handling virtually guarantees spaghetti code all over the place. Its function invocation syntax is different for functions that return an object or user-defined class (not the same thing!) different from the syntax to call a function that returns a primitive. Also, most (&lt;em&gt;certainly&lt;/em&gt; not all, but most) people who decide to build websites with it don't really know what they're doing (sad but true, from what I've seen) and end up leaving disastrous messes that somebody else gets to clean up later on down the line. And, of course, that "somebody else" almost certainly charges by the hour. All of this adds up to one very simple equation: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;(use of vbscript for your website) == (tons of billable hours for some consultant somewhere)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So, annoying as this guy's previous programmer's site's design is, I just breath deeply and tell myself that his lack of modular design, heavy use of code copying and pasting, and overly-complex file layout just means more billable hours for myself. Every hour I spend tracing spaghetti puts me just a little bit closer to getting a new clutch for my car. And, really, the client himself is actually a nice guy, it's just the previous programmer who's the problem here. When I look at things in the combined light of these things, everything's much better. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112950730438923473?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112950730438923473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112950730438923473' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112950730438923473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112950730438923473'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/10/consulting-hilarity.html' title='Consulting Hilarity'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112933061730408985</id><published>2005-10-14T15:44:00.000-07:00</published><updated>2005-10-14T15:56:57.310-07:00</updated><title type='text'>Holy Cow</title><content type='html'>OK, so, clearly, my plan of finishing up my India write-up within a few days of my last post was somewhat off the mark. I've got several half-written fragments of a write-up, but no clear timetable on finishing them. Grad school has completely borked my spare time, and as such almost everything's been put on hold. If worst comes to worst, I might be able to get them together over &lt;span style="font-style: italic;"&gt;winter break&lt;/span&gt;. Yes, that's right— I'm back in the oh-so-sweet embrace of academia now, and that means winter vacation is back, baby. Along with it comes student discounts on software (can you say $99 for IntelliJ? I knew you could...), Apple hardware, movies, transportation, car insurance, etc. etc. etc. All those great student perks that I thought were gone forever... are back. Score: Steven 1, Universe 0.&lt;br /&gt;&lt;br /&gt;School itself is being quite nice, if horribly busy. Having homework again has taken a little bit of getting used to, but it's actually being quite enjoyable. Topics for future posts abound, so stay tuned (not that I know of anybody actually reading this, but you never know...).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112933061730408985?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112933061730408985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112933061730408985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112933061730408985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112933061730408985'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/10/holy-cow.html' title='Holy Cow'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112690401851094432</id><published>2005-09-16T13:51:00.000-07:00</published><updated>2005-09-16T13:53:38.520-07:00</updated><title type='text'>Home again, home again... and an amazing customer service story</title><content type='html'>Note: Back in Portland, now, and still way behind on writing up my trip. I'm working on it, and hopefully in the coming days will have more up here. In the meantime, I just got a photo printer, and decided to take a break from writing about India to write about my experience with the new gadget. All sorts of notable and interesting info awaits.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;An excellent customer service story&lt;br /&gt;&lt;br /&gt;I just bought a Canon Pixma iP4200 photo printer, and thus far it is an excellent piece of equipment. I paid around $130 for it, and am getting incredibly good photo prints out of it&amp;mdash; especially when you consider the price. I bought it mainly because I wanted a way to quickly and easily print off 4x6 prints of my pictures. For anything larger, I think I still prefer Costco (optical prints, as opposed to ink-jet; calibration becomes Somebody Else's Problem), but it's nice to be able to get snapshots right at home.&lt;br /&gt; The absolute best part thus far has been the out-of-box experience. This has been the first printer I've dealt with that was absolutely pain-free to get set up. It came with full ink cartridges (not half-empty "trial" ones), five sheets of photo paper, a driver cd, an excellent &lt;em&gt;paper&lt;/em&gt; manual (a rarity in this day and age), and a four-color setup guide. This guide covered installation of the print head and ink cartridges, then split in to the "Windows Driver Installation" and the "Macintosh Driver Installation". Amazing- a consumer product that &lt;em&gt;actually provides good Macintosh documentation&lt;/em&gt;!&lt;br /&gt; The whole process was almost comically easy, and was full of very nice small touches. For example, each of the five ink cartridges has an led light to indicate that the cartridge is installed completely. As you click the cartridge into place, the light illuminates. When a cartridge is low on ink, its light blinks. Now, this sort of feature couldn't have added more than a couple of cents to the unit's manufacturing cost (LEDs are insanely cheap, and all of the circuitry to monitor ink levels was already in place), but it has an enormous impact on how pleasant the device is to set up.&lt;br /&gt; Another small touch- the online documentation for most peripherals ends up sitting in a folder as a collection of HTML documents. It's usually up to the user to find it, and it's easy to forget that they're there. This device's online documentation integrated itself with OSX's "Help Viewer" application, and now there are three more options in the menu alongside "Safari Help" and "iPhoto Help". One for the electronic version of the printer's manual, one for the print driver itself, and one for Canon's "EasyPrint" digital imaging software. It's clear that the Mac version of the software was not simply an afterthought.&lt;br /&gt; Once I got the thing installed and working, I had a question about the ICC color profiles that the driver had installed in my system (in the correct location, I might add). There were eight of them, and while I was 99% sure that they were meant for use with different paper combinations, there was no documentation on which profile was for which paper. After some unsuccessful Googling, I decided to give Canon's tech support phone line a try. Boy, was I pleasantly surprised. &lt;br /&gt; I was initially put off by the overly cheerful tone of the automated menu, but once I got over the voice and started paying attention to the words, I found that whoever did the scripting knew what they were doing. There were never more than three or four options to choose from, the options were completely unambiguous, and each successive menu gave an indication of how many more menus were left (i.e., "Just two more questions for you", and so on). The automated part was all over after about four short menus, and when I finally reached a support person, I found him to be both knowledgeable and friendly. &lt;br /&gt; He actually knew what color profiles were, and, best of all, once he realized that I was using a Mac, he came right out and said that since he wasn't sure if the Mac driver installed the same profiles as the Windows driver, and that he didn't know much about Macs, but that he would transfer me to one of the Mac specialists. The Mac guy was able to answer my question in about ten seconds, and that was that. He was also able to clear up some ColorSync related questions I'd had, which was huge- it meant that Canon's CSR folk are not simply reading off of a script, but &lt;em&gt;actually know something&lt;/em&gt; about digital imaging and printing. Furthermore, they seem to have pretty low turnover- both of the people I talked to were familiar with particulars of printer models from more than a year ago, which implies to me that they were around then. Having worked in a call center environment for a couple of years, I can really appreciate both a) how difficult it is to retain agents for any length of time; and b) how critical that kind of retention is to providing quality customer service. Canon's call center seems to have its act together in a big way, and it shows.&lt;br /&gt; Honestly, this was possibly the most enjoyable customer service experience that I've had in &lt;em&gt;years&lt;/em&gt;. I'd fully expected to be forced to wade through menu after menu of lousy, ambiguous options only to be faced with an unhelpful CSR ("Ummm... color profiles? What're those? Are you sure you've got the USB cable plugged in to the right port? What version of Windows are you running? You're not running Windows? MacOS X? I'm sorry, sir, that's not on my list... are you sure you don't mean XP Pro?"). Instead, I got my question answered and learned a few interesting bits of Canon printer errata that I wouldn't have otherwise learned.&lt;br /&gt; And now, in the spirit of "Stupid things I've figured out so that you don't have to", here's an explanation of which ICC profiles to use for which papers. The names might be specific to the iP4200, but the general naming schema should map to other Canon PIXMA printers. The iP4200 driver initially installs eight profiles:&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;  &lt;li&gt;BJ Color Printer Profile 2000&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Canon iP4200 MP2&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Canon iP4200 PR1&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Canon iP4200 PR2&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Canon iP4200 PR3&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Canon iP4200 SP2&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Canon iP4200 SP4&lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt; &lt;br /&gt; The first one, the "BJ Coolor Printer Profile 2000" is essentially a calibrated sRGB. For the others, the numerical suffix relates to the print quality desired. Lower numbers are higher quality. The two-letter code relates to the kind of paper. MP is for the "Matte Photo" papers, PR is for the "Photo Paper Pro" line, and SP is for the "Photo Paper Plus" line of papers. &lt;br /&gt; One thing to note: apparently, the printer driver is responsible for doing the color profile conversion. So, if your photo is in the AdobeRGB color space, you don't need to manually convert it to one of these profiles in Photoshop. The printer driver should do it automatically depending on the kind of paper and quality level you select in the "Print" dialog box. If for any reason you want to do it manually, the way to do this is to set "Color Correction" from "BJ Standard" to "ColorSync" in the "Color Options" screen of the "Print" dialog box. This will cause the driver to not apply any color correction, and just take what it's given.&lt;br /&gt; From what my initial test prints show, the driver seems to do a pretty decent job of profile conversion. The pictures that come out of the printer are pretty close to what was on the screen- certainly well past the "good enough" point, and probably on towards "damn good". That said, I've only done 4x6 pictures thus far, and none of the pictures have been terribly challenging from a color standpoint. I'm sure if I was printing out a larger or more important photo, I'd be spending more time obsessing over the color output. As it is, I'm quite happy with the output I'm getting from this device.&lt;br /&gt; Kudos to Canon for an excellent and affordable product, for not skimping on the Mac support, and for providing superb customer service. I still prefer Nikon's cameras, but your printer has won itself a nice cozy place on my desk. Keep it up!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112690401851094432?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112690401851094432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112690401851094432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112690401851094432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112690401851094432'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/09/home-again-home-again-and-amazing.html' title='Home again, home again... and an amazing customer service story'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112630985004809687</id><published>2005-09-09T16:50:00.000-07:00</published><updated>2005-09-09T16:50:50.056-07:00</updated><title type='text'>Corrections and notes on departure</title><content type='html'>9/10/2005, 2:23 am Kolkata time&lt;br /&gt;&lt;br /&gt;Note: if this post comes off sounding a bit disjointed, it's because I'm rather tired. I'm trying to stay awake as long as I can as an experiment in jet-lag avoidance. I figure if I can stay awake until my plane takes off from Singapore, that'll be around early evening Portland time, and my day/night schedule should start to pop back into place. I'm not sure if this strategy will work or not, but I figure it's worth a try.&lt;br /&gt;&lt;br /&gt;The seat-back display says that we just passed over the Andaman Sea, and are about a thousand kilometers away from Singapore. Holy cow, -54 degrees celsius outside. That's quite cold. My return flight takes me from Kolkata to Singapore, then to Tokyo, then to Los Angeles, then to Portland. I'm just over 26 hours away from being back in Portland. On the one hand, it's amazing to me that it's possible today to travel from India to Portland in such a short period of time; after all, it wasn't that many years ago that I would have had to spend several weeks at sea to traverse that distance. On the other hand, it astounds me that it is possible to spend that long traveling. Our planet is absolutely enormous.&lt;br /&gt; Leaving Kolkata was surprisingly uneventful. Going through the airport, I was pleasantly surprised at how efficient and friendly the customs and security personnel were. They searched one of my carry-on bags, but were incredibly nice about it. Changing the majority of my rupees back into dollars was an adventure&amp;mdash; I had no idea that you had to fill out that much paperwork. The guy behind the counter spent a good ten minutes keying things into various data-entry screens on his computer, and I filled out two different forms and had to present my boarding pass and passport. I'm not sure if this was something specific to India, or whether it's just how currency conversion usually works.&lt;br /&gt; While waiting in line to change currency, and then again in the departure lounge, I noticed several different cats. Yes, cats, apparently strays. Running around the airport. Of course, none of the airport staff seemed to notice them. Contrast this to the US&amp;mdash; if a stray cat wandered past security in PDX, they'd probably have to shut the whole airport down, compensate hundreds of people for lost time and missed flights, hire grief counselors to deal with the traumatized persons, and face lawsuits from PETA and the ACLU.&lt;br /&gt; Getting on the plane itself was interesting, as well. There was no jetway, so we all got to walk right out on the tarmac and climb a somewhat treacherous staircase to board the plane. I haven't gotten to do this since I was in Israel, and I'd forgotten just how freaking huge a commercial airliner is. This particular one is a 777-200, and it's absolutely enormous. The engines alone are bigger than many houses that I've seen.&lt;br /&gt; I have extremely mixed feelings about leaving Kolkata. On the one hand, I'm looking forward to going home as it's been a few months since I spent more than four or five days in my house and with my friends. On the other hand, I've really grown to love Kolkata and the people who live here. I've made a lot of good friends, and have gotten a slight taste of the vast cultural buffet that is India&amp;mdash; just enough to know what I'm missing by only having seen one city. &lt;br /&gt; I have to say, the people I've met in West Bengal have taught me more about hospitality than I knew there was to learn. We Americans know &lt;em&gt;nothing&lt;/em&gt; about hospitality when compared with Bengalis. That's not to say that Americans are bad hosts, but rather that Bengalis are so incredibly hospitable that it puts us to shame. Everybody at Tathya&amp;mdash; really, everybody we met, anywhere&amp;mdash; went out of their way to make sure we felt welcome and at home, and as a result the only times I really felt out of place or homesick were in the hotel.&lt;br /&gt; Ah, right, the title promised corrections. Correction one: most of the television I blogged about a few weeks ago (Kuan Banega 2 Crorepati, the motorscooter ad, etc.) was Hindi, not Bengali. Correction two: Indra is not the owner of Tathya, he is the managing director and one of the principal stockholders. And correction three: contrary to my initial impressions, our driver was actually quite well paid. Apparently, driving is a very lucrative profession here, and one can expect to earn a similar salary to that earned by a mid-level software developer.&lt;br /&gt; Ashis called me on my offer of a bet, and when we looked into the numbers, we found that Clint had been making almost exactly as much as I'd spent on sandwich and a beer. We called it a draw, and I got to keep my battery.&lt;br /&gt; Correction four is not really a correction, but more of an addendum. After reading my post on relative income levels, several people (Ashis, Somnath, Indra, to name a few) made it a point to run some numbers with me about relative costs of living. It turns out that, proportionately, the cost of living is very similar here to Portland. That is to say, Ashis and I spend roughly similar percentages of our monthly incomes on similar things. A certain percentage towards housing, a certain percentage towards food, etc. My transportation costs were much higher than his, since I drive a car and he takes buses and bicycle rickshaws. On the other hand, his food expenses were a bit more than mine, proportionately. All in all, nothing was terribly out of whack.&lt;br /&gt; So, my initial impressions may have been correct if one were to simply compare empirical quantities of money, but were rather off the mark if one corrects for the differential purchasing power.&lt;br /&gt; Well, I think that's about it for this post. I'm still working on writing up everything that happened since being sick- I have an outline taking up a couple of hundred lines in my text editor, and have a nice long flight ahead of me on which to write. I figure I'll post this once I get to Singapore and have internet access, and then will continue writing up everything else.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112630985004809687?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112630985004809687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112630985004809687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112630985004809687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112630985004809687'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/09/corrections-and-notes-on-departure.html' title='Corrections and notes on departure'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112615665653045192</id><published>2005-09-07T22:16:00.000-07:00</published><updated>2005-09-07T22:17:36.540-07:00</updated><title type='text'>Ye Olde Massive Update, part one</title><content type='html'>9:30 Kolkata time, 9/05/2005&lt;br /&gt;&lt;br /&gt;For a variety of reasons, I haven't been able to write out any full updates lately. In my text editor, I have the first line of a post called "Intestine Wars, Episode 5: The Intestines Strike Back" from about ten days ago. I wrote that title during a several-day-long period of being under the influence of all sorts of interesting infections and medications, and the whole time period is kind of hazy. I do remember, however, writing that title during a rare period of lucidity... and then, before I could write any sentences, being interrupted by the immediate and (at that point) all-too-familiar necessity of making a dash for the bathroom. &lt;br /&gt; The ensuing half-hour completely wiped my mind of the focus and ability to do anything more complex than, say, crawling into bed and whimpering. Completing (beginning, actually) my post was as out of the question as walking to Nepal would have been. The week since then has been one of the most action-packed of my entire life, and I simply have not had time to write. I have, however, been maintaining an outline of what we did, and now that my co-workers have gone back to the US, I find myself with gobs of spare time in the evenings. So, now's the time to flesh out my outline and bring everybody up to date.&lt;br /&gt; As I've said, my writing derailed when I got sick, so that's where we'll begin. Just a warning&amp;mdash; I'll try not to get too... er... clinical. The details of being sick in India are often not very pleasant. That being said, there may be some parts of this section of the narrative that you'd probably be better of skipping. Just a heads-up.&lt;br /&gt; So, for the first few days after arriving in India, I felt fine. I ate whatever was put in front of me, and, though I only drank bottled &lt;em&gt;water&lt;/em&gt;, I accepted tea and coffee without reservation. I was trying very hard to be polite and adventurous, and as a result ate any number of interesting dishes. Not surprisingly, after a few days of this I began to notice some stomach troubles. I didn't think anything of it, though&amp;mdash; after all, I'd been eating all sorts of crazy things, and not getting enough sleep besides. Also, Bengali food is &lt;em&gt;incredibly&lt;/em&gt; heavily spiced&lt;a name="massive_orig_1"&gt;&lt;/a&gt;&lt;a href="#massive_foot_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;. It did not surprise me that I was having some digestive troubles. Surely, after a few days, my system would adjust.&lt;br /&gt; After a few days, however, my system had not adjusted. In fact, things in the digestion department were worse than they had been initially. Also, I was beginning to feel rather weak and dizzy much of the time. By a couple of  Thursdays ago (the 25th of August), I was feeling downright lousy. Friday rolled around with a new symptom&amp;mdash; head-rushes. You know how when you stand up too fast, the blood rushes out of your head and you get kind of dizzy for a few seconds? This was happening to me every time I stood up, no matter how slowly. I'd stand up, grab hold of something, wait a second, and then go on my way. Also, my stomach was making sounds like a boiling pot. I didn't know it was possible for one's stomach to make some of the sounds mine was making. It was like some sort of gastro-intestinal symphony, complete with four-part harmony.&lt;br /&gt; After I'd been at work for a few hours, I noticed that lots of people were telling me that I wasn't looking too good. I'd already been suspecting that whatever was going on with me wasn't just indigestion, and after five or six people asked if I needed to see a doctor, I decided that it was probably time to call it a day and go back to the hotel. I went over to find Kevin (my boss) to let him know that I was thinking of heading back to the hotel. He took one look at me, and before I'd even really opened my mouth, he was asking if I needed to go back to the hotel.&lt;br /&gt; They called the car for me, which was good, because my brain was steadily descending into a kind of stupor in which I would have been unable to operate a telephone. Our driver had asked that morning if he could take the afternoon off and come find us in the evening, since India's cricket team was playing Australia's that day. Since we usually don't leave the office until at least eight or nine o'clock, we'd told him to go on ahead and watch the match at home. Since he was out of the picture that afternoon, one of the company's "logistics guys" drove me back. &lt;br /&gt;  These are a couple of guys that the company employs as general-purpose gofers. Need some random thing from a store down the street? Send one of the logistics guys. Is the toilet not working? One of the logistics guys will take care of it. Does the silly foreigner need to be medevaced back to his hotel? These guys will be happy to drive him. They're both very nice guys, and seem to be able to handle just about any random-ass assignment that the company can come up with.&lt;br /&gt;  In this case, we piled (well, the logistics guys  "piled"&amp;mdash; I sort of "stumbled") into one of the company's cars and headed back towards the hotel. Along the way, we stopped by a pharmacy and one of the logistics guys ran in to get me some rehydration powder ("Based on W.H.O. Formula!", boasts the package). This is sort of like Gatorade&amp;mdash; lots of electrolytes&amp;mdash; without the flavor. You mix it in with a liter of water, and it ends up tasting like very foul, slightly salty water. If, however, you have certain types of digestive troubles, dehydration is a major concern.&lt;br /&gt;  Once back at the hotel, I climbed into bed and slept. And slept. And slept. Next thing I knew, it was late in the evening and my co-workers were coming back from the office. When I woke up, I was still feeling lousy, but was somewhat better than I had been. As such, I elected not to see a doctor. It seemed like sleep had helped out a bit, and I felt like I could beat whatever was going on in my stomach all by myself. I didn't feel like eating anything that night, and the thought of food made my stomach do some very unpleasant things. As such, I held off on dinner, and just had part of a granola bar.&lt;br /&gt;  The next day, we were scheduled to do some sight-seeing around Kolkata. I had been looking forward to this all week&amp;mdash; after all, the official primary purpose of my trip was for work... but my real purpose had very little to do with work, and everything to do with seeing interesting things and places. I woke up Saturday morning still feeling lousy, but also a little better than I had been. I took this to be a good sign, and decided that I'd be damned if a little sickness was going to keep me from seeing Kolkata. I resolved to fight through it, and to go out with Dan and Kevin that day.&lt;br /&gt;  This resolve lasted about fifteen minutes. We were maybe a quarter of a mile from the hotel when I had to ask the driver to pull over. I jumped out of the car, staggered around a little bit, crouched over, and started puking my guts out right there on the side of the road. I hadn't eaten much, so there wasn't much to vomit. As a result, all sorts of interestingly-colored (and flavored) digestive fluids came out as a result. Things came out of me that I hadn't even known that I had. That Saturday morning, myself and several thousand of my newest and closest friends got a rather vivid education as to the contents of my digestive tract. Did you know that you've got some crazy neon-green colored stuff somewhere in your abdomen? Neither did I, until the other day.&lt;br /&gt;  Eventually, after about three hundred years, I managed to get things back under control. Actually, that's a bit of an exaggeration. I did, however, manage to go more than about thirty seconds without semi-dry-heaving. We took advantage of this lull and got back to the hotel in record time. While I made my way upstairs to my room, somebody went to the front desk and asked them to send the hotel's doctor. After a few minutes, a very nice motherly doctor appeared. She shooed everybody else out of the room, poked and prodded at me, asked a few questions about my symptoms, and then pronounced that I had some sort of digestive tract infection. "Why", she wanted to know, "had I not come to her earlier?" Good question.&lt;br /&gt;  She prescribed some atomic-strength antibiotics, as well as a few other medications to help calm down my stomach. I was to take one of the Domperidone tablets, wait about a half-hour, and then try and eat some soup or something else very light and neutral. Then, I was to take one of the antibiotics. I should start feeling better, she said, within a few hours.&lt;br /&gt;  Dan and Kevin went off to find a pharmacy to fill the doctor's prescription, and I went back to sleep. They came back twenty minutes later with an interesting discovery: by American standards, drugs are dirt-cheap here. A full course of a Cipro-centric antibiotic cocktail, a set of Domperidone tablets, and a few other miscellaneous drugs ran us about five dollars. Kaiser's co-pay for a minimal emergency dose (four tablets, or two days worth) of Cipro was something like $30, and according to my receipt it would have run me around $75 without my prescription drug benefits. I can think of a few reasons why it might be cheaper here (no pesky FDA, far less liability to cover, etc.) but none of them hold enough water to account for that kindof cost differential. It just seems to me that US drug companies are gouging the living daylights out of us, relative to their Indian counterparts.&lt;br /&gt;  Once I was squared away with the drugs, Dan and Kevin went off to resume our aborted sightseeing trip. I ordered up some vegetable soup, took a Domperidone, and tried to stay awake until the soup showed up. When it arrived, I was only able to eat a little bit of it. I wasn't really hungry, even though I hadn't eaten much in the previous 36 hours, and the sight/smell of food wasn't being very pleasant. I got down as much as I could, took a Cipro, and went to bed.&lt;br /&gt;  I woke up a few hours later, and, amazingly, felt &lt;em&gt;far&lt;/em&gt; better than I had when I had gone to sleep. The Cipro kicked in amazingly quickly. A measure of how much better I was feeling: I was able to read again. Those who know me know that, for me, reading is handled at roughly the same mental level as breathing. I fully expect that, were I to somehow have my head chopped off, my headless body would continue clutching whatever book I'd been reading at the time and occasionally manage to turn a page. So, the fact that I'd been unable to get my mind to focus enough to read even something brain-candyish should indicate just how sick I was. I'll say it again: I was actually unable to &lt;em&gt;read&lt;/em&gt;. Being able to get my brain to concentrate on reading was a massive improvement.&lt;br /&gt;  On top of once again being able to read, I was also actually hungry for the first time in a day or two. It was amazing&amp;mdash; I was able to walk around without getting dizzy, I could read, and food seemed like a good idea. I still wasn't really feeling anything remotely approaching "good", but I was feeling light-years better than I had been. When Dan and Kevin returned from what had apparently been a harrowing day&lt;a name="massive_orig_2"&gt;&lt;/a&gt;&lt;a href="#massive_foot_2"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;, they couldn't stop saying how much better I was looking. I'd had no idea that antibiotics could kick in so quickly. Even correcting for any placebo effect that may have been going on, it was amazing.&lt;br /&gt;  It was a good three days before I was really feeling like my usual self, and a few days past that before I felt like eating much in the way of spicy foods. The drugs got me up and functional, though, and for that I'm eternally grateful. There are very few things less pleasant than being sick in a foreign country. It's happened to me twice now&amp;mdash; once in Israel, and now once here in India. Both times have been very frightening experiences, and I'm quite happy to be done with illness for now.&lt;br /&gt;  A few days later, both Dan and Kevin started feeling somewhat unwell. As far as I know, Kevin's unrest didn't turn into anything, but Dan's turned into a full-blown intestinal infection. Apparently, it is sort of expected that first-time visitors will get sick. One of the people we've met here, a consultant specializing in auditing outsourced development projects, told us that he's gotten sick &lt;em&gt;every single time&lt;/em&gt; he's come to India. I can certainly see why&amp;mdash; the food here is vastly different than the food in the US, in practically every way imaginable. The water is not safe to drink, and it's very easy to accidentally ingest some. Public sanitation is sometimes not as top-notch as one might hope (it's not at all unusual to see people urinating into the gutters on the side of the street). On top of everything else, there are deadly mosquito-borne diseases everywhere you look (the city is currently in the midst of  Dengue Fever epidemic). Basically, if you're not adjusted to it, there are more ways to get sick here than there are ways to get drunk in Boston on St. Patrick's Day. I'm glad that I've had my turn and am now starting to get adjusted properly.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;a name="massive_foot_1"&gt;&lt;/a&gt;&lt;a href="#massive_orig_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;: In fact, tasting how spicy (and heavily spiced, and salty) the food is here has filled in a few puzzle pieces for me. About a year and a half ago, a new Indian restaurant opened up near my old house off of Walker. We tried it out, and more or less unanimously decided that it was too salty, and too heavily spiced, for our taste. Having been here, I can now say that the problem, so to speak, was not with the restaurant. It was quite faithfully serving up some very authentic food. Our palates were where the problem lay.&lt;br /&gt;&lt;br /&gt;&lt;a name="massive_foot_2"&gt;&lt;/a&gt;&lt;a href="#massive_orig_2"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;: This was the last day that Clint drove for us. Apparently, he got quite lost at several points, and was driving crazily enough that the local co-worker who had elected to come and show us around Kolkata became nervous. At one point, according to Kevin, he took a wrong turn and got them stuck in a traffic jam on some sketchy bridge for almost an hour. This bridge, allegedly, had potholes so extensive that you could basically see the water in the below. According to Dan and Kevin, the Toyota SUV bottomed out a number of times dealing with the potholes. Note that the potholes and what-not cannot really be blamed on Clint; their concern was with his erratic driving and generally sketchy demeanor.&lt;br /&gt; At the time, I was forced to defer to them on this matter. I'd picked up some strange vibes off of Clint, but nothing really bad enough to warrant a change of drivers. Likewise, his driving was always kind of erratic, but so was everybody else's in Kolkata. Also, when I had been sick on the side of the road, he'd been extremely kind to me&amp;mdash; making sure I had water, giving me well-intentioned medical advice, etc. &lt;br /&gt; The matter was ultimately not decided by us. The guy from Tathya who'd accompanied Dan and Kevin that day had been so unnerved by what he'd seen that he took the necessary steps to replace Clint. The next day, our driver was Sidni, Clint's brother. The difference between the two was night and day. Where Clint's driving was at times very aggressive, and his horn was always in action, Sidni seems to be in far more control of the car and its place in the road. He hardly ever honks, and when he does it's usually more of a "Hey, I'm in your blind spot" or "Hey, you just cut me off" than a "Hey, coming through here, out of the way". &lt;br /&gt; Also, Sidni is much more knowledgable about Kolkata geography that Clint was. I feel kind of bad about this turn of events, as Sidni doesn't usually drive these days&amp;mdash; he runs the driving company, and numerous other business ventures besides, but he does not typically drive. He was a very good sport, though, especially given the fact that the change in drivers meant that his entire schedule for the ensuing week had to radically change.&lt;br /&gt; For our part, we tried to be flexible and made sure that he knew that he could take off during the day and attend to other business matters, as long as he was back at the office around eight or so to pick us up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112615665653045192?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112615665653045192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112615665653045192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112615665653045192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112615665653045192'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/09/ye-olde-massive-update-part-one.html' title='Ye Olde Massive Update, part one'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112615656629563004</id><published>2005-09-07T22:14:00.000-07:00</published><updated>2005-09-07T22:16:06.300-07:00</updated><title type='text'>Ack!</title><content type='html'>OK, due to illness and general craziness, I haven't been able to post in a week or so. I'm trying to get caught up, but be prepared for datestamps on posts that don't match up with when blogger says things were posted.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112615656629563004?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112615656629563004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112615656629563004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112615656629563004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112615656629563004'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/09/ack.html' title='Ack!'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112516410483698288</id><published>2005-08-27T10:34:00.001-07:00</published><updated>2005-08-27T10:35:04.836-07:00</updated><title type='text'>Why I Love My D70, part 1 - 4:45 pm Kolkata time, 8/25/2005</title><content type='html'>Taking pictures during a monsoon is a good way to get one's camera body a little bit wet. I'm pleased to report that the D70 body is water-resistant enough to take out in a rainstorm for a few minutes, provided one dries it off afterwards. Monsoons actually are good times for photgraphy, because the ambient temperature is lowered by five or ten degrees. This helps keep the camera's lens from fogging up. Of course, the heavy dark cloud cover reduces the light enough to require a higher-than-usual ISO sensitivity setting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112516410483698288?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112516410483698288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112516410483698288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516410483698288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516410483698288'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/why-i-love-my-d70-part-1-445-pm.html' title='Why I Love My D70, part 1 - 4:45 pm Kolkata time, 8/25/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112516408051187258</id><published>2005-08-27T10:34:00.000-07:00</published><updated>2005-08-27T10:34:40.513-07:00</updated><title type='text'>A Fun New Acquaintance, and Why I Love My Mac, part 2 - 10:17 am Kolkata time, 8/24/2005</title><content type='html'>OSX has the standard UNIX tools for dealing with file systems and devices, and can mount just about any sort of disk, file system, etc. It also deals extremely well with network self-configuration and discovery&amp;mdash; i.e., you can plug it into just about any ethernet anywhere, and reasonably expect to be able to do computer-to-computer file transfers quickly and without any pain. These attributes in handy when a Yugoslavian airline pilot wants help copying his collection of bootlegged Yugoslavian classic films off of the damaged DVD-ROM they're burned to.&lt;br /&gt;&lt;br /&gt;Before you ask, yes, this situation came up last night. As I was writing the previous post&amp;mdash; in fact, just as I was typing the bit about not seeing very many Europeans in the hotel, and how most of the ones we saw were somehow affiliated with an airline&amp;mdash; I heard a voice asking me, in a heavy Eastern-European accent, "Excuse me, your laptop is also havink Combo Drive?".&lt;br /&gt;&lt;br /&gt;The voice turned out to belong to Aleksandar, a friendly Yugoslavian somewhere between forty and sixty years old. He's an airline pilot, and is on a one-year contract flying for a domestic Indian airline. When he's not flying, they put him up at the Kolkata Hyatt. The last time he was in Yugoslavia, he had a friend burn him DVD-ROMs containing bootleg DivX transfers of one or two dozen classic Yugoslavian films from the 1970's and 1980's. Something had gone awry with about half of the discs, and the discs were unreadable on his Windows XP laptop. They show up in Nero's "Disc Info" screen as having a track and session recorded, but they are unmountable. On my Mac, however, they appeared almost entirely without complaint (one of the discs required a little bit of finangling with the Disk Utility).&lt;br /&gt;&lt;br /&gt;Once we verified that the files were intact, it was just a matter of copying them over. Neither of us had a crossover cable, so we had to use the hotel's "Business Center". A simple matter of plugging in our laptops to the hotel LAN, setting up "Windows File Sharing" in my System Preferences, and we were off like a shot. Of course, it took a long time to copy, so we were up until about two in the morning. I got to hear all about what it's like flying for an Indian airline. Apparently, the industry is in very good shape, so the fleets are relatively new. The only problem, he said, was that they didn't have any kind of automated scheduling system for deciding who got which flights, so the pilots had to spend a good bit of time sweet-talking the gal who handled the scheduling in order to get the flights they wanted.&lt;br /&gt;&lt;br /&gt;Once we were done copying the files, Aleksandar was so grateful that he tried to drag me down to the hotel bar&amp;mdash; at two in the morning, mind you&amp;mdash; for some beers. I told him that I would have to take a rain check, as I had to work the next day. He then suggested that I head out to the airport with him the next day, as he was taking a new pilot up for some flight training and he could take me along, too. Even more reluctantly, I had to take another rain check&amp;mdash; as much as I would have loved to take the day off and go flying, our time here is limited enough that I'm not reallly able to randomly and spontaneously take the time off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112516408051187258?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112516408051187258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112516408051187258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516408051187258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516408051187258'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/fun-new-acquaintance-and-why-i-love-my.html' title='A Fun New Acquaintance, and Why I Love My Mac, part 2 - 10:17 am Kolkata time, 8/24/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112516404110023279</id><published>2005-08-27T10:33:00.000-07:00</published><updated>2005-08-27T10:34:01.106-07:00</updated><title type='text'>Notes on Relative Incomes and Standards of Living - 10:23 PM Kolkata Time, 8/23/2005</title><content type='html'>For reference, the Indian Rupee is currently exchanging at something like 42 to the dollar. This means that if somebody is making, say, RS 6000 per month, that works out to about just under $150 per month.&lt;br /&gt;&lt;br /&gt;I bring this figure up because, apparently, it is what an entry-level computer programmer with no other work experience can expect to earn at a medium-sized IT consulting firm in Kolkata. It is also, at least according to the owner of the company that we're working with, about the lower boundary of the income bracket that constitutes the middle class here. His definition of the middle class lifestyle is actually pretty similar to what we might have in the US: by his definition, if you're a middle class resident of Kolkata, you probably have a computer with a high-speed connection to the Internet of some sort. You almost certainly have a mobile telephone&lt;a name="income_orig_1"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_foot_1"&gt;1&lt;/a&gt;&lt;/sup&gt;. You might have a motorscooter or a small car. Food and rent are not an issue, and neither is clothing. Basically, you are more than just "getting by" and are well into the "comfortable" range.&lt;br /&gt;&lt;br /&gt;After three to five years of experience, if you're good at your job, and have risen to a team-leader-level role, you can expect to be pulling in around RS 20,000 per month. This is still under $500 per month, but puts you near the upper edge of the middle-class income bracket. You'll be pulling in enough to go on periodic trekking vacations to the Himalayas&lt;a name="income_orig_2"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_foot_2"&gt;2&lt;/a&gt;&lt;/sup&gt;, and will have a very flashy mobile phone.&lt;br /&gt;&lt;br /&gt;Of course, at other companies, the pay can be much higher&amp;mdash; apparently, the pay at Infosys or Wipro (two of the biggest IT consulting firms) &lt;em&gt;starts&lt;/em&gt; around RS 20,000/mo. However, it's not a 1:1 comparison: working for one of those companies would involve living somewhere with a higher cost of living; also, the competition for jobs at those firms is extremely intense, and very few people are able to get in. In addition to those two considerations, the owner of the company we're working with here had a few other points that I thought were extremely salient. He pointed out that working for one of those companies is not very much fun. The typical programmer is given very strict specifications  and instructions, and has to follow them to the letter. There is not much room for creativity, and the atmosphere can become very stifling. Many people, he said, prefer to work for a smaller firm where they can be more creative, and enjoy a more relaxed work environment. Also, it seems as though the opportunities for further learning and career growth can be greater at smaller firms as well. The owner of this firm also mentioned that since they are unable to compete with the big guys in salary, they try and compensate for it by having better health insurance and also by having lunch and tea brought into the office every day for the employees. Throughout our entire discussion today, I felt as though I could have been talking to the owner of any small-to-medium-sized software house in the US. If it hadn't been for the chain-smoking, intense humidity, unmistakable traffic sounds, and intermittent power supply (the power cut out twice during our meeting), I might have forgotten where I was.&lt;br /&gt;&lt;br /&gt;On a slightly off-topic note, I had a bizarre morning today. I'd gone into the owner of the company's office to pick up a book on Indian art that he'd brought in for me to borrow, and ended up staying and chatting for almost two hours. While I was in there, unbeknownst to me, one of the co-workers I'd come with was having some severe technical problems, and could have used my help. So, after two hours of shooting the breeze with this guy and a couple of the other programmers on a whole variety of hard-core software topics (they have Knuth here, too!&lt;a name="income_orig_3"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_foot_3"&gt;3&lt;/a&gt;&lt;/sup&gt;), as well as various approaches to outsourcing, Indian art, history, wildlife, etc., I came out feeling like &lt;a href="http://topics.nytimes.com/top/opinion/editorialsandoped/oped/columnists/thomaslfriedman/index.html"&gt;Thomas-freakin'-Friedman&lt;/a&gt;, and I find poor Dan tearing his hair out. He'd thought that that the owner and I had been having, oh, I don't know, some sort of discussion that was actually &lt;em&gt;work-related&lt;/em&gt; or something, and hadn't wanted to interrupt. Doh. It all worked out, though. He had been able to figure things out on his own, and now he knows that it's okay to interrupt. I still felt bad, though. Trying to work while coping with &lt;em&gt;severe&lt;/em&gt; culture and gastronomic shock has been more stressful than any of us had predicted. We're doing pretty well at dealing with it, but from time to time the increased stress manifests itself and something that would ordinarily not be a problem becomes one for a few minutes. Then we just remind ourselves of where we are and what we're doing, and it's all good. :-)&lt;br /&gt;&lt;br /&gt;Back to the topic of income, though: I'm definitely having trouble with the fact that I'm staying in a hotel that, while not not very expensive at all by American standards, costs more per night than most people in Kolkata make in a month. My boss wanted to make sure that we had a comfortable, familiar-feeling place to come back to every night. So, the decision was made that we would stay at a Western-style business hotel. I'd initially scoffed at this idea, but have since come to appreciate it a bit. If I were here on my own as a tourist, I'd stay in a local hotel&amp;mdash; in fact, I will be doing just that in a week or two. Since the first few weeks of my trip are work-related, though, I definitely think it was the right idea, at least in principle. In practice, however, I think it may have worked a little bit too well.&lt;br /&gt;&lt;br /&gt;The hotel is a Hyatt, and as such is about a thousand times nicer than any hotel that I've ever stayed in in the US. It's actually being double-culture-shock: on the one hand, outside the hotel is India, with all of the usual shock awaiting the first-time visitor. Inside the hotel, though, is this whole other world that I also have never really lived in for any length of time: feather beds, people pulling chairs out for you, an entire staff of people to open doors for you, a whole other staff dedicated to not letting you carry your own bags, etc. It really heightens the contrast between the way that we live in the US and the way that the overwhelming majority of Indians, even well-off ones, live. What really makes me feel like a shit is that the company we're working with has provided us with a full-time driver. So far, his only job has been to drive us from the hotel to the office in the morning, wait outside for ten hours, and then drive us back to the hotel in the evening. I have no idea how much they're paying him per day, but I would bet my spare camera battery that it's less than I just dropped on a sandwich and a beer at the hotel restaurant. &lt;br /&gt;&lt;br /&gt;I initially was unsure of how I felt about this contrast, but after a few days, I can conclusively say that it does not feel good. On the one hand, I'm glad to be helping to employ him. Dog knows he needs the job&amp;mdash; one need only look at the vast&lt;a name="income_orig_4"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_foot_4"&gt;4&lt;/a&gt;&lt;/sup&gt; number of people living on the sidewalks here to see what the alternative to employment looks like. On the other hand, I can't shake the feeling that I'm somehow being exploitive, and the gross imbalance in our financial situations makes me somewhat uncomfortable. It's not a feeling I'm used to... in the US, I'd say that I'm pretty solidly in what I'd call the middle class, but the difference in financial situation between myself and somebody working at, say, Taco Bell or somewhere is almost insignificant compared to what's going on between myself and everybody else here. For example, I clocked twelve hours yesterday. Not counting overtime, that means that I made more (before taxes) in one day than some of the people I was working with made in the entire month&lt;a name="income_orig_5"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_foot_5"&gt;5&lt;/a&gt;&lt;/sup&gt;. Even our hypothetical Taco Bell worker would have no problem earning more in a day or two than a well-paid Kolkatan software engineer makes in a month.&lt;br /&gt;&lt;br /&gt;The hotel's more casual restaurant is, by Kolkata standards, staggeringly expensive. It would perhaps be analogous to eating at the Heathman in Portland. By American standards, it is pretty normally priced: entrees are mostly in the $5-10 range. We're pretty much the only Westerners staying here. There are a few groups of tourists from somewhere in Asia, and lots of Indians, but we've only seen one or two other Westerners. Most of them seem to work for an airline; there are lots of pilot and steward/ess uniforms running around amidst the sarees.&lt;br /&gt;&lt;br /&gt;&lt;a name="income_foot_1"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_orig_1"&gt;1&lt;/a&gt;&lt;/sup&gt;: Mobile phones are far cheaper here than they are in the US. For a monthly CDMA plan (In an odd reversal from the US, CDMA seems to be the system with the best phones, whereas GSM seems to be lagging in that regard and as such is less popular and cheaper) you're looking at well under $10 per month, which, even by the lower salary standards, is still definitely affordable for many people. Yesterday, we were offered a pre-paid GSM plan for about $5. This included several hundred minutes as well as a phone. There was no contract. According to an article in yesterday's paper about the upcoming celebrations for the 10th anniversary of mobile phone access in India, the government is not subsidizing phone prices or usage rates. I have no idea why it's so cheap here, and neither does anybody else, as near as I can tell. The only thing I can think of is that there are &lt;em&gt;so many freaking people&lt;/em&gt; that the economies of scale make it work.&lt;br /&gt;&lt;br /&gt;&lt;a name="income_foot_2"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_orig_2"&gt;2&lt;/a&gt;&lt;/sup&gt;: One of our programmers, upon seeing the pictures from my recent trip to Alaska, exclaimed at how closely some of the mountains resembled the Himalayas. Today, he brought in pictures of his last trip up there, and, sure enough, the glacial murrain pictured therein looked very similar to that seen in Alaska.&lt;br /&gt;&lt;br /&gt;&lt;a name="income_foot_3"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_orig_3"&gt;3&lt;/a&gt;&lt;/sup&gt;: The owner's comment when I exclaimed over his set of "TAoCP": "Oh yes, these are like the Koran, or Bible, or the Vedas of software. I used these as textbooks in the courses I taught at the university." It's nice to know how much is universal in the world.&lt;br /&gt;&lt;br /&gt;&lt;a name="income_foot_4"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_orig_4"&gt;4&lt;/a&gt;&lt;/sup&gt;: And I do mean "vast". Portland has, for an American city, a significant homeless population. I don't mean to be callous, but it is &lt;em&gt;nothing&lt;/em&gt; compared to what is going on here. Imagine walking down Yamhill St. in Portland, and seeing &lt;em&gt;every single square foot&lt;/em&gt;&amp;mdash; literally, every single one&amp;mdash; occupied by somebody. People sitting, standing, lying down, running around, playing cards, reading, and doing yoga. Eating, selling stuff, etc. One after another, foot after foot, for the &lt;em&gt;entire&lt;/em&gt; length of the street. Now multiply this by every street in Portland. Now, take every window, and hang some laundry out of it. Also, fill the gutters with a little sewage and a lot of garbage. You now have a very vague approximation of what the &lt;em&gt;nicer&lt;/em&gt; parts of Kolkata look like.&lt;br /&gt;&lt;br /&gt;&lt;a name="income_foot_5"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#income_orig_5"&gt;5&lt;/a&gt;&lt;/sup&gt;: This says far more about the income levels in Kolkata than it does about my job, FYI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112516404110023279?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112516404110023279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112516404110023279' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516404110023279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516404110023279'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-relative-incomes-and.html' title='Notes on Relative Incomes and Standards of Living - 10:23 PM Kolkata Time, 8/23/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112516398468728821</id><published>2005-08-27T10:32:00.000-07:00</published><updated>2005-08-27T10:33:04.693-07:00</updated><title type='text'>Driving, part 1 - 3:58 pm 8/21/2005</title><content type='html'>"Don't worry, sirs, they're not required in the back. You're in India!" This is our driver's only comment regarding seatbelts in the back of his carefully-tricked-out Toyota SUV&lt;a name="drive_orig_1"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#drive_foot_1"&gt;1&lt;/a&gt;&lt;/sup&gt;. Apparently, they're only required up in the front of the car... and even then, he only seems to worry about it during the day. At night, he explains, there are fewer policement out watching traffic, so at night, "they're not required". This is really the only thing he has to say on the matter of seatbelts in general: "Don't worry, sir, it's not required". &lt;br /&gt;&lt;br /&gt;Driving in general is pretty chaotic here. No, wait, scratch that&amp;mdash; it's &lt;em&gt;completely&lt;/em&gt; chaotic. There are a lot of people on the roads. I mean, a &lt;em&gt;lot&lt;/em&gt; of people. Bicycles, cows, rickshaws, scooters, buses, animal-driven carts, taxis, trucks, pedestrians, all dodging around each other at high speeds and honking as loudly and as frequently as possible. Our driver, whose name is Clint, actually has installed some sort of auxiliary honking unit in his car. It produces perhaps ten or fifteen different tones and patterns, and has lots of interesting flashing LEDs. So, whenever Clint doesn't think his car's main horn will do the trick, he hits a small switch he's installed on the dashboard, and suddently his horn starts playing a sort of two-tone klaxon, or some sort of musical scale, or whatever he has it set to at that moment. Also, it changes how the horn button works: in the normal operating mode, one has to hold down the button on the steering column in order to cause sound to come from the horn. When in the auxiliary mode, however, the simple act of tapping the horn button causes the horn to automatically honk for about five to ten seconds. It's sort of like one-touch dialing for a car horn. I've decided that I need one of these things for my Acura&amp;mdash; hours of fun for everybody.&lt;br /&gt;&lt;br /&gt;The city buses are all a brilliant combination of robin's-egg blue and yellow&amp;mdash; very hard to miss. They also have "Danger" painted on the back, frequently with a set of crossed Indian flags and the message "My India Is Great" as well. Also, some of them (and also many trucks) say "Obey Traffic Laws". This is funny for a number of reasons, but primarily, I think it's funny because, as near as we can tell, and from what others have told us, there &lt;em&gt;are&lt;/em&gt; no traffic laws. The only ones that anybody seems to follow with any consistency are that one drives on the left, and that when a light is red, you probably shouldn't go through the intersection. Unless, of course, you see a good opening&amp;mdash; then you should try and go for it. &lt;br /&gt;&lt;br /&gt;I fully expect to return to Oregon and be honking my horn like crazy, and cutting people off left and right. And maybe drive on the wrong side of the road. Apparently, it is very common for Indians who go to the US to get massive traffic tickets the first few times they drive. Here, if you are driving the wrong way down the street, and a traffic cop happens upon you, you might need to pay a three or four dollar bribe in order to keep going. In the US, I'm not sure what the going rate for looking the other way to driving down the wrong side of the road is, but I imagine it's a hair higher than that. :-)&lt;br /&gt;&lt;br /&gt;&lt;a name="drive_foot_1"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#drive_orig_1"&gt;1&lt;/a&gt;&lt;/sup&gt;: Ways in which Clint's car is customized: Uncountable Toyota stickers and badges; not less than three Audi badges (no, we don't know why); customized Toyota door handles (yes, door handles); stickers for about twelve different providers of high-end car audio, security, lighting, etc.; extra-bright headlights (multiple sets); auxiliary horn system; religious icons from what are, as near as we can tell, three or four different religions; six or seven tassel-type things hanging down in front of the windscreen; seatbelts removed from the backseat; etc. The end result of all of this customization is that the vehicle has a certain... personality, very different from any car I've ever ridden in the US. Much like the everything else in India, the car seems to be brimming over with activity and personality, going in every possible direction at the same time. Its general affect is one of complete, barely contained, and slightly desperate chaos.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112516398468728821?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112516398468728821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112516398468728821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516398468728821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112516398468728821'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/driving-part-1-358-pm-8212005.html' title='Driving, part 1 - 3:58 pm 8/21/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112461975408420598</id><published>2005-08-21T03:18:00.000-07:00</published><updated>2005-08-21T03:22:34.090-07:00</updated><title type='text'>Bengali Television</title><content type='html'>Bengali Television - 9:27 pm 8/20/2005&lt;br /&gt;&lt;br /&gt;Sitting in the hotel room, watching "Who Wants To Be A Millionaire?", Bengali-edition. The set, lights, and music are &lt;em&gt;exactly&lt;/em&gt; like the American version, and the questions are mostly in Bengali except for words like "Computer, would you please", "Right answer", "Phone-A-Friend", etc. The questions appear on the screen in English, however, and the answers are read by the announcer in English. Typical question: "Which of the following forts is not in Rajasthan? A. Mehrangar, B. Bandavgarh, C. Chittorgarh, D. Kumbhalgarh" (B, FYI). &lt;br /&gt;&lt;br /&gt;Tonight's contestant used up his 50/50, Phone-A-Friend, and "Ask the Audience" early on- around RS 3,000 (around $70USD), so we thought he was done for. He's been doing quite well since that, though&amp;mdash; seems to have hit a stride.&lt;br /&gt;&lt;br /&gt;Oh, just now, the question is about what the "W" is Dubya's name stands for. The contestant gets it right.&lt;br /&gt;&lt;br /&gt;It's odd- the current question ("Which is the largest mammal to build a nest, every day?") was read in English. Very strange... the contestant answered incorrectly (Kangaroo, the right answer was Gorilla), and his shot was over. He walked away with RS 20,000 (about $476 USD). Considering the average income around here, I'm guessing that this was not as disappointing a showing as it would have been in the US.&lt;br /&gt;&lt;br /&gt;Oh, and the weirdest thing&amp;mdash; the stated goal in the show's title is not to be a millionaire, but rather to have "2 Crorepati". "Crorepati" is not in my phrasebook's list of quantities, so I'm guessing that its use here is idiomatic for something else.&lt;br /&gt;&lt;br /&gt;OK, an ad for cement just came on. Yes, you read correctly&amp;mdash; cement. As in the heavy stuff that comes in bags that you mix to build stuff with. It was sandwiched between an ad for a Nokia cell phone that is so hoopty that we don't even have it in the US yet, and one for what appeared to be some sort of financial services company (guessing on that one&amp;mdash; clean-cut, responsible guys in suits striding purposefuly around skyscrapers, the occasional word like "endowment" in the midst of the Bengali, the same color schemes, fonts, and logo styles as in similar ads). It's amazing how much of an ad's information comes from things other than the spoken script and the written content of the titles. &lt;br /&gt;&lt;br /&gt;Also of note was an ad for motorscooters. A full discussion of the place that motorscooters play on Kolkata's streets will have to wait, but suffice it to say that the scooter serves a similar purpose here as a minivan or station wagon does back in the US: an all-purpose family vehicle, complete with lots of seating&lt;a name="ad_orig_1"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#ad_foot_1"&gt;1&lt;/a&gt;&lt;/sup&gt; and plenty of storage room&lt;a name="ad_orig_2"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#ad_foot_2"&gt;2&lt;/a&gt;&lt;/sup&gt;. Now, there were two main things that stuck out as notable about this ad. First, the scenes of the scooter being driven bore little-to-no resemblance to anything we've seen thus far in India: Very few other cars on the road; no cows, buses, taxis, or autorickshaws going the wrong way down the street; no pedestrians walking out in front of the driver and his companion, etc. The second thing that struck me was that, at one point in the ad, the driver was in front, while in the back sitting sideways on the scooter was a woman who was presumably his wife, holding a small baby in her lap. Neither the mother nor the child were wearing helmets. Now, this sort of thing happens all over the place here. In the fifteen-minute drive from the hotel to the office, we easily saw at least two dozen such families on scooters.  Stop for a second, though, and imagine the uproar that would ensue if such an ad ran in the states. Driver and passenger with no helmets, child riding in lap, etc. etc. etc. The list goes on and on. Imagine Harley-Davidson airing a commercial essentially advising its customers to ride helmetless with their young children held in their laps. Somebody would actually try and do this, get themselves, their spouse, or their offspring killed, and sue the company back into the Bronze Age. Here, it's a regular ad for what appears to be a relatively upscale scooter company. The central gist of the campaign was strkingly similar to that one a few years back, by either Toyota or Chevrolet, about how many miles various people had put on their cars&amp;mdash; sort of a double-barreled cocktail of "reliable, faithful, durable, etc." and "our vehicles are more than just modes of transportation, they're parts of your life".&lt;br /&gt;&lt;br /&gt;[Update: 2 Crorepati is RS 20,000,000, which is about $476,000 USD.]&lt;br /&gt;&lt;br /&gt;&lt;a name="ad_foot_1"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#ad_orig_1"&gt;1&lt;/a&gt;&lt;/sup&gt;: Lots of seating, if you don't mind having your kids placed precariously on your and your passenger's lap.&lt;br /&gt;&lt;a name="ad_foot_2"&gt;&lt;/a&gt;&lt;sup&gt;&lt;a href="#ad_orig_2"&gt;2&lt;/a&gt;&lt;/sup&gt;: Lots of storage, if you don't mind liberal use of twine, laps, etc. Also, it helps to not mind having large things like ladders, spools of wire, jugs of water, and so forth hanging off the side of the scooter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112461975408420598?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112461975408420598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112461975408420598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112461975408420598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112461975408420598'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/bengali-television.html' title='Bengali Television'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112452281206707047</id><published>2005-08-20T00:26:00.000-07:00</published><updated>2005-08-20T00:26:52.066-07:00</updated><title type='text'>Notes on Travel, Part 6</title><content type='html'>12:55 AM 9/20/2005 Kolkata (Calcutta) Time&lt;br /&gt;&lt;br /&gt;Woah. At long last (something like 36 hours of travel), we finally made it to India. Stepping off the plane, the first thing that hits is the humidity&amp;mdash; not quite as stifling as Singapore was, but almost. The second thing that hits is just how many people there are running around here. At 11:30 at night, the drive to our hotel was a death-defying high-speed chase down narrow roads while dodging around pedestrians, taxies, bicycles, buses, and the occasional cow. The sidewalks were packed, shops were still open, there were apartment buildings of all sorts, sizes, and states of repair everywhere we looked. There were at least five specific instances where we came within two inches of other cars. There was no evidence of painted lane markers, traffic signs or lights, etc. Oh yeah&amp;mdash; they drive on the left hand side of the road here. All in all, it was a ton of fun, if a bit harrowing. What was &lt;em&gt;really&lt;/em&gt; weird was when we got to our hotel, which is a new-ish Hyatt. Inside, except for the Hindi and Bengali television channels, and odd electrical outlets, you'd never guess you were in a foreign country. All in all, my body and mind are both very confused about what's going on right now, so now that I've had a nice hot shower to clean off several days worth of airport, I think I'm going to bed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112452281206707047?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112452281206707047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112452281206707047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112452281206707047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112452281206707047'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-travel-part-6.html' title='Notes on Travel, Part 6'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112452278546254794</id><published>2005-08-20T00:25:00.000-07:00</published><updated>2005-08-20T00:26:25.463-07:00</updated><title type='text'>Notes on Travel, Part 5</title><content type='html'>Singapore, 1:00 PM Local Time 8/19/2005&lt;br /&gt;&lt;br /&gt;The Singapore airport is one of the swankiest airports I think I've ever seen. It feels like a very high-end mall&amp;mdash; think Denver's Cherry Creek&amp;mdash; and is simply huge. From the immigration paperwork ("Death For Drug Traffickers is Singapore's Law") I'd been expecting something much less... comfortable-feeling. Instead, we were greeted by a massive indoor fern garden and more free internet kiosks than you can shake a stick at (the connection speed is fast enough to use Skype quite effectively). There are plants everywhere, and all of them are real. Heck, there's even a &lt;em&gt;koi pond&lt;/em&gt;. In the airport. A giant freaking koi pond. There's a roof-top sunflower garden, as well. Oh, and I almost forgot- there's a free movie theater, constantly showing a variety of American films (both classic and more recent).&lt;br /&gt;&lt;br /&gt;We found some lunch... I got some sort of seafood-noodle-curry thing. It had all sorts of interesting marine wildlife in it... prawns, some unidentifiable fish-type thing, and who-knows-what-all-else, all in a slightly spicy fishy curry sauce. It was a tough call, as there are a ton of amazing-looking restaurants here. So far, I can report that what passes for Indian food in the US is very similar to what passes for Indian food in the Singapore airport. &lt;br /&gt;&lt;br /&gt;The icing on the cake, though, is the free tour system. If your layover is more than a couple of hours long (ours is about nine hours), you can register for a free two- or four-hour sightseeing tour of the city. We're still about forty minutes early for ours, so I'm killing some time in a part of the airport that Panasonic has furnished with several dozen flat-panel televisions, each of which is set to a different sporting event somewhere in the world. They also have the largest touch-screen that I've ever seen, running something vaguely like Google Earth, only it only covers a few major world cities.&lt;br /&gt;&lt;br /&gt;Basically, the Singapore airport is probably the single best airport that I've ever been in. Killing hours here is amazingly easy.&lt;br /&gt;&lt;br /&gt;[Update: The free sightseeing tour was an excellent use of a couple of hours. It basically got us out of the airport, into the town, around a little bit, on a water-taxi ride around the harbor, and back to the airport. More airports ought to have similar things. Imagine how much better a six-hour layover at Chicago O'Hare would be if you could go on a tour of downtown.]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112452278546254794?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112452278546254794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112452278546254794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112452278546254794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112452278546254794'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-travel-part-5.html' title='Notes on Travel, Part 5'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112452266667466736</id><published>2005-08-20T00:23:00.000-07:00</published><updated>2005-08-20T00:24:26.680-07:00</updated><title type='text'>Notes on Travel Part 4</title><content type='html'>Friday, 8/19/2005, 6:10 am Taipei local time&lt;br /&gt;&lt;br /&gt;The Taipei airport looks just about like every other airport I've ever seen, except that all of the destinations are either in Asia or on the west coast of the US, and all of the signs are in English as well as some variation of Chinese. Actually, that's just a best guess&amp;mdash; I've been embarrassed to discover how little I know about Taiwan. I'm assuming that the language spoken here is some form of Chinese, but I could be very, very wrong. If I'd known I was going to be coming here, I would have done some reading...&lt;br /&gt;&lt;br /&gt;At any rate, the flight from LAX to Taipei is about twelve hours long. By careful sleep planning, I think I've managed to begin to get my time-sense onto something vaguely resembling local time. When we landed here, everybody had to de-plane and the passengers continuing onto Singapore had to go through security again. There was an excellent and entertainingly-named device in the Taipei security checkpoint: a large, clear box, marked "Unforced Disposal of Dangerous Goods", full of lighters, knives, etc. I tried to get a picture, but the security guards were not happy about seeing my camera out of its case. After a short but somewhat confusing conversation (in which I feel confident that the other parties involved were just as confused as I was), I decided to forego a photograph and made my way through the rest of the checkpoint without incident.&lt;br /&gt;&lt;br /&gt;Now we're waiting to re-board our flight. There appears to be wi-fi in the airport, but, alas, it is not free. Furthermore, the instructions on how to purchase time on it are in a language that is most definitely not English&amp;mdash; my co-worker's PC was reduced to an endless series of "Please install the xxxxx language pack to view this page" dialog boxes... my PowerBook happily rendered a very long and complex page full of foreign characters. What is very strange about all of this is that the network's initial landing page has an excellent English-language version, which very politely informs the viewer that internet access can be obtained using a pre-paid card, and that said cards can be bought online at a particular URL. The linked-to URL, however, is the one without any English option. So, no wi-fi for us. I'm afraid that PDX and its bountiful, fast, and free wi-fi has spoiled me something awful&amp;mdash; I now seem to expect public areas to have some sort of freely-avaliable wi-fi. &lt;br /&gt;&lt;br /&gt;My PowerBook's AC adapter has had its first taste of forgeign electricity, and is behaving admirably. At least, I think it is&amp;mdash; there are neither sparks nor flames, and my computer seems to think that it is charging. It turns out that Singapore Air's much-vaunted laptop-related amenities are for first- and business-class only, so its batteries are still low from last night's wi-fi adventures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112452266667466736?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112452266667466736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112452266667466736' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112452266667466736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112452266667466736'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-travel-part-4.html' title='Notes on Travel Part 4'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434845313783785</id><published>2005-08-17T23:55:00.000-07:00</published><updated>2005-08-18T00:00:53.136-07:00</updated><title type='text'>Why I Love My Mac</title><content type='html'>Sitting in LAX, we discovered that there is no public wi-fi in the International terminal. We had one of those Verizon broadband PC-card thingies, so one of our laptops could get internet access, but no love for the other two. The solution initially seemed simple&amp;mdash; set up interface sharing between the Verizon card and its computer's 802.11 card, create an ad-hoc network, and join through that. Sadly, though, after about ten minutes of futzing around, we were forced to determine that the Windows XP wireless network setup wasn't going to let us do it. The solution? Use my powerbook.&lt;br /&gt;&lt;br /&gt;It took a few very minor modifications to the relevent drivers' Info.plist files to get the card working with OSX, and about three clicks in the "Sharing" control panel, and boom&amp;mdash; wifi for the whole gate. &lt;br /&gt;&lt;br /&gt;Life is good, and so's my mac. I love how rarely I have to mess around with the Unix underpinnings, but I even more than that I love the fact that when I &lt;em&gt;want&lt;/em&gt; to, I can.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434845313783785?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434845313783785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434845313783785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434845313783785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434845313783785'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/why-i-love-my-mac.html' title='Why I Love My Mac'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434808175248744</id><published>2005-08-17T23:53:00.000-07:00</published><updated>2005-08-17T23:54:41.753-07:00</updated><title type='text'>Notes on Travel, Part 3 - 10:25 PM PDT 8/17/2005</title><content type='html'>The first leg of our trip was uneventful- PDX to LAX. My co-workers somehow ended up in "Economy Plus", whereas I was in the very last row. You know, those seats that don't recline and are extra-narrow. I was actually managing to fit my 6'&lt;em&gt;n&lt;/em&gt;" frame into the seat rather comfortably until the person in front of me decided to recline &lt;em&gt;their&lt;/em&gt; seat. Grrr. Actually, it wasn't so bad, especially since I found myself sitting next to a nice Kiwi family making their way back to Auckland after a few weeks of circumnavigating the globe.&lt;br /&gt;&lt;br /&gt;Upon arriving at LAX, I was quickly reminded of exactly why I like Portland's airport so much. To go from terminal to terminal at LAX requires a shuttle bus. This is, in and of itself, not especially strange. What's strange is that catching the shuttle involves exiting the airport, going through the baggage claim area, out to the curb, past all of the rental car shuttle-bus pickups, to a special pick-up area. Once the bus eventually shows up, there's much dodging through traffic, with people and cars running every which-where. It's about the least-organized way of handling this problem that I can think of. And the real killer is this: there's almost no signage. When you get off of the plane, there's no sign saying "Airline Transfers - Take Shuttle Outside" or anything like that. Everybody on the shuttle did nothing but talk about how poorly-signed the whole process was. &lt;br /&gt;&lt;br /&gt;So, for the record, in the spirit of "Stupid things I've figured out so that you don't have to", here's how to catch an international connection at LAX:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Follow the signs for "Ground Transportation" until you're out on the curb.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Then, look for the airport bus pickup areas.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Once you find that, wait for the "A" bus. This will go from terminal to terminal. Note: there are several different international terminals you might need to go to, so it's worth paying attention to which airlines are listed at which terminals. For Singapore Air, the "Tom Bradley International Terminal" is the one you want.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Get off at the appropriate terminal, re-check in, ask about your bags, mess around with frequent flier numbers, go through security, etc.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;At the moment, I'm sitting in the aforementioned T.B. Int'l Term., waiting for my connecting flight to Singapore to board. I've got about two more hours to go. One interesting note&amp;mdash; my itinerary says that this leg of the journy (LAX to Singapore) has a total elapsed time of 19 hours and 30 minutes, and is a direct flight. What it does &lt;em&gt;not&lt;/em&gt; say is that the flight stops in Taipei for an hour. This caused some confusion, as the big reader-board in the main terminal just said "Singapore Air fl. 29 - Taipei", whereas our tickets said "Singapore Air fl. 29 - LAX-SIN". According to the ticket agent, all of the other passengers were just as much in the dark as we were. Hey, as long as I get to Singapore in time to make my connection to Kolkata, I don't really care where we go. And it's nice to know that they won't be trying to fly at 777 for more than 19 hours without refueling. :-)&lt;br /&gt;&lt;br /&gt;Actually, it's quite a pleasant surprise&amp;mdash; when I woke up this morning, I had no idea that I'd be going to Taiwan before the day was out. Now &lt;em&gt;there's&lt;/em&gt; a sentence that can't come up too often! (With full apologies to Patrick)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434808175248744?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434808175248744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434808175248744' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434808175248744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434808175248744'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-travel-part-3-1025-pm-pdt.html' title='Notes on Travel, Part 3 - 10:25 PM PDT 8/17/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434794404427831</id><published>2005-08-17T23:50:00.001-07:00</published><updated>2005-08-17T23:53:17.653-07:00</updated><title type='text'>Notes on Travel, part 2 - 8/15/2005</title><content type='html'>Before traveling to India, there are a variety of vaccinations and medications that one is supposed to take. The travel-mages at Kaiser saw fit to shoot me up with a vaccine against Hepatitis A, as well as boosters for polio, measles, tetanus, mumps, etc. I'd thought that I'd seen the last of those guys years ago, but apparently they're suggesting a second round of boosters for folks after their early twenties. Besides the injections, they gave me an oral vaccine for Typhoid, anti-malarial pills, some sort of nuclear-strength antibiotic, and stern warnings about drinking anything but bottled water.&lt;br /&gt;&lt;br /&gt;The oral typhoid vaccine was kind of a pain&amp;mdash; it contained live attenuated typhoid culture, and as such had to be kept refrigerated (but could not be frozen). This  wouldn't have been a problem except for the fact that I was leaving for Wyoming smack-dab in the middle of its course of treatment. How were we to keep the vaccine cold while on an airplane? After consulting with our friend who works for the TSA, my clever s/o rigged up a solution involving an insulated lunch bag and several soft ice packs. This, our friend assured us, would make it through security without any problems. &lt;br /&gt;&lt;br /&gt;I wasn't so sure- what could possibly look more suspicious on an x-ray than several small capsules elaborately packed in ice? My concern, however, was &lt;a name="orig_1"&gt;&lt;/a&gt;un-necessary&amp;mdash; we made it through without incident&lt;a href="#foot_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;. Everything was fine, and we made it to Wyoming as planned. Once I finished the typhoid vaccine, it was time to start the anti-malarials&amp;mdash; you're supposed to start them a week before you leave. &lt;br /&gt;&lt;br /&gt;I took the first pill Wednesday morning, and felt fine... until Wednesday night. I had some of the strangest dreams I can remember having in years. The same thing happened on Thursday and Friday nights as well. Also, I found myself feeling progressively more anxious and tense. This was noteworthy as I am, by nature, generally a very calm, relaxed person. At first I thought I was just fretting about my upcoming trip, or perhaps about how I was going to pay for some significant car repair that had been done while I was out of town. As the tension got worse day by day, though, and became less and less about anything in particular, I began to question my initial hypothesis, and finally remembered that the number-one listed side-effect of Mefloquine is sudden feelings of anxiety, paranoia, tension, etc. &lt;br /&gt;&lt;br /&gt;Bingo. &lt;br /&gt;&lt;br /&gt;A quick call to the pharmacy confirmed that my sudden pronounced anxiety and strange dreams were almost certainly the result of the drug, and that they'd go away as soon as I stopped taking it. The problem, of course, is that I was looking at two more months of this. Obviously, it's better than malaria... but if there's an alternative to spending the next couple of months worrying myself sick, I'd like to take it. So, they're switching me to a daily antibiotic, which, in addition to fighting off &lt;em&gt;plasmodium&lt;/em&gt;-borne disease, will also help keep my digestive tract free of any bacteria that might find there way there whilst I'm in India. Ordinarily, I'd be against taking an antibiotic for that long... but in this case, it might be okay.&lt;br /&gt;&lt;br /&gt;The whole episode leaves me with two main questions:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt;Why would an antimalarial be screwing with my brain chemistry enough to cause significant mood/affect changes? What is going on there, biochemically?&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Why would an antibiotic&amp;mdash; which is designed for use against bacteria and other prokaryotes&amp;mdash; work against malaria (which is caused by a protozoan?)&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;[Update 10:15 pm PDT 8/17/2005: Upon returning to Portland, I did some digging and found out that the best-guess explanation for the first question involved some stereochemistry- apparently, the mefloquine molecule is chiral, and only one of the enantiomers (I forget which) is effective against malaria&amp;mdash; the other seems to mess with some adenosine-uptake pathway. Apparently, this is why there are so many strange psychological side effects. Still no answer w.r.t. the second question]&lt;br /&gt;&lt;br /&gt;&lt;a name="foot_1"&gt;&lt;/a&gt;&lt;a href="#orig_1"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; Un-needed, perhaps, but not necessarily unfounded. It's very odd&amp;mdash; pre-September-11th, I used to get no end of hassle at every airport security checkpoint I went through. I was always the guy who got to be padded down and wanded while watching an entire team of agents dissect his carry-on baggage. It had always been this way, and when I learned about the tighter security measures that were to come in the wake of September 11, I was sure that "now I was really in for it". However, ever since then, for whatever reason, I've had next to no trouble with security. But I digress.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434794404427831?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434794404427831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434794404427831' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434794404427831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434794404427831'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-travel-part-2-8152005.html' title='Notes on Travel, part 2 - 8/15/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434783228589203</id><published>2005-08-17T23:50:00.000-07:00</published><updated>2005-08-17T23:50:32.286-07:00</updated><title type='text'>Notes on Travel, part 1 - 8/15/2005</title><content type='html'>So, recent weeks have seen much travel, and the weeks to come will see more. I started off in the middle of July with a two-week trip up to Alaska, and almost immediately left for a week or so in Wyoming and Colorado. As I write this, I'm on a plane back to Portland. On Wednesday, I leave for Calcutta by way of Singapore. All in all, I will have spent about five days out of the entire month of August at home. I wish there were a way to pro-rate auto insurance, so that I only had to pay for the five days that my car was on the road and not for the twenty-six days when it will have been parked out front of my house. Ditto for my cell phone&amp;mdash; it will be of no use in India, so why should I have to pay for the whole month of August?&lt;br /&gt;&lt;br /&gt;The seat-back screen informs me that I am currently traveling at 486 m.p.h., am at 37,577 ft, and am just on the Idaho-Oregon border. If memory serves, the flight path in from Denver swings just to the north of Mount Hood and provides a spectacular view. As such, I made sure to get us seats on the left side of the plane.&lt;br /&gt;&lt;br /&gt;[Update: The view was, indeed, spectacular.]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434783228589203?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434783228589203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434783228589203' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434783228589203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434783228589203'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes-on-travel-part-1-8152005.html' title='Notes on Travel, part 1 - 8/15/2005'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434779473362791</id><published>2005-08-17T23:48:00.000-07:00</published><updated>2005-08-17T23:49:54.733-07:00</updated><title type='text'>Photographic Lesson #1 from Alaska</title><content type='html'>Always, always, always keep a spare battery charged &amp; handy.&lt;br /&gt;&lt;br /&gt;Hell is being on a gorgeous cruise around Resurrection Bay, with wildlife everywhere, and a friendly photographer willing to let you use his $1,400 VR lens... and being forced to heavily ration your shots because your battery is on its way out.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;What I've Done To Keep This From Ever Happening Again:&lt;/em&gt; Picked up a spare battery for my D70, and will be keeping it charged every second of my upcoming trip to India.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434779473362791?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434779473362791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434779473362791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434779473362791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434779473362791'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/photographic-lesson-1-from-alaska.html' title='Photographic Lesson #1 from Alaska'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434772481921352</id><published>2005-08-17T23:47:00.000-07:00</published><updated>2005-08-17T23:48:44.820-07:00</updated><title type='text'>Things You Don't Want To Hear Whilst On Vacation, Vol 1</title><content type='html'>Me, on the cell-phone with my parents: So, were they able to get my car to pass emissions?&lt;br /&gt;Mom: Oh yeah, it passed just fine after they worked on it.&lt;br /&gt;Me: Great! And were they able to figure out why it hadn't been starting?&lt;br /&gt;Mom: Oh sure, yeah, he got all that fixed up.&lt;br /&gt;Me: Cool! Any idea how much it ended up costing?&lt;br /&gt;Mom: ...&lt;br /&gt;Me: Mom?&lt;br /&gt;Mom: Umm, well, we'll talk about it when you get home, I don't want to ruin the rest of your vacation.&lt;br /&gt;Me: Huh?&lt;br /&gt;Mom: Don't worry about it, you can pay us back a little at a time.&lt;br /&gt;&lt;br /&gt;[Update: It didn't turn out to be as bad as I thought it might. Still more than I would have liked, though... on the other hand, my car now startst and passes DEQ, which are both good and important things, not to mention two things they wouldn't do before spending a ton of money.]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434772481921352?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434772481921352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434772481921352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434772481921352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434772481921352'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/things-you-dont-want-to-hear-whilst-on.html' title='Things You Don&apos;t Want To Hear Whilst On Vacation, Vol 1'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112434759788215008</id><published>2005-08-17T23:45:00.000-07:00</published><updated>2005-08-17T23:46:37.886-07:00</updated><title type='text'>Notes</title><content type='html'>A bunch of posts are about to go live, and most of them were written over the last week or so. I'm just posting them in batch for convenience sake.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112434759788215008?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112434759788215008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112434759788215008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434759788215008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112434759788215008'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/08/notes.html' title='Notes'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-112235213760909518</id><published>2005-07-25T21:27:00.000-07:00</published><updated>2005-07-25T21:29:10.646-07:00</updated><title type='text'>Process vs. Development— a case of misplaced causality?</title><content type='html'>&lt;em&gt;A note about this post: a few months back, we hired a replacement for the person who'd sort of become our &lt;em&gt;de facto&lt;/em&gt; project manager. The new guy is a very friendly and competant fellow, just out of undergrad with lots of great ideas. Since I'm leaving the company in a few weeks, he asked me to write him some sort of feedback on how he's been doing. My immediate answer, of course, was that he was doing great, but he still wanted a more detailed response. 99% of what I wrote is irrelevant here (not to mention the fact that it's nobody's business but his), but there were a few paragraphs that it seemed might be interesting to others. I've made a few small edits, but please consider the rest of this to be an excerpt.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The only thing to watch out for&amp;mdash; and this is nothing specific about you &lt;em&gt;per se&lt;/em&gt;, but about the sort of job you happen to have picked up&amp;mdash; try and ensure that nobody comes to think of the processes we employ to manage our development as a replacement for the development itself. I guess what I mean is that it's easy to get caught up with lots of forms, documents, and procedures, and then to forget what we're really trying to do&amp;mdash; write software effectively and relatively painlessly. There is a very fine line between having well-designed procedures that help us coordinate our work, and having cumbersome and gratuitous "TPS Reports" that just get in the way. I don't think we're in any danger of crossing that line at the moment, but it is a constant threat, &lt;em&gt;especially when one's systems work well&lt;/em&gt;. This may sound counter-intuitive, but bear with me here:&lt;br /&gt;&lt;br /&gt;I think that there is frequently a problem of misplaced causality. Consider the following real-life, "ripped-from-the-headlines" scenario: &lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Development is in chaos, because nobody has time or procedures to organize their work and therefore can't get anything done;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Procedures to organize and schedule work are put in place, so devs can get back to work;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;The product is improved.&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;One &lt;em&gt;might&lt;/em&gt; look at the chain of events and decide that it was the procedures and schedules that improved the product, and therefore "more procedures &amp;rarr; better product", especially if one didn't know much about writing software. The developers, however, would probably say that the improvement in the product came about because they were finally able to concentrate and do their job, since they were no longer constantly fending off millions of unorganized bug reports, feature requests, and conflicting demands. Who's right? Well, I'm inclined to say that the devs clearly have the right interpretation of events, but I'm definitely biased here. In my mind, this is a classic example of confusing correlation with causality.&lt;br /&gt;&lt;br /&gt;So, basically, the best thing you can do is try and find the sweet spot where our development is organized and coordinated, but we're not having to spend more time every day dealing with the procedural overhead of our development process than actually writing code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-112235213760909518?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/112235213760909518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=112235213760909518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112235213760909518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/112235213760909518'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/07/process-vs-development-case-of.html' title='Process vs. Development&amp;mdash; a case of misplaced causality?'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13766433.post-111984846568805804</id><published>2005-06-26T20:48:00.000-07:00</published><updated>2005-06-26T22:43:08.843-07:00</updated><title type='text'>Cisco VOIP JTAPI magic</title><content type='html'>So, for a variety of reasons, work decided about two years ago to install a Cisco VOIP telephone system in our office. One of the major selling points of Cisco's system is that it allows custom Java applications to interface with it using the JTAPI (Java Telephony API). Now, anybody who has worked with this API can tell you that it is neither simple to use nor well-documented. Cisco's implementation of the API is far from complete, and their documentation is even worse than Sun's. The problem is compounded by the fact that Cisco made all sorts of interesting custom extensions to the API, but failed to provide any useful documentation or example programs. In other words, this thing's a bitch to program for. After all sorts of drama, however, we were able to figure out what we needed to know and finish our project. In the interests of saving anybody who might be doing Cisco JTAPI development some serious pain, I'd like to put up a brief description of how to do something so basic, so simple, so crucial, and so seemingly obvious that the uninitiated might think that I'm lying when I say that Cisco gives almost no clues how to do it: stream audio from your application to a phone. (Quick disclaimer: I haven't done any hacking on Cisco's phone system in about a year, so it's quite possible that the situation has improved since I used it last.)&lt;br /&gt;&lt;br /&gt;What's that you say? Surely, this would be one of the most obvious features that you'd want in an application that interfaces with a phone system, right? Think of all the phone-based applications you interact with on a daily basis&amp;mdash; voicemail, the bank's auto-teller, and so on&amp;mdash; that rely on a computer program playing audio to your phone. Pretty much any application that has to interact with a user in some way over the phone relies on media streaming. Luckily, the JTAPI contains a whole package of classes that provide these functions, so clearly the designers of the API knew that it was something people would want to do.&lt;br /&gt;&lt;br /&gt;Cisco, however, did not see fit to implement those handy functions (the one thing that Cisco actually &lt;em&gt;does&lt;/em&gt; document well is what is and is not implemented). Its documentation is, in fact, very sparse on the subject of just how somebody would go about streaming media over its phone system using Java. There are a few tantalizingly-named classes in the "com.cisco" section of their JTAPI implementation's Javadocs (MediaTerminal, etc), but there is basically no documentation on how to go about using them. No sample code, nothing. I know, I know&amp;mdash; I'm crazy, to think that they'd provide sample code demonstrating how to do one of the (presumably) most common things you'd want to do with their phone system. :-)&lt;br /&gt;&lt;br /&gt;After banging our heads against the wall for a little while, we noticed a small paragraph buried deep within the Cisco JTAPI developer's guide explaining why. See, it turns out that Cisco thinks that, contrary to the API designer's point of view, you're not actually supposed to use the JTAPI to handle the audio transport&amp;mdash; for that, you have to use something else. Cisco doesn't tell you what else to use, however. Here's where things get &lt;em&gt;really&lt;/em&gt; fun.&lt;br /&gt;&lt;br /&gt;See, Cisco VOIP systems use the RTP (Real-Time Protocol) to handle audio transport. RTP is a UDP-based network protocol that's designed to handle all sorts of media streaming. It's a huge, gnarly, complex mess, but works very well. It turns out that if you want to send audio across your Cisco phone system, your code has to handle all of the transport. The good news is that doing this in Java is not that big of a deal, theoretically speaking, since Sun provides a massive library of classes called the Java Media Framework (JMF). The JMF is designed to handle pretty much anything you'd ever care to do with any sort of time-based media. Want to write a shoutcast-style server in Java? The JMF can do that. Want to write video-conferencing software? JMF's got you covered.&lt;br /&gt;&lt;br /&gt;The bad news is that, like all powerful libraries that manage extremely difficult and complex tasks, the JMF is a little bit tricky to use. OK, it's worse than that. It's &lt;em&gt;really&lt;/em&gt; tricky to use. And the documentation's not great. OK, ok, you got me&amp;mdash; the documentation &lt;em&gt;totally&lt;/em&gt; sucks. Luckily, however, our problem&amp;mdash; how to stream audio over RTP to a particular IP address&amp;mdash; is just about the simplest thing that it is possible to do using the JMF. From the API's standpoint, what we're trying to do is a little bit like sandblasting a soup cracker. Once you've figured out how to work with the JMF, there is really only one tricky thing needed to get it to work with the Cisco VOIP system.&lt;br /&gt;&lt;br /&gt;Before I tell you all about what that tricky step is, though, let's go over the general process for media streaming:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Use JTAPI to somehow connect your application's code with a particular call.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Determine the target endpoint's IP address and port number.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Initiate an RTP session with that address/port&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Transmit your media.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Do at least one of the following:&lt;br /&gt;  &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Catch when your playback is complete, and take appropriate action&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Catch when the endpoint is no longer active (i.e., the user hangs up) and take appropriate action&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Catch user input events (i.e., DTMF) and take appropriate action&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Do whatever it is your application does&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Steps 1, 2, and 5.2 and 5.3 are actually fairly easy to figure out, if you're willing to send a ton of time digging through Cisco's JTAPI documentation. It's a pain, and is way harder than it needs to be, and will require lots of experimentation and trial-and-error, but it is at least possible. Steps 3, 4, and 5.1 are doable if you follow a similar protocol with the JMF docs, but, as it turns out, &lt;em&gt;only&lt;/em&gt; if you happen to stumble across some serious magic.&lt;br /&gt;&lt;br /&gt;See, doing any kind of audio streaming involves selecting a codec. When you set up your Cisco VOIP system, the administrator made some codec-related decisions. Most likely, they decided on some variant of &amp;mu;LAW. This is important because your JMF code will need to match up exactly with what the phone is expecting. Otherwise, bits will arrive at the phone, but no sound will come out. That's what held us up for about two weeks- we'd gotten code to catch that a call was happening, figure out the endpoint address &amp; port info, set up a connection, and stream audio. We knew the bits were hitting the phone&amp;mdash; the Cisco 7940 handset has a network diagnostic mode where it can tell you how many packets have been sent or received by the phone, and the Rx number would increment as long as playback was taking place and stop as soon as the playback did. &lt;br /&gt;&lt;br /&gt;I knew it had to be some sort of codec problem, but I couldn't imagine what it might be. I'd been careful to match my code's codec setup to what I knew the network was set to. Finally, I was able to get in touch with somebody who had already solved this problem. What he told me was that we needed to configure the packet size&amp;mdash; how many milliseconds of audio would go in each packet over the network. Doing this meant delving a bit deeper into the JMF than we had been, and doing some pretty crazy custom codec configuration. The final solution involved a "magic number"... I still have no idea where this guy got it from, but it worked perfectly. I manually set my packets to 160ms in length, and suddenly my wav file was playing out of my handset. I swore at the time that I would get this information to somewhere publicly accessible on the internet so that nobody would ever have to spend two months of their lives banging away at such a stupid problem, so here it is. To give the code some context: in the JMF, the basic flow of audio playback is like this:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Instantiate a Processor object&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Give it a source and a sink&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Configure it by invoking its configure() method&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Start playback&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;The following code snippet can be called in your event handler for the ConfigureUpdate event that will fire as part of the configuration step. It is mostly self contained, but there is a reference to an instance-scope Processor object called mProcessor. Copy-and-pasters, beware. :-)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;00001:    &lt;span style="color: #0000FF"&gt;private&lt;/span&gt; &lt;span style="color: #33CC00"&gt;boolean&lt;/span&gt; &lt;span style="color: #000000"&gt;setTracksAndCodec&lt;/span&gt;() &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00002:  &lt;br /&gt;00003:       &lt;span style="color: #9A1900"&gt;// will only work for RTP &lt;/span&gt;&lt;br /&gt;00004:          ContentDescriptor content &lt;br /&gt;00005:                  = &lt;span style="color: #0000FF"&gt;new&lt;/span&gt; &lt;span style="color: #000000"&gt;FileTypeDescriptor&lt;/span&gt;(FileTypeDescriptor.RAW_RTP); &lt;br /&gt;00006:       mProcessor.&lt;span style="color: #000000"&gt;setContentDescriptor&lt;/span&gt;(content); &lt;br /&gt;00007:  &lt;br /&gt;00008:       TrackControl track[] = mProcessor.&lt;span style="color: #000000"&gt;getTrackControls&lt;/span&gt;(); &lt;br /&gt;00009:  &lt;br /&gt;00010:       &lt;span style="color: #33CC00"&gt;boolean&lt;/span&gt; encodingOk = &lt;span style="color: #0000FF"&gt;false&lt;/span&gt;; &lt;br /&gt;00011:  &lt;br /&gt;00012:       &lt;span style="color: #9A1900"&gt;// Go through the tracks and try to program one of them to &lt;/span&gt;&lt;br /&gt;00013:       &lt;span style="color: #9A1900"&gt;// output ulaw data. &lt;/span&gt;&lt;br /&gt;00014:       &lt;span style="color: #0000FF"&gt;for&lt;/span&gt; (&lt;span style="color: #33CC00"&gt;int&lt;/span&gt; i = &lt;span style="color: #CC33CC"&gt;0&lt;/span&gt;; i &amp;lt; track.length; i++) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00015:  &lt;br /&gt;00016:          &lt;span style="color: #0000FF"&gt;if&lt;/span&gt; (track[i].&lt;span style="color: #000000"&gt;isEnabled&lt;/span&gt;()) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00017:  &lt;br /&gt;00018:             Codec[] ciscoCodecChain = &lt;span style="color: #0000FF"&gt;new&lt;/span&gt; Codec[&lt;span style="color: #CC33CC"&gt;3&lt;/span&gt;]; &lt;br /&gt;00019:  &lt;br /&gt;00020:             ciscoCodecChain[&lt;span style="color: #CC33CC"&gt;0&lt;/span&gt;] = &lt;span style="color: #0000FF"&gt;new&lt;/span&gt; &lt;span style="color: #000000"&gt;RCModule&lt;/span&gt;(); &lt;br /&gt;00021:             ciscoCodecChain[&lt;span style="color: #CC33CC"&gt;1&lt;/span&gt;] = &lt;span style="color: #0000FF"&gt;new&lt;/span&gt; &lt;span style="color: #000000"&gt;JavaEncoder&lt;/span&gt;(); &lt;br /&gt;00022:             ciscoCodecChain[&lt;span style="color: #CC33CC"&gt;2&lt;/span&gt;] = &lt;span style="color: #0000FF"&gt;new&lt;/span&gt; &lt;span style="color: #000000"&gt;Packetizer&lt;/span&gt;(); &lt;br /&gt;00023:             ((Packetizer) ciscoCodecChain[&lt;span style="color: #CC33CC"&gt;2&lt;/span&gt;]).&lt;span style="color: #000000"&gt;setPacketSize&lt;/span&gt;(&lt;span style="color: #CC33CC"&gt;160&lt;/span&gt;);  &lt;span style="color: #9A1900"&gt;// the magic happens here!!!&lt;/span&gt;&lt;br /&gt;00024:             &lt;span style="color: #0000FF"&gt;try&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00025:                track[i].&lt;span style="color: #000000"&gt;setCodecChain&lt;/span&gt;(ciscoCodecChain); &lt;br /&gt;00026:             &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #0000FF"&gt;catch&lt;/span&gt; (Exception ex) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00027:                System.out.&lt;span style="color: #000000"&gt;println&lt;/span&gt;(&lt;span style="color: #FF0000"&gt;"Couldn't set codec chain: "&lt;/span&gt; + ex); &lt;br /&gt;00028:                System.&lt;span style="color: #000000"&gt;exit&lt;/span&gt;(-&lt;span style="color: #CC33CC"&gt;1&lt;/span&gt;); &lt;br /&gt;00029:             &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00030:  &lt;br /&gt;00031:             Format[] supportedFormats = track[i].&lt;span style="color: #000000"&gt;getSupportedFormats&lt;/span&gt;(); &lt;br /&gt;00032:  &lt;br /&gt;00033:             &lt;span style="color: #33CC00"&gt;int&lt;/span&gt; formatToSet = -&lt;span style="color: #CC33CC"&gt;1&lt;/span&gt;; &lt;br /&gt;00034:  &lt;br /&gt;00035:             &lt;span style="color: #0000FF"&gt;for&lt;/span&gt; (&lt;span style="color: #33CC00"&gt;int&lt;/span&gt; j = &lt;span style="color: #CC33CC"&gt;0&lt;/span&gt;; j &amp;lt; supportedFormats.length; j++) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00036:                &lt;span style="color: #0000FF"&gt;if&lt;/span&gt; (supportedFormats[j].&lt;span style="color: #000000"&gt;toString&lt;/span&gt;().&lt;span style="color: #000000"&gt;indexOf&lt;/span&gt;(&lt;span style="color: #FF0000"&gt;"ULAW/rtp"&lt;/span&gt;) &amp;gt;= &lt;span style="color: #CC33CC"&gt;0&lt;/span&gt;) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00037:                   formatToSet = j; &lt;br /&gt;00038:                &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00039:             &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00040:  &lt;br /&gt;00041:             &lt;span style="color: #0000FF"&gt;if&lt;/span&gt; (formatToSet &amp;gt;= &lt;span style="color: #CC33CC"&gt;0&lt;/span&gt;) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00042:                track[i].&lt;span style="color: #000000"&gt;setFormat&lt;/span&gt;(supportedFormats[formatToSet]); &lt;br /&gt;00043:  &lt;br /&gt;00044:                encodingOk = &lt;span style="color: #0000FF"&gt;true&lt;/span&gt;; &lt;br /&gt;00045:             &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #0000FF"&gt;else&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00046:                track[i].&lt;span style="color: #000000"&gt;setEnabled&lt;/span&gt;(&lt;span style="color: #0000FF"&gt;false&lt;/span&gt;); &lt;br /&gt;00047:             &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00048:  &lt;br /&gt;00049:          &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00050:       &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00051:  &lt;br /&gt;00052:       &lt;span style="color: #0000FF"&gt;if&lt;/span&gt; (encodingOk) &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00053:          &lt;span style="color: #0000FF"&gt;return&lt;/span&gt; &lt;span style="color: #0000FF"&gt;true&lt;/span&gt;; &lt;br /&gt;00054:       &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #0000FF"&gt;else&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt; &lt;br /&gt;00055:          System.out.&lt;span style="color: #000000"&gt;println&lt;/span&gt;(&lt;span style="color: #FF0000"&gt;"Couldn't program any tracks, quitting."&lt;/span&gt;); &lt;br /&gt;00056:          &lt;span style="color: #0000FF"&gt;return&lt;/span&gt; &lt;span style="color: #0000FF"&gt;false&lt;/span&gt;; &lt;br /&gt;00057:       &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;00058:    &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, there you have it. I know this is kind of an odd thing to start off a blog with, but it seemed appropriate. It falls squarely under the banner of "Stupid things I figured out so that you don't have to". If just one person out there is spared the weeks of pain caused by this stupid problem, this post will have done its job. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13766433-111984846568805804?l=bedrickblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bedrickblog.blogspot.com/feeds/111984846568805804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13766433&amp;postID=111984846568805804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/111984846568805804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13766433/posts/default/111984846568805804'/><link rel='alternate' type='text/html' href='http://bedrickblog.blogspot.com/2005/06/cisco-voip-jtapi-magic.html' title='Cisco VOIP JTAPI magic'/><author><name>steve</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
