Sunday, December 20, 2009

Howard Bloom: Climate Change Is Nature's Way

We've been deceived by a stroke of luck. In the two million years during which we climbed from stone-tool wielding Homo erectus with sloping brows to high-foreheaded Homo urbanis, man the inventor of the city, we underwent 60 glaciations, 60 ice ages. And in the 120,000 years since we emerged in our current physiological shape as Homo sapiens, we've lived through 20 sudden global warmings. In most of those, temperatures have shot up by as much as 18 degrees within a mere 20 years.

via Howard Bloom: Climate Change Is Nature's Way - WSJ.com.

Saturday, December 19, 2009

Eclipse Galileo on Ubuntu 9.10

If you're running eclipse galileo SR1 on linux along with ubuntu 9.10 (karmic koala), then you MUST launch the eclipse script with GDK_NATIVE_WINDOWS=1 set.

Monday, December 14, 2009

Change Blindness

Change blindness. One of the many ways our brain is so damned complex.

Friday, December 4, 2009

How to tell if your CPU is 32 or 64 bit

If you're just interested in whether the currently running system is 32 or 64 bit, then 'uname -m' will tell you either i686 or x86_64 depending on whether you have 32 or 64 bit cpu.

Unfortunately if you want to know if the system *could* be 64 bit, you need to check the cpu flags. The flag 'rm' means its 16 bit, 'tm' means 32 bit, and 'lm' is 64 bit.

`grep flags /proc/cpuinfo`

rm: real mode, 16 bit

tm: transparent mode, 32 bit

lm: long mode, 64 bit

Wednesday, December 2, 2009

Wednesday, November 25, 2009

Queen of the road

image

And baby

Mobile blogging

Now that my kind wife has reenabled my mobile internet for me, it's time to try out mobile wordpress again.

Tuesday, November 24, 2009

Mobile blogging

Now that my kind wife has reenabled my mobile internet for me, it's time to try out mobile wordpress again.

Friday, November 20, 2009

Microsoft Bing Censors Worldwide for China

Not that we need more convincing that Microsoft is run by a bunch of pragmatic douchebags, but...


Boycott Microsoft Bing

By NICHOLAS KRISTOF

Microsoft apparently doesn’t want to pursue the Google solution of having separate sites – one that produces generally legitimate results (google.com) and another within China that blatantly censors (google.cn). Instead, Bing figured it would have one site and just censor all the results in simplified Chinese characters. It then compounded the problem by dissembling and disguising its policy. That’s craven and embarrassing, it betrays the integrity of Microsoft searches, and for me it’s a reason to boycott Bing.

Thursday, November 19, 2009

USB Scale Hacking

A while ago I purchased some Radio Shack USB scales on clearance for $5 each. I had always intended to get around to futzing with them but haven't until just last night. Linux made it way too easy.

Plugging it in, I see the device identifies itself as some quasi-proprietary HID device.

Bus 002 Device 008: ID 2233:6323 RadioShack Corporation USB Electronic Scale
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x2233 RadioShack Corporation
idProduct 0x6323 USB Electronic Scale
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
** UNRECOGNIZED: 09 21 10 01 00 01 22 22 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10



Graciously, Linux hooked it up as a raw hid device...


usb 2-1: new low speed USB device using ohci_hcd and address 8
usb 2-1: configuration #1 chosen from 1 choice
generic-usb 0003:2233:6323.0006: hiddev99,hidraw4: USB HID v1.10
Device [RadioShack Corporation USB Electronic Scale]
on usb-0000:00:0b.0-1/input0


I decided to have a peek at what it output:


caskey@arnold:~$ sudo cat /dev/hidraw4 |hexdump -C
00000000 ab 12 13 81 32 a0 e0 d5 ab 12 13 81 32 a0 e0 d5 |....2.......2...|
00000010 ab 12 13 81 32 a0 e0 d5 ab 12 13 81 32 a0 e0 d6 |....2.......2...|
^C


Looks like 8 bytes repeating over and over again about every 250ms. The only thing that changes is the last two bytes. Just guessing, I wrote a little perl program to pull out those two bytes and interpret them as a signed short. I tried it both little and big endian and the numbers ramp up smoothly when I treat it as a big endian number.

