A Song For Today

January 29th, 2011

In The Year Of 39.

GUI Testing and Automation with Sikuli

October 16th, 2010

Here are the slides for my CPOSC 2010 talk, GUI Testing and Automation with Sikuli.

Physics Thought Experiment

April 12th, 2010

My friend Pete (he’s the one who looks like John Tesh) is trained as a physicist, so naturally I thought of him when I couldn’t get this thought experiment out of my head:

Imagine a spaceship, one light-year in length.  Assume it’s built in such a way that it magically has zero ability to compress or flex.  Humans are in the front, and engines are in the back.

If the engines turn on, I know that it takes one year from the perspective of the crew until they could see the light from the engines.  Obviously, the vibrations from the engines would take much much longer.

What I don’t know is when the humans would notice motion.  If the motion was bound by the speed of light, then it would take them one year to notice that they were moving.  But based on my rudimentary physics knowledge, this doesn’t seem to make sense.  I never heard of any physics that made the head of an object move long after the tail was pushed.

Luckily, Pete saved me from a series of sleepless nights in which I half-wondered if I’d derived some form of really clunky FTL communication technology.  His response was so thorough and informative that I wanted to share it with the world.  Well, the subset of the world who reads my blog.

The speed of light is not just a limit for light transmission, but for all interactions. From a particle viewpoint, interactions are mediated by particles. In the case of electromagnetism, this particle is the photon, which moves of course at the speed of light. The mediator particles for other types of interactions are also limited by the speed of light. Generally, massless particles travel at the speed of light, and all others are limited by it (but can never reach it.)

The macroscopic effects of what you described, aside from any resulting motion, might be called material stress or a material shock wave.

With regard to the humans in the front, not only is there no instant notification of what’s happening in the back, there can be no effect at all for 1 year. That is, no stresses, no motion, no nothing.

So what you’re thinking right now is, well then how can I conserve momentum? If the engines are spewing things out backwards, the center of mass of the spaceship taken as a whole must be moving the other way to balance that. In fact, there is momentum produced in the other direction (as there must be), and if you found a way to calculate precisely the center of mass motion of the spaceship as a whole you’d find it to be moving, but it is in the form of either material deformation in the rear, or microscopic dynamics that on a macroscopic level could be described by a type of wave in the material which can be associated with an overall macroscopic momentum.

In this context, an analogy between the spaceship material and fluid medium might be useful. If you’re in the middle of the lake and row your boat, the boat goes one way, and the momentum is balance by the motion within the water. The water at the edge of the lake doesn’t know anything about it until the waves you’re making reach there. If you were to calculate the momentum of all the water molecules at once and add them all together, you’d find that it cancels out the momentum of your boat. You can think of the momentum of your engine exhaust being balanced by the momentum associated with the shock wave traveling forward through the material of your spaceship.

You might not believe that the effects of the engines could be absorbed entirely by material waves with no macroscopic motion. This is because the scale of your spaceship is rather extreme. If you made the spaceship too rigid and not large enough width-wise, and the engines were too powerful, then the rear of your spaceship would just bust apart. If you imaged that the spaceship was a borglike cube of solid iron 1 light year per side, then you can start to believe that the engine thrust could be “absorbed” by wave disturbances within the material.

The apparent paradox in your thought experiment is due to the false assumption that you can make something that’s completely rigid. This is not physically possible. On a logical level, your thought experiment itself, combined with the speed of light restriction, proves this. On a microscopic level, you can make arguments regarding microscopic interactions as I did above for why 100% rigidity is not possible.

This reminds me of a special relativity problem I used to give my students that is related in one respect, but otherwise different:

Imagine a garage that’s 20 ft long, and a pole vaulter with a 30 ft pole that can run really fast into the garage.  As you may know, things that are moving get contracted in length. This is not because they are being compressed or anything like that – it is a result of the nature of space time.

Suppose the vaulter runs so fast that in the rest frame of the garage the pole is only 20 ft long. (He would have to run really really fast to get that kind of effect.) Then he would be able to fit the pole inside the garage, and you could close the door quickly and the entire pole would be contained in the garage undamaged for a split second until everything hits the back wall with massive destruction ensuing.

So that’s all well and good, but what about the rest frame of the vaulter? In that frame, the pole is still 30 ft. To make matters worse, the garage, which is in this frame speeding towards the vaulter, is contracted to only 10 ft. So in that frame when the front of the pole hits the back wall, there’s still 20 ft of pole outside the garage.

I was actually aware of the pole-vaulter example, but I hadn’t considered how it applied to my own thought experiment.  Physics is filled with such awesome stuff like this.  Thanks, Pete!

The Awesome Task of Recoating a Telescope Mirror

April 12th, 2010

If you enjoy pretty pictures of the universe, you owe it to yourself to learn how a common bit of maintenance is done on ESO’s VLT, or Very Large Telescope.

At some point, the reflector used in the VLT is beyond recovery, and they need to strip it of its mirror finish and recoat it.  This seems like it would be straightforward, but some of the most impressive robotics, machinery, engineering, and minds are applied to this task.  If anyone involved in the process is having a bad day, and they break the ceramic mirror base, the telescope would be out of commission for years until a replacement mirror is built.

I’ve worked on multiple critical systems in my career, but I’ve never seen anything quite like this.

Daphne, 1 Year Old

April 12th, 2010

