Archive for May, 2012

h1

Leaving town

May 4, 2012

“I didn’t even see the basement!” said C as we left his parents Hartford, Connecticut house. He’d woken up last night not knowing where he was. I don’t know why when he wakes up disoriented when I’m asleep, I’m supposed to be coherent.

Plus, he had several of those dreams where he found rooms of our house he’d never seen. I suspect the last night’s tour of the attics did that for him.

However, I slept like a baby.

We are heading to Boston now, meeting up with all the rest of the family. But we needed gas even though (because?) the car’s been sitting in the driveway for days.

335 miles since we got gas (Maryland seems so long ago), 14.21 gallons and $59.68. Great gas mileage on the NJ turnpike: 23.6.

20120504-101234.jpg

h1

Time flies like a banana

May 3, 2012

As we traveled east, many of the gadgets have not done well with the time change. The iPhone, teacher’s pet that it is, offers a near perfect user experience. As we crossed the time zones, the iPhone continues to display local time whatever that is.

For something so seemingly easy, that is incredibly difficult. None of the other gadgets come close.

The iPhone has four sources of time, let’s go through them and work through why the other gadgets don’t work as well. First, the phone, like many gadgets, has a clock. This is a crystal that counts how many ticks since it was booted. The ticks could be from a  32.768kHz crystal (a real-time-clock or RTC component that keeps a slow-for-a-computer heartbeat). Like any watch, all you need to do it tell it what local time is, and the RTC (or other crystal) maintains it. However, it will drift off from the correct time (particularly if it stays in a hot car for a long time or in a particularly cold room). So when your 1984 Star Wars watch would lose a couple minutes a month, that is why. The clock counts ticks from when you set it but if the ticks are off by 0.01%, you end up losing a minute a week.  Temperature extremes makes this worse.

Ok, so that is old, old method for doing it. But if you have nothing else, a gadget with a crystal will keep time reasonably well. Though, it can’t tell if you’ve crossed timezones. That is why we had to reset the car’s digital clock every day or two.

The iPhone also has a GPS which isn’t only for location. GPS provides very accurate time information. However, the time is not local time but UTC (Coordinated Universal Time) which, for this purpose, is the same as GMT (Greenwich Mean Time, from when Greenwich, England was the center of the world). In California, we were GMT-8. Well, sometimes; California has daylight savings time so the offset shifts depending on the season.

This is (nominally) to reduce energy consumption as people tend to be clock based. The time shifts so the bulk of the daylight is after people wakeup. Sunlight at 4am in’t that useful but by shifting the clock, that sunlight moves to 5am and the evening light moves from 7pm to 8pm, a reasonably big win for folks stuck in 9-5 jobs.

Gadgets hate daylight savings time. Well, the programmers of gadgets hate DST.  Not everywhere in the US has daylight savings time (ahem, Arizona!). So now, a gadget using GPS time needs to know how to map from location to time and whether that place uses daylight savings time. It also needs to know when DST begins and ends, which can change (thank you, President Bush), causing devices that you (the customer) end up having to change 4 times every year (correct DST, gadget’s faux correction; forward and back). Oh, but there are some counties in the US that vote on whether to do DST each year so it isn’t enough to just use the current protocol.

GPS provides a signal that is both good and bad: it is very accurate (the gadget can know how long a second is to nanosecond precision) but not very precise (the gadget can be hours off of local time but it would always know what time it is in Greenwich (gee, thanks, England!)). Since it is very accurate, I’ve used it in devices to time how long something took, was it 0.00011 seconds since the system heard a gunshot or 0.00013 seconds? As a stopwatch, the GPS clock is fantastic.

A GPS can also be used to keep a a crystal real time clock accurate. Every time GPS updates the time (every second), the gadget (microprocessor) counts how many ticks the RTC had. Now, it can predict for the next second how many ticks there will be (the drift associated with the crystal is relatively slow so this works well).

The user still has to set the time. And reset the time for daylight savings time. And change the time when the user moves to a new timezone. The GPS gave us accuracy but didn’t solve any of the other problems.