Zero appears to hover around -7978, and if I subtract that out, I get a value that hangs around zero, then goes up when I put something on it. Unfortunately I don't have any calibrated weights so I randomly placed my leatherman and a post-it note to see how sensitive it was.

My leatherman registered at "383" units, while a post-it note was between 1 and 2 units. The data is noisy as the values bounce back and forth by +/-2 or so units. I worked a bit of smoothing into my perl program and tried a few more things.

A dead 7ah SLA battery came in at 6472/6473 units, and my coffee cup full of pens was 2103 units. I really wanted to know what these units were. Therefore I tried to think of what I had which would have a reliable weight. After a bit of googling, I discovered that a US nickel nominally weights 5 grams. Since it is late at night and my wife's asleep, I raided her coin jar for nickels.

Obviously any given nickel is likely to weigh +/- some amount, so I took 10 of them and placed them on the scale. They came out to exactly 128 units. *bing* the light goes on. I fished out another 10 and it came in at 258. That was some pretty strong evidence that the two bytes are 100-grams and 1/256th of 100 grams each. I took the number and modified my program to print out the "units" divided by 256 and adjusted to Kg.

My leatherman now came out as 0.149 Kg, and the twenty nickels coins came out to 0.1009 Kg. Darn close in my book. I'm sure this scale is no good for such fine measurements, but I'm happy.

After all that, I remembered that I had a 1Lb weight from an old exercise cuff lying in a shoebox. I put that on my scale and it read out:


W: (-6815/112.787110749634) '1163' -> 1161.2 0.4535 Kg or 0.99 Lbs
W: (-6817/118.757755212152) '1161' -> 1161.1 0.4535 Kg or 0.99 Lbs
W: (-6816/124.439867451545) '1162' -> 1161.1 0.4535 Kg or 0.99 Lbs
W: (-6815/129.847874078967) '1163' -> 1161.2 0.4535 Kg or 0.99 Lbs


And in the world of cheap USB scales, that's perfectly fine for me.

Oh, and here's the really dirty perl code I used:


caskey@arnold:~$ sudo cat /dev/hidraw4 | ./scalecat
caskey@arnold:~$ cat scalecat
#!/usr/bin/perl

my $ALP = 0.1;
my $CORR = -7978;
my $MOVINGAVG = 0.0;
my @weight = (0, 0, 0, 0, 0, );
my $wta = 0;
while(1) {
read STDIN, $foo, 8;
my($a,$b,$c,$d,$e,$f,$w) = unpack("C6s>", $foo);
my($wt) = $w - $CORR;
$MOVINGAVG = (0.95 * $MOVINGAVG) + (0.01 * $wt);
if(int($MOVINGAVG) == $wt && $CORR != $w) {
print "*** ZEROING ***\n";
$CORR = $w;
}
if(($wta-$wt)**2 < 9) {
$wta= (int(10*(($wt * ($ALP)) + ($wta *(1.0-$ALP)))))/10;
} else {
print "+++ SKIP +++\n";
$wta = $wt;
}
my $kg = (int(($wta/256.0)*1000))/10000;
my $lb = (int(($kg/0.45359237)*100))/100;
print "W: ($w/$MOVINGAVG) '$wt' -> $wta $kg Kg or $lb Lbs\n";
}


I love it when projects are quick and easy. This was nothing like trying to get the Griffin Powermate to work a few years ago. Linux does the heavy lifting and presents me with the data in a nice easy to play with format.

Tuesday, November 3, 2009

NY Times 100 Things Restaurant Staffers Should Never Do

Amen to all 100. I don't care who you are, I didn't come for the color, I can eat at home for 1/30th the cost and get all the color and excitement I need.


  1. Do not let anyone enter the restaurant without a warm greeting.

  2. Do not make a singleton feel bad. Do not say, “Are you waiting for someone?” Ask for a reservation. Ask if he or she would like to sit at the bar.
  3. Never refuse to seat three guests because a fourth has not yet arrived.



the list.

Wednesday, September 30, 2009

Bastiat: Economic Sophisms

Everyone should peruse the works of Bastiat. I highly recommend you read up on some very simple explanations of economics.

Sunday, July 26, 2009

T-Mobile Removes Support For T-Mobile VPN on G1