Thanks to Lon, we were able to get some great pictures of Daphne wearing her traditional “Korean girls have to wear this dress when they’re 1 year old” dress.  I haven’t edited out the background yet, but I wanted to put one up sooner rather than later.  We have more, but this one is my favorite.  Click the picture for a larger version.

Daphne, in her traditional Korean dress

Apparently Random YouTube Link Again

January 29th, 2010

38 Years Old

Additional Treadmilldesk Criterion

January 25th, 2010

Before I purchased the treadmill for my treadmill desk, I thought my criteria would yield good results.  For the most part, this is true; I’ve been using my treadmill desk for well over a year without issue.

Recently, my treadmilldesk’s treadmill started making some grinding noises that corresponded to the belt speed.  Technology never heals itself, so I opened up the workings to take a look.  After the usual dust cleaning, I isolated the source of the noise.  An important piece of plastic had warped from heat.

The speed sensor consists of a tiny piece of circuitry that counts how often some teeth pass through it.  The teeth are on a wheel attached to the main treadmill motor.  The sensor is on a plastic housing that sits directly on the metal motor.  Guess what happens as the motor heats up?  Yes, the sensor housing softens and sags, leading to a condition where the teeth rub against the housing as they move.

Under the “normal” usage scenario, which consists of someone buying the treadmill, using it for a week, then putting plants on it until they sell it used, this piece of plastic would never distort.  However, if you actually intend to use your treadmill as a treadmilldesk, as I do, walking at 2.5MPH for 3-8 hours a day, you might want to consider getting a higher-end model that will last.

I will fix the sensor mount problem somehow, but when this treadmill finally does fail, the next one I get will be designed for long-term use.

Virtualization is Easy Now: VirtualBox OSE

October 18th, 2009

Here are the slides from my talk at CPOSC 2009.  Enjoy!

Car Disaster Avoided

September 18th, 2009

As we continue to make software a component of more technologies, software failures are evolving from losing the last 20 minutes of your work to losing the rest of your life.  I was recently reminded of something that happened to me years ago, in which I encountered a potentially life-threatening software failure.

In the winter, about 10 years ago, I had a major software failure in my 1997 Saturn SC2.  I was living near the top of a steep hill, with a road to match.  My drive to work required me to descend this steep road, which hit a low point before rising up again to touch the main road.  If you could look at the road from its side, it would resemble a check mark, with my house near the top of the longer stroke.  Now picture the road covered with a fresh, wet, slippery snow.

I descended the hill in low gear, to take advantage of engine braking, but I also had my foot on the brake.  The action of the ABS brakes caused the usual pulsation in the brake pedal, along with the typical rattling sound, as it kept my speed down.  So far, so good.  Then, after a few seconds of constant ABS activity, I lost the brakes, as my dashboard lit up with red lights.

“Hmm,” I thought.  The low gear was helping to slow me down, but it could only do so much without brakes.  My steering still worked, so my plan was to drift down the hill and rely on the braking power of the incline between me and the main road.  This was the plan for several seconds, until someone pulled onto the road from an adjacent apartment complex.  They were heading to the main road, too, and they were in front of me.

“Hmm,” I thought again.  I couldn’t rely on the other car moving fast enough to not be in my way, so I had to come up with a plan B.  I quickly thought about the failure, running through various scenarios.  While I wasn’t certain, I suspected that I had encountered a software failure, and that the hardware (the brakes and the ABS controller) were fine.  Ultimately, I decided to reboot the car.

This was a little scary.  Power steering would go away while I did this, even if only for a few seconds.  I’d also never started my car while the wheels were in motion.  Out of an obscure memory, I pulled information my dad told me once: “You can start a car with automatic transmission in either Park or Neutral.”  Park was out of the question, but Neutral would work just fine.  So, I turned the key into the Off position, shifted to Neutral, and then turned the car back on.  After the usual brief test period for indicator lights, all the red lights were gone.  The brakes had resumed their clicking noise, and this time, they kept working.  After shifting into low gear, everything was back to where I wanted it to be.

I considered contacting Saturn about this, but I didn’t think it would lead to any improvements.  My mindset at the time was that unless I had a way to consistently cause this failure, the report wouldn’t be acted upon.  In fact, I only encountered that failure once during the time I owned the car.  If it happened to me now, I think I would contact Saturn and anyone else who had an interest in making sure cars are safe to drive.

If there’s any life lesson here, it’s that the Hitchhiker’s Guide to the Galaxy was right: Don’t panic!

Forwarding Bank Account

September 13th, 2009

To the category of things I can imagine but not do, add this: A bank account that does not exist, but merely points to one that does.  Analogous to forwarding email addresses that do nothing other than forward to real email addresses, the forwarding bank account would solve the conundrum of what you do when you have all your bills auto-debited from a checking account, and then you decide to switch checking accounts.

The only way that I know to solve this currently involves allocating money in both your legacy and your new bill-paying checking account, and keeping the legacy account open until the last auto-debit is taken out of it.  It’s doable, but it’s tedious, and most companies generate at least one bill that you need to manually pay when you switch accounts on them.  With a forwarding account, you would not switch accounts, as far as your creditors were concerned, so auto-debit would be smooth even when switching your underlying real checking account to another bank.

Can anyone with inside knowledge of how routing numbers and account numbers are actually used in the auto-debit process comment?  Is this feasible, as the system currently works, or would the notion of a forwarding account need to be built in from the ground up?