Ok, so the iPhone also has WiFi which can help with some of these. It can use the internet to contact a mainframe server and ask, “what time is it?” The gadget doesn’t really need a GPS for accuracy, it can use the standard servers and Network Time Protocol (NTP) to get accurate timing information (or Simple Network Time Protocol to get reasonably accurate time information). Unfortunately, this is UTC as well so it has all the disadvantages of GPS: it has to ask the user for their offset (usually they ask you to select a nearby city and the gadget figures it out; and all of the daylight savings time complexity). NTP is a general internet service, available using different servers. A gadget manufacturer can instead have the gadget call home to their own server which can provide more information than just NTP.

However, if the gadget has WiFi and GPS, it can contact a server with a query that essentially says, “I’m here, what time is it?”  The GPS isn’t completely necessary for the WiFi phone-home method to work. There are databases of WiFi networks and their location (the iPhone uses those to help locate you!) so the gadget can phone home with the WiFi network and probably get the time that way.

The server can have a much larger daylight savings time database than the gadget (and one more easily updated with the vagaries of humans). The weak point of this plan is the server… if the gadget can’t get there, it will act stupid.

In the car, the gadgets don’t have WifFi so things like the iPad don’t get updated until we get to a hotel and log on. Then, the iPad, disconcertingly, loses an hour sometime between I get used to it being wrong and when I look at it again and wonder how it got so late.

There isn’t  a standard for how to do this conversion from location to local time. Well, there is the Network Identity and Time Zone protocol but if you go look at that you’ll notice is isn’t exactly a networking protocol with the ubiquity of NTP. Instead, it is phone based.

The iPhone is actually a cell phone (yes, I know it is a somewhat terrible phone but it has cellular technology so we’ll give it the benefit of the doubt). As this gadget moves, it connects to the cell towers and asks, “Beg pardon, but do you have the time?” and changes to the new time if the cell towers give something different than the device’s current time.

So, all a gadget needs is a cellular modem and a contract with one of the major cell phone vendors. Then it can function as a reasonably accurate clock, always updating to local time.

Or the gadget can just assume its customer never leaves their home time zone and make them set the initial time. And then it can use a crummy real time clock and let the time drift. Not that big of a deal, the clock will be correct-enough 99% of the time. Since we want our gadgets to be cheap, not many things can afford to have all the supporting hardware.