For most of 2009, I've been happily using my T-Mobile VPN service on my new phone, however as of this month T-Mobile has decided to BLOCK my device from their end based solely on the manufacturer of the unit, UNLESS I pay another $25 a month on top of the $20/month I'm already paying for Internet access. I think a 125% increase in my Internet access cost is absolutely ridiculous. Nothing has changed except they decided that if you own a G1 you must be dumb enough to pay more than double for your Internet.

I've just confirmed with technical support that T-Mobile has decided that ONLY if you have a G1 (or a Dev1 in my case), you MUST pay for the dedicated $25/month plan for JUST that device (in addition to your existing data plan that your *other* devices use). I already pay for a data plan that I use between my pcmcia adapter, my Motorola phones (Z8 and V3) and (until now) my G1. As a developer, having Internet access is more or less a requirement, and being able to connect to the Internet while mobile has become a natural extension of my work week.

T-Mobile's own documentation encourages you to use VPNs to protect your data, but if you get their service designed to support VPNs, you may one day be screwed by them when they decide that they didn't mean on *that* device, only on the others.

This is total bullshit by T-Mobile. I've been a loyal and happy customer of theirs for many years and to suddenly screw me like this is ridiculous. Please take your collective heads out of your asses and realize that it's customers like myself that drive dozens of new customers your way each year as WE are the ones consulted by friends and family as to what carrier and product to purchase.

TMobile VPN and the G1

I've been using my Android Dev-1 phone on T-Mobile for a while now. I've had the T-Mobile VPN service which is useful if you need to do non-trivial connectivity things with firewalls and VPN software. For some reason, in the past few days when I try to go online, I get a blocking web page that simply says "Your data plan is not compatible with the G1" and then tries to sell me an "upgrade".

I checked my APN settings and they're all correct, I'm going to see if my Internet still works in my other phones, or if all my mobile Internet is broken. I'm going to be pissed if T-Mobile is playing shenanigans with the G1.

Update:

I checked with my Motorola Rizr Z8 and Internet works just fine. That means T-Mobile has done something "special" for G1 phones. Yeah, that's bullshit.

Friday, July 24, 2009

Bottomless Well and Prius Owners

There's a great book called The Bottomless Well, appropriately subtitled "The Twilight of Fuel, The Virtue of Waste, and Why We Will Never Run Out Of Energy".

This great article about hybrid owners driving more and getting more tickets dovetails nicely with the book's premise.

The firm looked at several common use categories used by insurers—including "pleasure use" (everyday driving) and "high commute" (commuting more than 15 miles a day). The long commuters traveled about the same distance whether they drove a hybrid or not, but the everyday drivers of hybrids drove about 25 percent (2,000 miles) farther than those of non-hybrids—largely offsetting any petroleum savings.


A real killer is the 65% higher moving violation rate per mile driven. Sorry, but in Los Angeles, it's hard to think of prius owners as much more than smug cocksuckers.

History has shown that for every technological move that increases efficiency, consumption goes up, not down. People are willing to spend a certain amount of their budget (be it money, or perceived eco-impact, or whatever.) on certain things, and if you make it cheaper, they just use more.

Sunday, July 19, 2009

Pelikan souverän m420

I really need to stop reading the reviews of pens over at Fountain Pen Network. It's killing me. The Pelikan Souverän m420 is beautiful, but damn why does it have to be so expensive.

pelikan-souveran-m420-fountain-pen

I really need to look at the more economical series, like the m215. It's very modern and sleek, plus it costs about a quarter of the 420.

pelikan-m215-fountain-pen

Maybe I'm becoming a Pelikan fanboy. I hope not.

Saturday, July 18, 2009

Water plant tour

wpid-1240333272216.jpg

A field trip to the water plant included some "big truck" time.

Thursday, July 16, 2009

USUK means penis too

You learn something new every day and I had no idea that USUK (i.e., you suck), also means penis in Inuit.

Wednesday, July 15, 2009

Souveran M800 Demonstrator

[caption id="attachment_219" align="alignleft" width="250" caption="Photo of the Pelikan M800 Demonstrator with cap off"]Photo of the Pelikan M800 Demonstrator with cap off[/caption] I want this pen so badly. The sad thing is that it is a special/limited edition so eventually it will sell out. $350 is a lot to pay for a pen though.
With luck, I'll have some spending cash later in the year and they'll still be available.

It comes in two editions, one with engraving and one without. I think I like the non-engraved one better, but it's a real close call. The engraved one is far more 'demonstrator-ish'. I don't think I'll be using it for demonstrating as much as just writing when I'm feeling particularly technical.

On the other hand, my birthday is coming up... hint, hint. I do think I'm not pushing myself hard enough, I've found too much time to spend lusting after pens. The Pelikano Jr., however, is an awesome every day writer and knock-about pen. Highly recommended.

Pelikan Pens - Souveran M800 Demonstrator 964114.

Man Dies in Vat of Chocolate

Does this candy taste strange to you?

(New Jersey) FDA monitors chocolate factory after death. One day after a worker at a Camden factory fell to his death in a vat of chocolate, federal authorities were at the facility on July 9 to make sure the company did not ship chocolate that had come into contact with the victim. The company, Lyons & Sons, had not shipped the chocolate the victim fell into, and will allow Food and Drug Administration officials to monitor its destruction, said an FDA spokeswoman.

On July 8, a man fell from a nine-foot platform as he tossed blocks of cocoa extract into a 120-degree tank that was mixing and melting the material into Hershey’s chocolate, authorities said. Inside the vat, he was hit with a mechanical paddle, and rescue attempts were unsuccessful.


At least they're destroying the chocolate. Upton Sinclair would be happy.

Monday, July 13, 2009

Heroes Of Newerth, Linux Games Rock

I recently tried the beta of Heroes Of Newerth and it was very fun. Not being a Warcraft 3 player I was completely confused by the mechanics and gameplay, but I was able to go a few rounds online.

The best part, hoewver, is that they are developing a native Linux, Mac and PC version. Other than some configuration glitches, on one quirky machine (three heads, 5760x1200), it ran just fine on the two systems I tried.

I hope this bodes well for Linux gaming in the future.

Saturday, July 4, 2009

Eclipse Ganymede Cannot connect to keystore.

If you're using eclipse and find yourself getting the following errors:

Cannot connect to keystore.
java.io.IOException: This trust engine is read only.


It's probably related to certificate installs (such as that needed to complete the AWS Toolkit for Eclipse install).

After doing that, try running keytool -list, if you get an IOException about an invalid keystore, then delete ~/.keystore
The fix is easy, don't use the ganymede-SDK distribution, start with the jee distribution.

Here's what I tried that didn't work:

Run sudo update-alternatives --all and make sure you pick all the same sun jvm alternatives for your JDK toolchain. I had a few of mine mismatched because I upgraded from Ubuntu 6.04 to 8.04 to Jaunty.

That didn't solve the problem, so I tried moving my ~/.eclipse directory out of the way. No dice. Next, I moved my workspace's .metadata directory aside. That didn't do it either.

I then tried purging any non-sun jvms, then running with both java-5 and java-6 jvms using new workspaces. Everything produced the same error message.

What finally worked: discarding the eclipse-SDK distribution and using the eclipse-jee distribution. Something is definitely screwy with the SDK one.

Monday, June 22, 2009

Data Trumps Guesses

Jakob Nielson's Alertbox has been one of the best sites on web usability for many, many years. A recent post does a nice job of showing just how pointless it is to argue in a meeting about what design is probably the best.

testing just 2 users per design reduced the probability of being wrong from 50% to 24% — cutting it in half.


Quit debating what works and go gather DATA. Then, go where the data leads you. Anything else is examining chicken entrails.

Monday, June 15, 2009

What is great blogging

Last year Dave Weiner did a great job of defining what makes for good blogging. The criteria don't just apply to blogging, but any writing in general.

People talking about things they know about, not just expressing opinions about things they are not experts in (nothing wrong with that, of course).


Of course, Joel Spolsky, who I think is great, rants about how anecdotes are not science. This is true, but what Joel misses is that popular-science writing should be considered examples of good journalism, not good science. If the observations and areas of study are new and interesting, then by all means someone who is an expert at digesting and presenting the information (a journalist) should help us all understand it.

Friday, June 12, 2009

GPG for data at rest. TLS for data in motion

It takes a while to read, but it's very much worth it. If you still think you should be writing your own crypto code, or even using native crypto libraries, you are DOING IT WRONG.

P.S. Same goes for parsers! Learn to use ANTLR or any other of the hundreds of parser generators out there.

Sunday, June 7, 2009

Eclipse upgrade

I was trying to get eclipse to install an update and it just wouldn't do it. Specifically the m2eclipse plugin. I kept getting errors about being unable to fix a dependency.