(Thanks to Christopher White who complained enough about broken gadgets that I put this together._

h1

Acting like kindergarteners

May 3, 2012

Have you ever wished you were a dinosaur? Raaaaaawwwrrr!

C and I went to Dinosaur Park where they built dome over some dino tracks in the Connecticut mud. Dinosaurs walked here! Right here!

It was pretty awesome. I’d forgotten how much non-science-nerds also love dinosaurs. We all had a very good time.

I love Triceratops best of all the dinosaurs. (Read my book, it has ’em!)

h1

What year is it?

May 2, 2012

Mystic seaport has a Mystic Psychic; why don’t they have a Mystic Mystic? That would have made so much more sense to me.

The town of Mystic reminded me of Pismo Beach but not quite, you know?

I came in cold, not knowing what to expect at all. We took a quick spin around the tiny village (an old map store! a cute sun hat at half off! pizza! Though we ate at a nice fish place). It was small. And quaint. Well, it would have been quaint if there had been less construction (or if there had been sidewalks).

Anyway, after that, everyone asked if I wanted to go to seaport village. How in the world would I know? Thinking about the kitschy seaport village in San Diego, then thinking about the warm, sunny waves, I agreed. I didn’t expect a sudden shift in weather, I knew it was going to be cloudy and slightly chilly but, with everyone looking at me expectantly, I suppose I would have agreed to leaping off a cliff since I had no better plan.

I’m not sure what I expected from Mystic Seaport Village. I’ve never been to something like this before. It is billed as a re-created nineteenth-century coastal village. With some ships, some historic ships. And a working shipyard. I didn’t realize that we were supposed to go into the houses but C saw the grocery store and took me in there. The docent explained that it was set up as a nineteenth-century grocery and here were the things we could touch and over there were the antiques we couldn’t touch.

Ok, I’m getting into it… we went to the chemist’s and saw cure-alls and pickled leeches. The docent suggested he couldn’t keep live leeches fed (I found this surprising given the number of 10-year old boys running around, I’m certain they’d be willing to dare each other into feeding the leeches).

We went into a garden area and then into a house that had a roaring fire. The docent explained about cooking fires (though not about the attendant dangers to the cook) and how the oven was used to bake bread. She said the kitchen was built in 16-something and moved into the house. I think I lost the thread a bit, there is some havoc with people (school groups) coming in and out and the docent tries to have a narrative that can work within that constraint but it is difficult.

We wandered and saw a historic fishing ship, one that launched in 1921 (I didn’t remember, had to look it up) and then it sailed around fishing for awhile, got refitted for cargo and then bought so it could be historic. As others went below to look at the sleeping quarters, I chatted with the docent about dogs and leeches. (What am I doing here?)

For the most part, the docents were interesting and knowledgeable. I would have like to talk to the cooper but he was on break and to the printing press folks but they had a huge group of kids.  Ahhh, the clockmaker, this I could like.

That, of course, was where it all when wrong.

I read about Black Bart and  watched a movie about the Longitude Prize which detailed how marine chronometers are critical to knowing location. It is hard to sail around the oceans if you don’t know where you are. So I kinda knew that and I bet my father-in-law knew it . And we ooh’d over the telescopes and ahh’d over the compasses. We were invited behind the counter to look at the pendulum (land) clocks. I didn’t go, instead asking if he had any gyroscopes.

He said no one had ever asked. And he thought gyroscopes came later.

I tried to subtly wander off and check to see what Wikipedia said. The docent followed and wanted to know what I found:  1860s saw the first gyrocompasses, marine gyrocompass was patented in 1904. So, yeah, a nineteenth century clock store would be interested in the up and coming gyroscopes and the effect they would have on navigation. I bet he went home and read up on gyros of the time; I walked away feeling a like a complete nerd and a little silly.

(Note: the gyro wouldn’t have much of an effect on marine navigation since it couldn’t be used as an inertial measurement unit (IMU) for a long time.  I worked on IMUs for Crossbow, back before they sold the division to MEMSIC. It is a hard problem even now though the problem is making it cheap and accurate (and not just one or the other).)

We went to the rope shop (neat), watched kids climb rigging on old ships, had a snack, and wandered around the historic whaler that was being gutted in dry dock. It was edutainment, not as good as the Frozen Planet TV series but a nice walk. I had a good time but came away a little confused. What year was it supposed to be in Mystic Seaport?

One hundred year spread was too big. For the twentieth century, the spread would be the Wright Flyer and international telegraph to commercial space flight and the iPhone. In a hundred years, if a museum town is built and puts an iPhone next to the Wright Flyer, visitors are going to get a whacko picture of our age. I wish they’d choose a year and narrow in on it, helping people to understand what came before the year and what came after, what was common and what was rare.

I suppose this is the where I rant a bit about museums having the responsibility to curate as well as collect. A well curated display is about determining how to display a collection in a way that makes sense. A lot of it is about selecting what not to show, eliminate the cruft to help outsiders to the creamy center.

Ahh, well, that rant will have to wait. We are off to an art museum. I think our hosts are going to give up on history** since after the paintings, we are either going to the science center (three of four people in our party will be thrilled with this) or the dinosaur park (I think maybe it will be the same three nerds who are excited about dino tracks in the rocks).

** Give up on history until we get to Plymouth where, of course, we will see The Rock.

 

h1

Clumsy oaf

May 2, 2012

If I could wish for a superpower it would be a seven second redo. When we got our first Tivo-like device, we found that we could skip ahead for 30s to get rid of commercials but if we went too far, there was a seven second back functionality. I wanted to be able to do that with the world. Take back the idiocy that just came from my mouth. Skip back and prevent accidents. Seven seconds seems like the right amount of time to foil small disasters but not enough put me on the hook for large ones.

However, I already have a superpower. I break things. Usually, I use my powers for good. Though, I have been known to profit as well.

In my engineering world, having everything around me break is a good way to create a system that is more robust for customers. In fact, in medical devices, I can be more confident that my products are functional because, if they were going to fail, they would have failed on my desk. I’m not usually that person who says “I can’t reproduce that error” because, if it is a crash or fatal issue, I can always reproduce it. Many of my oddest engineering skills have come from having to fix the things that break most often (solder and a glue gun are totally in my superbelt, I carry a toolbox when I have a cape and tights on (ahem, which is never)).

This isn’t just being inattentive to my surroundings (there is some of that); it is a true knack for destruction. I mean, I crash my Apple devices regularly (I’ve seen the Leopard screen of death several times, you?). I crashed the DC Metro’s ticket taking machine. Never go into the self-checkout line behind me.

Maybe I should have gone into testing but I love building things, creating new things. Plus, development usually pays better. I know the superhero lore: using my power for profit is certain to lead to sadness but I’m sure Clark Kent used his X-ray vision a time or two to get a story.

Unfortunately for me, my power is not limited to the flow of electricity. I also break physical things. While I like pretty and expensive vases, we don’t own any because the Tiffany one we got as a wedding present fell to the sink one day with a giant crack. Things in my hands tend to end up on the floor. Glasses with liquids get spilled even when I’m nowhere near them. Things on the floor end up stepped on or tripped over, repeatedly. I can trip over a crack in the sidewalk, it doesn’t have to be uneven. I did major damage to my hip falling out of my desk chair.

I’m not an idiot: I don’t go in china shops. And I would say our house is configured for safety and acceptable levels of casual destruction. I let C control the TV and most of the household electronics. The pathways I move along are free from clutter and likely damage. It is ok if I run into or trip over the cat tree. (I stopped giving the cat guilt-treats when I would walk on his tail and now he moves his tail when he sees me coming. I’m pretty sure he was moving in front of me when there were treats at stake.) The kitchen counter is mostly devoid of things, partially because we like the clean look, partially because it is easier to clean up, partially because it limits my range when my talent misfires.

It is with some trepidation that I visit my in-laws home. I have seen many magazines with showcase houses that are not nearly as lovely as this one. Each room is done up in a way where everything is perfect. I’ve been in much worse museums than this house. I feel huge and ungraceful.

My father-in-law was worried about me tripping down the stairs (a quite reasonable fear) but I was far more concerned about tripping down the stairs and bringing two stories worth of antiques with me. I will have care on the stairs.

Right now, I’m sitting on the floor of a sitting room (seriously, there is no other word, it is not a bedroom, bathroom, living room or kitchen; long ago, it might have been a nursery or governess’ room). I’m sitting on the floor because I don’t know which chairs or sofas are suitable for sitting. And if one of them is suitable, I don’t know which pillows should be moved from it. I can assume all of them but then where do they go? Not on the floor, I know that much.

Even down here, I’m a little stressed out. There are dolls and animals that I nearly set my backpack on and then almost kicked when I stretched out my leg. I am being careful. Really. And so far nothing has been touched but the rug. And I refuse to think about the rug and whether or not it should be sat upon or have my gear strewn about it. I’ll assume yes on that even though there are rugs in this house that I know I’m not to loiter on (though I don’t know which ones).

20120502-101925.jpg

I should tell you more about the house and I probably will, possibly in detail. For now, I’ll summarize: it is an amazing, beautiful, detail-designed house. My mother-in-law has a fantastic sense of space and color. (Yes, I do know she’s been reading this blog, that isn’t just sucking up.)

But I fear for her lovely house; I fear my out-of-control superpower and the destruction I could cause tromping around here. All I can really say? Thank all mercies that French antiques don’t have electronics.