"maven eclipse can not find a solution 3.4.2.M20090204-0800"

Turns out several things help. 1) turn on every site as an available update site, 2) refresh everything, 3) starting at the bottom of the resolve dialogue begin unchecking items one at a time until the error goes away (yeah, obvious), 4) starting at the bottom again, turn things back on to ensure you get everything you need.

Friday, May 15, 2009

I'll Buy That For A Dollar

Anyone can do the lame robocop and a unicorn thing, but unicorns are so 90's when robocop is clearly a hardocore 80's icon. Therefore he is better associated with rap music. The video below manages to pack the entire movie into a single 10 minute rap music-video.

Thursday, May 14, 2009

Talking and Driving

Over the past years I've driven many, many miles on Los Angeles freeways in conditions of heavy to light traffic. In that time I've seen lots of different, interesting, and sometimes even scary things being done on the road. Today was something I've never, ever seen before. I got to spend about 15 minutes in traffic going through downtown behind a couple in a car having a very animated discussion. Their car had a huge un-tinted back window which afforded me an excellent view into their car.

The discussion went back and forth until finally one participant picked up the newspaper and defiantly read it while facing the side window away from the driver. Normally that wouldn't noteworthy or interesting, but what made this conversation special was that the participants were deaf and communicating in sign language. The passenger had an easy time of it, of course, but the driver was essentially talking with one hand while trying to drive and watch the passenger's replies. Needless to say the passenger was having a hard time getting their opinions in as the driver spent much time looking forward while continuing to talk. This precluded the driver from seeing the passenger's attempts to interrupt.

The world is a fascinating place.

Sunday, January 25, 2009

Obama Fisting?

This just in, Fisting considered affectionate.



P.S. Wikipedia has become the de-facto source of information for the 21st century.

Tuesday, January 13, 2009

Synaptics Multi-Touch Support in Linux

Wow, I didn't know that you could enable multi-touch support using the synaptics driver in linux. I really need to try this out on my laptop. Out of the box running ubuntu 8.04 it does the edge scrolling but sometimes that kicks in when I don't want it to, so being able to tweak these things would be awesome.

Sunday, January 11, 2009

Ryan's Steak House Macaroni and Beef

Found on the internet as a Best of Craigslist post.

A couple of weeks ago we decided to cruise out to Ryan's Steakhouse for dinner. It was a Wednesday night which means that macaroni and beef was on the hot bar, indeed the only night of the week that it is served. Wednesday night is also kid's night at Ryan's, complete with Dizzy the Clown wandering from table to table entertaining the little bastards. It may seem that the events about to be told have little connection to those two circumstances, but all will be clear in a moment.

We went through the line and placed our orders for the all-you-can-eat hot bar then sat down as far away from the front of the restaurant as possible in order to keep the density of kids down a bit. Then I started my move to the hot bar. Plate after plate of macaroni and beef were consumed that evening, I tell you -- in all, four heaping plates of the pseudo-Italian ambrosia were shoved into my belly. I was sated. Perhaps a bit too much, however.

I had not really been feeling well all day, what with a bit of gas and such. By the time I had eaten four overwhelmed plates of food, I was in real trouble. There was so much pressure on my diaphragm that I was having trouble breathing. At the same time, the downward pressure was building. At first, I thought it was only gas which could have been passed in batches right at the table without to much concern.

Unfortunately, that was not to be. After a minute or so it was clear that I was dealing with explosive diarrhea. It's amazing how grease can make its way through your intestines far faster than the food which spawned the grease to begin with, but I digress...

Entering, I saw two sinks immediately inside the door, two urinals just to the right of the sinks, and two toilet stalls against the back wall. One of them was a handicapped bathroom. Now, normally I would have gone to the handicapped stall since I like to stretch out a bit when I take a good shit but in this case, the door lock was broken and the only thing I hate worse than my wife telling me to stop cutting my toenails with a pair of diagonal wire cutters is having someone walk in on me while I am taking a shit. I went to the normal stall. In retrospect, I probably should have gone to the large, handicapped stall even though the door would not lock because that bit of time lost in making the stall switch proved to be a bit too long under the circumstances. By the time I had walked into the regular stall, the pressure on my ass was reaching Biblical proportions. I began "The Move."

For those women who may be reading this, let me take a moment to explain. "The Move." Men know exactly what their bowels are up to at any given second. And when the time comes to empty the cache, a sequence of physiological events occur that can not be stopped under any circumstances. There is a move men make that involves simultaneously approaching the toilet, beginning the body turn to position ones ass toward said toilet, hooking ones fingers into ones waistline, and pulling down the pants while beginning the squat at the same time. It is a very fluid motion that, when performed properly, results in the flawless expulsion of shit at the exact same second that ones ass is properly placed on the toilet seat. Done properly, it even assures that the choad is properly inserted into the front rim of the toilet in the event that the piss stream lets loose at the same time; it is truly a picture of coordination rivaling that of a ballet dancer.

I was about half-way into "The Move" when I looked down at the floor and saw a pile of vomit that had been previously expelled by one of those little bastards attending kids night; it was mounded up in the corner so I did not notice it when I had first walked into the stall. Normally, I would not have been bothered by such a thing, but I had eaten so much and the pressure upward was so intense, that I hit a rarely experienced gag reflex. And once that reflex started, combined with the intense pressure upward caused by the bloated stomach, four plates of macaroni and beef started coming up for a rematch. What happened next was so quick that the exact sequence of events are a bit fuzzy, but I will try to reconstruct them as best I can.

In that moment of impending projectile vomiting, my attention was diverted from the goings-on at the other end. To put a freeze frame on the situation, I was half crouched down to the toilet, pants pulled down to my knees, with a load of vomit coming up my esophagus. Now, most of you know that vomiting takes precedence over shit no matter what is about to come slamming out of your ass. It is apparently an evolutionary thing since shitting will not kill you, but vomiting takes a presence of mind to accomplish so that you do not aspirate any food into the bronchial tubes and perhaps choke to death. My attention was thus diverted. At that very split second, my ass exploded in what can only be described as a wake...you know, as in a newspaper headline along the lines of "30,000 Killed In wake of Typhoon Fifi" or something similar. In what seemed to be most suitably measured in cubic feet, an enormous plug of shit the consistency of thick mud with embedded pockets of greasy liquid came flying out of my ass. But remember, I was only half-way down on the toilet at that moment. The shit wave was of such force and of just such an angle in relation to the back curve of the toilet seat that it ricocheted off the back of the seat and slammed into the wall at an angle of incidence equal to the angle at which it initially hit the toilet seat. Then I sat down. Recall that when that event occurred, I was already half-way to sitting anyway and had
actually reached the point of no return. I have always considered myself as relatively stable gravitationally, but when you get beyond a certain point, you're going down no matter how limber you may be. Needless to say, the shitwave, though of considerable force, was not so sufficient so as to completely glance off the toilet seat and deposit itself on the walls, unlike what you would see when hitting a puddle with a high-pressure water hose; even though you throw water at the puddle, the puddle gets moved and no water is left to re-form a puddle. There was a significant amount of shit remaining on about one third of the seat rim which I had now just collapsed upon. Now, back to the vomit...

While all the shitting was going on, the vomit was still on its way up. By the time I had actually collapsed on the toilet, my mouth had filled up with a goodly portion of the macaroni and beef I had just consumed. OK, so what does the human body instinctively do when vomiting? One bends over. So I bent over. I was still sitting on the toilet, though. Therefore, bending over resulted in me placing my head above my now slightly opened legs, positioned in between my knees and waist. Also directly above my pants which were now pulled down to a point just midway between my knees and my ankles. Oh, did I mention that I was wearing not just pants, but sweat pants with elastic on the ankles. In one mighty push, some three pounds of macaroni and beef, two or three Cokes, and a couple of Big, Fat Yeast Rolls were deposited in my pants...on the inside...with no ready exit at the bottom down by my feet. In the next several seconds, there were a handful of farts, a couple of turds, and the event ended, yet I was now sitting there with my pants full of vomit, my back covered in shit that had bounced off the toilet, spattered on three ceramic tiled walls to a height of about five feet, and still had enough force to come back at me, covering the back of my shirt with droplets of liquidshit. All while thick shit was spread all over my ass in a ring curiously in the shape of a toilet seat. And there was no fucking toilet paper.

What could I do but laugh. I must have sounded like a complete maniac to the guy who then wandered into the bathroom. He actually asked if I was OK since I was laughing so hard I must have sounded like I was crying hysterically. I calmed down just enough to ask him if he would get the manager. And told him to have the manager bring some toilet paper. When the manager walked in, he brought the toilet paper with him, but in no way was prepared for what happened next. I simply told him that there was no way I was going to explain what was happening in the stall, but that I needed several wet towels and I needed him to go ask my wife to come help me. I told him where we were sitting and he left. At that point, I think he was probably assuming that I had pissed just a bit in my pants or something similarly benign.

About two minutes later, my wife came into the bathroom not knowing what was wrong and with a certain amount of worry in her voice. I explained to her (still laughing and having trouble getting out words) that I had a slight accident and needed her help. Knowing that I had experienced some close calls in the past, she probably assumed that I had laid down a small turd or something and just needed to bring the car around so we could bolt immediately. Until I asked her, I'm sure she had no idea that she was about to go across the street and purchase me new underwear, new socks, new pants, a new shirt, and (by that time due to considerable leakage around the elastic ankles thingies) new sneakers. And she then started to laugh herself since I was still laughing.

She began to ask for an explanation as to what had happened when I promised her that I would tell her later, but that I just needed to handle damage control for the time being. She left.

The manager then came back in with a half dozen wet towels and a few dry ones. I asked him to also bring a mop and bucket upon which he assured me that they would clean up anything that needed to be cleaned. Without giving him specific details, I explained that what was going on in that stall that night was far in excess of what I would expect anyone to deal with, what with most of the folks working at Ryan's making minimum wage of just slightly above.

At that moment, I think it dawned on him exactly the gravity of the situation. Then that manager went so far above the call of duty that I will be eternally grateful for his actions. He hooked up a hose. Fortunately, commercial bathrooms are constructed with tile walls and tile floors and have a drain in the middle of the room in order to make clean up easy. Fortunately, I was in a commercial bathroom. He hooked up the hose to the spigot located under the sink as I began cleaning myself up with the wet towels. Just as I was finishing, my wife got back with the new clothes and passed them into the stall, whereupon I stuffed the previously worn clothing into the plastic bag that came from the store, handing the bag to my wife. I finished cleaning myself off and carefully put on my new clothes, still stuck in the stall since I figured that it would be in bad taste to go out of the stall to get redressed in the event I happened to be standing there naked and some little bastard kid walked in. At that point, I had only made a mess; I had not yet committed a felony and intended to keep it that way.

When I finished getting dressed, I picked up the hose and cleaned up the entire stall, washing down the remains toward the drain in the center of the room. I put down the hose and walked out of the bathroom. I had intended to go to the manager and thank him for all he had done, but when I walked out, three of the management staff were there to greet me with a standing ovation. I started laughing so hard that I thought I was going to throw up again, but managed to scurry out to the car where my wife was now waiting to pick me up by the front door. The upshot of all this is that I strongly recommend eating dinner at Ryan's Steak House. They have, by far, the management staff of any restaurant in which I have eaten.

Saturday, January 10, 2009

Expectation Management is Everything

Whether you are in product development or customer service, more or less every single measure of success comes down to how well you have managed expectations. After all, what is a failure other than a customer or consumer considering you to have missed their expectations?

This can cut both ways, however. I recently ordered something online for several hundred dollars. My shipping options were 1) free, 2) $12/2nd day, 3) $20/overnight. I really wanted to get the item in time to play with it over the weekend, however I was placing the order on a Monday before an upcoming holiday weekend.

I was about to place the order for 2nd day shipping when I noticed that the site said orders take 3 days to ship. Therefore I felt there was no reason to pay more to get the item before the weekend and I'll take slow, ground freight from across the US. That's too bad because I thought the long weekend would be the perfect time to play with my new toy.

Frustratingly, a few hours later (the following morning), I got an email that the item had shipped by ground freight. Had I paid for the 2 day, it would arrive before the up coming long holiday weekend. Instead it would arrive just after the long weekend. Argh.

Thursday, January 8, 2009

Top five both ways!

I was thrilled to see that in the 200 best/worst jobs list, I have BOTH the 5th best and 5th worst jobs. I am both a software engineer (rank 5) and an EMT (rank 196).

Tuesday, January 6, 2009

No vpn support on android (yet)

After searching the forums and the Internet I've ascertained that there is no current support for vpnc on the G1. I don't know if the ARM processor will have trouble keeping up with IPsec, but now that I've done a few test programs my next task will be to investigate building vpnc.

Sunday, January 4, 2009

Stdout on the Android DEV-1

Pro-tip: Always have a terminal running and showing the output of adb logcat. That's where all your System.out.println()s will show up as well as stack dumps of your fatal exceptions.

Not that I ever get fatal exceptions, that is.

Second protip: The ID being assigned in the layout MUST be the android namespace id (android:id), NOT the XML id. Doing the latter will cause your calls to findViewById() to return null. However, the ID will be placed into the R file regardless. Which can be confusing.

Installing Android Apps On A DEV-1 Phone

I may be really dumb, but it took me forever to figure out how to simply get an app installed on a physical phone. When I finally found out the tools to use, I was getting errors like the one below when I tried to actually copy the app over.


$ adb install ~/sandbox/HelloAndroid/bin/HelloAndroid-debug.apk
123 KB/s (6758 bytes in 0.053s)
pkg: /data/local/tmp/HelloAndroid-debug.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]


To do the install, you need to do two things. First, create a signed apk file, then copy it over. The signing process is straightforward once you have got your debug keyring set up correctly. For some reason my setup on ubuntu (32 bit) didn't work out right after installing the dev kit and trying to use the eclipse plugin. The debug keyring was unusable, so I deleted it and recreated it.


  1. rm ~/.android/debug.keystore

  2. /usr/lib/jvm/java-6-sun/bin/keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -keyalg RSA -validity 100000 -storepass android -keypass android



Turns out the debug keystore is expected to have both a keystore and key password of android. Then the build scripts work. This command sets up the keystore so that the ant build script will create signed debug apps. However, as a separate problem, the Eclipse Android plugin doesn't generate the ant script.

Even though the plugin supposedly wraps the command below, I ran it again on my source directory and it created the ant files.

$ ${android-sdk}/tools/activitycreator --out HelloAndroid com.technocage.android.hello.HelloAndroid


I could then do an ant in the source dir and get bin/HelloAndroid-debug.apk. It was signed, as expected and that let me install it. After you've setup USB connectivity, and verified it with adb devices...


  1. Connect USB cable to phone

  2. Pull down notification window and let USB mount SD card

  3. Settings->Applications->Development->USB debugging (enable)

  4. $ ${android-sdk}/tools/adb install ~/HelloAndroid/bin/HelloAndroid-debug.apk



The output of the last command looks something like this:


137 KB/s (8323 bytes in 0.059s)
pkg: /data/local/tmp/HelloAndroid-debug.apk
Success
$

Saturday, January 3, 2009

Frist post update

Turns out, it takes some getting used to.

Frist post

Well, I wonder if being able to blog from a mobile device is a good thing or not...

Do Not Shout In The Datacenter

Who knew that shouting could cause disk problems.

Android DEV-1 Phone using "T-Mobile VPN" APN

I just received my Android DEV phone in the mail and discovered it's a bit tricky to set up without purchasing the special service plan that T-Mobile wants you to buy at around $40/month. Unfortunately you CAN NOT setup your android phone without first logging in and syncing to a google account. This requires a working 3G data service out of the box.

(I have the "T-Mobile VPN" service which provides a routeable IP instead of a natted one.)

Turns out, the phone works just fine on their older unlimited data plans, albeit at 2G speeds (GMRS). I'm happy with that because I just want the same level of surfing capability I had with my old Motorola Z8.

There was the problem of the setup. To get it to work, I did the following:

  1. Added the "T-Mobile VPN" APN to the list of apns (which you can do from the initial-setup screen)

  2. Booted the phone with my wife's Google enabled SIM card

  3. Logged in with my google account

  4. Switched on 2G only mode (I don't think that this is necessary)

  5. Rebooted with my sim card

  6. Deleted the US 3G APNs from the list



The catch is that without removing the 3G APNs it will still try to use those to connect to the internet. Not a good thing because that only leads you to a captive portal by T-Mobile offering to upgrade your service.

Now I get the data service I like (and pay for), on the device I want.
Now to see about this developer kit.

Thursday, January 1, 2009

The Nature of Self Interest

"Evil is always the assertion of some self-interest without regard to
the whole, whether the whole be conceived as the immediate community or the total community of humanity." -- Reinhold Niebuhr.