Thursday, June 27, 2013

Cheap Gas

A confluence of things happened today that resulted in my filling up my tank for $2.12 per gallon:


An area with cheap gas to begin with, coupled with a grocery store's 90 cents off per gallon incentive, made the total price $2.119 per gallon.  I doubt I will ever see gasoline that cheap again in my lifetime.

Four years ago in 2009, I was on a ski trip to Salt Lake City, Utah.  Oddly, there are a bunch of oil refineries in Salt Lake City, and the gas there is exceptionally cheap, too.  I was awestruck at the $1.29 gas for sale there.  So much so that I took a picture of THAT, too:


THEN, I was watching Die Hard on a plane trip for work not too long ago.  THAT gas was really cheap:


(46:16 for those who really care.)  Those were the days, weren't they?  When the gallon dial rolled by faster than the price dial?  Alas, even with the eGallon now toted by the DOE and electric car manufacturers, only a few states are lucky enough to have cheap enough power to still be less than $1.00 per gallon (equivalent).

Happy driving.

Wednesday, April 17, 2013

Solid State Hard Drives, and 15 year old memories

About two weeks ago, I installed a solid state hard drive in my computer -- a SanDisk Ultra Plus 128GB that I got on super sale for $85 -- plenty big enough to hold an operating system and a bunch of commonly-used files.

Bootup time, from the end of the BIOS screen to the computer on and all applications available, was 11.3 seconds.  Holy crap that's fast.

Almost as fast as my computer was 15 years ago, in 1998.

Allow me to take a long and extremely nerdy stroll down memory lane.  You see, when I was a sophomore in college, I decided to go off the reservation ... way off the reservation, and buy a Macintosh.  Not just any Macintosh, but a Power Computing PowerBase 240.

This was a computer that would run the Mac operating system (OS 8.1 at the time, I believe), but was not sold by Apple.  This system and its ilk became known as the Mac Clones, and they were killing Apple's business line: clones, generally cheaper and more powerful than the hardware Apple was offering, were selling much faster than Apple's wares..  Although I didn't like it, Steve Jobs made a very smart decision when he stopped licensing the OS and effectively killed off the clone market.  It came with a Motorola PowerPC 603e CPU running at a whopping 240 MHz and a 40 MHz front side bus and 16MB of RAM.  The 603 chips were generally slower per MHz than the 601 generation of chips they intended to replace, but the 603's (including the 603e and 603ev) could run at much higher clock speeds.

The computer hummed along happily for a year, and then the G3 line of processors came out.  At the time, these were unbelievably fast and powerful chips.

And my 603e chip, due to some brilliant design by the folks at PowerComputing, was located on a daughtercard and slid right out -- to be replaced by a PowerLogix G3/300 CPU.  And overclocking was easy: just turn some dip switches and crank up the MHz until either the chip or your memory couldn't take it any more.  I had mine set to 363 MHz and it was fantastic.

But there was one last trick up my sleeve that made this Mac clone way, way, way faster than anything else at the time.  You see, the memory controller that supplied power to the RAM was of a unique design for those old Motorola 600 series processors: it could keep the RAM supplied with power through a restart.

That's right: the contents of a RAM disk could be maintained through a reboot.  You could set up a RAM disk, install the OS on it, and reboot.  Your entire OS was running in RAM. For some reason, when Apple upgraded to the G3 chip (and all subsequent CPU's), the memory controller has been unable to maintain the contents of RAM through a restart.

At this time, I think I had 96MB of RAM in the machine -- about as much as it could handle.  The flagship OS at the time was Mac OS 9, but there was no way the entire OS could fit in my 96 MB of RAM (and still have some RAM left over for, you know, general use).  Thus enter the last trick up my sleeve for this rocket sled: the recovery disk for Mac OS 8.1 would fit on a floppy disk.  It was stripped down, it was mostly in black and white (all icons were in black and white so the OS would fit on a 1.4MB floppy), but it would read the newfangled HFS+ file partition scheme, and holy crap was it fast.

So, in the end, I had a Mac Clone (oddball #1) with an upgraded and overclocked G3 chip (oddball #2) running a recovery version of the OS (oddball #3), all on a RAM disk (oddball #4).  Startup time, from the reboot chime to open windows was about 3 seconds.  It was instant-on.  Applications loaded nearly instantaneously, limited solely by the read speed of the hard drive.  As long as the applications didn't need to touch the hard drive, the computer was always faster than you could think and respond.  It was awesome.  And it was only possible with the G3 chip because I had the original memory controller from the 603e chip.

Today, solid state hard drives are making some serious inroads into computing again.  They've been offered on laptops for a while now due to their small size, tiny power draw (2-3 watts under load), and crazy fast speed.  And they're getting big enough and cheap enough now that they're serviceable for desktop computers, to hold the OS, a few applications, and important data.  The speeds of SSD's are finally catching back up to account for the bloat that has become common now -- my work laptop (a not shabby Core i7 processor with a 7200 RPM HDD), running Windows 7, takes about 5 minutes to boot up.

And yet I still pine for the days when my OS would fit on a floppy and everything could be crammed onto a RAM disk.

Thanks for the stroll down memory lane.

Tuesday, March 12, 2013

Feeling Old in the Digital Age

When I went to college, email was still a relatively new and novel phenomenon.  People's primary method of getting onto the internet consisted of America On-Line.  AOL would flood your mailbox (your snail mail box, I should point out) with CD's that offered 500 hours of free online browsing.  If you were particularly cheap about it, you could string together a whole bunch of those CD's and get free service for quite some time (having to create a new account and new email address each time).

19.6 kilobits per second was a pretty good data transfer rate, because it was coming over your modem.  Not your cable modem ... your phone modem.  Then modem speeds went to 33.6 kbps and others offered 54 kpbs, but nobody could actually go that fast because the phone lines are just too skinny for that mode of data transfer.

Yes, e-mail had been around since the early 1980's, and various bulletin board services and other "internet-like" pages existed, but email was just hitting the mainstream in the mid 1990's. (Anyone remember Eudora?)  And hence, my impression, my use, my behavior towards email is still shaped by those formative years when the mannerisms and etiquette of emails were still growing.

Which is why, after reading this article in the NY Times, I feel really, really old.

The author talks about how he has largely eschewed conversing with his family by email, doesn't respond to voice mail (remember when it wasn't voice mail?  when it was an answering machine? And even those things were cool?), and instead opts for the shortened forms of communication provided by texts and Twitter.

The author claims that salutations and closings, such as Hello and Sincerely, are going by the wayside in the name of efficiency.

And that many people in the digital age today are so swamped with electronic communications that  thank-you message is unwanted.  The author closes the piece with,

Here's hoping that politeness never goes out of fashion, but that time-wasting forms of communication do.

I'm not 100% sure how to interpret that, but from the tone of the article, he appears to include email as one of those time-wasting forms of communication.

And that is why I feel old.

Wednesday, February 13, 2013

North Korean Nuclear Test, in plain English

The fact that the North Koreans have tested their third nuclear device has been widely reported, but I haven't seen much scientific analysis of it yet.  Many of the headlines have been bumped by tonight's State of the Union address, which is understandable.

Aside: Watching the State of the Union address can be fun, but it can also be excruciatingly slow.  You can usually read the entire speech in less than 10 minutes the following morning, but that misses the whole pomp and circumstance of the thing.  End aside.

What is on everyone's mind is, How Big Was The Boom that the North Koreans made?

I think it was big.  Here's my guess, up front, and I'll spend the rest of the post explaining my answer: 20 kilotons.

I realize this is significantly larger than the South Korean (early) estimate of 6-7 kilotons.  This also puts it larger than the 16 kilotons estimated by Wikipedia for Little Boy but smaller than the 21 kilotons estimated by Wikipedia for Fat Man.

Here's what we know:


Here's what we don't know:
  • The design of the weapon. Was it all plutonium? Was it all uranium? Was it some mix? 
  • The precise rock / sand / water makeup of the mountains around the test site.
The fact is, post-detonation, it's actually hard to tell "How Big Was That Boom?"  The Grainger catalog, for instance, doesn't sell a "Boom-O-Meter" to tell you how many kilotons your blast was.  You have to derive it.

Seismic instruments can measure the P-waves and S-waves and can make an educated guess at the moment-magnitude scale (more commonly, albeit imprecisely, known as the Richter scale).  This is an estimate of how much power was transmitted to the earth in an earthquake, or in a nuclear explosion.  These scales are logarithmic: a magnitude 5 quake is 10 times larger than a magnitude 4 quake.

What's critically important is the coupling factor: how well does the energy of the bomb couple with the earth?  At the Nevada Test Site, where the US has done much of its nuclear weapons testing, the coupling is pretty weak.  It's sand.  The bomb goes "boom" and a lot of the sand shifts.  In general terms, even a big bomb only makes a small "thud" in the earth.

Contrast that with the primary nuclear weapons testing site for the Soviet Union: Novaya Zemlya.  It was the site of 224 tests, and it's a giant rock.  Here, even a small bomb makes a big "thud" in the earth's mantle, which is carried around the world for seismic devices to pick up.

Key fact #1: the 2009 test was a 4.5.  The 2013 test was a 5.1, from roughly the same area.  If the coupling is the same, the 2013 event was 4 times larger than the 2009 event.  Thus, if the 2009 event was estimated at 2 to 6 kilotons, simple math means this was an 8 to 24 kiloton event.

Naturally, there's an equation to describe this coupling coefficient:

Magnitude = A + B * log(yield)

where A and B are empirically determined constants.  
  • For the rocky environment of Novaya Zemlya, A = 4.45 and B = 0.75
  • For the sandy environment of the Nevada Test Site, A = 3.92 and B = 0.81
  • For Pakistan, which is thought to be similar to North Korea, A = 4.10 and B = 0.75
So, let's see that graphically:
The horizontal dotted line is at a magnitude 5.1 quake.  At Novaya Zemlya (red line), since it's a giant rock and well connected to the earth's mantle, the black line crosses at 7.5 kT: a relatively small boom can make a big kick in the earth.  At NTS (blue line), it's all sand, and it takes a very large boom (something like 29 kT ... off the chart here) to make a 5.1 magnitude quake.

We don't know the exact rock makeup of the area that North Korea uses for testing, so we have to guess.  The guessing is also why the estimates for the 2009 event are between 2 and 6 kT ... we know the ground is not as squishy as NTS, but probably not as hard as Novaya Zemlya.  Hence, 2-6 kT for the 4.5 quake in 2009.

The green line is my North Korea estimate, based off of previous estimates for Pakistan.  I will note that the green line estimate also lines up with the reported size of the 2006 test (1 kT or less for a 4.1 quake) and the 2009 test (2-6 kT for a 4.5 quake, and I show 3.4 kT); however, there is a lot of uncertainty there.  One could draw a few other green lines that also match the reported data ranges.

But this one is big.  Bigger than has been reported or hinted at previously.

Lastly, the Comprehensive Test Ban Treaty Organization (CTBTO) has probably been going full-on for the past week or so.  This is the stuff they live for -- to detect nuclear explosions around the world, by whatever means necessary.  They picked up the blast; they're now sniffing around the world for xenon-133, in the hopes that some of it escaped from the mountain after the blast.  Xe-133 is a fission product and is not normally found in the atmosphere; it's a telltale sign that someone has been doing some fission recently, and since it's a noble gas, it can leak through a lot of things.

Clicking on the above picture will take you to a 11MB movie that shows some modeling results of the 2006 event and how they think they detected the Xe-133 from it -- all the way in Yellowknife, Canada.  Jump to 1:40 to see it.

Unfortunately, the 2009 event was buried deeply enough that no Xe-133 was detected ... at least, not by the CTBTO.

For more reading: see Caging the Dragon, available as a pdf.

Tuesday, January 29, 2013

Redundant Safety

Whenever I see overt double redundancy, I'm immediately tempted to test the system.


In this case, a ground fault plug, plugged into a ... GFCI outlet.  I'm at a hotel this week, and I was seriously tempted to throw the hairdryer into the sink and see which one tripped first.

In all fairness, there are good reasons why they did this.  Per most building codes, a GFCI outlet must be installed if the outlet is within 6 feet of a sink (or something like that).  And, of course, the hotel chain wants to be safe, so they only buy hairdryers that also have a GFCI plug. 

But seeing the two together hints at the overbearing safety culture that continues to run rampant.

Monday, October 15, 2012

Power At The Pump

After a solid 6 hour brain-drain effort this morning worrying about non-technical details associated with configuration management, I decided to figure out something fun.

How much power is coursing through the hose as you fill up your car at the gas pump?

Well, to be honest, I've been wondering about this for a while.  The seed was first planted by colleague a few months ago who made an offhand comment, and it stuck in my head.  So, I timed the flow rate when I was filling up a few days ago:

  1. It took 30.4 seconds to put 5 gallons of gas in the car.
  2. According to the EPA, gasoline has 114,000 BTU's per gallon, or 33.41 kWh per gallon.

Item #2 up there is a measure of energy: to put it in layman's terms, 1 gallon of gas can be converted into a LOT of heat.  114,000 British Thermal Units.  By combining #1 and #2, and making sure the units come out right, this is how much power is coursing through that hose:

20 megawatts.

I couldn't believe it was that much.  20 megawatts is a lot of power. A typical wind turbine will produce about 2 megawatts of power.

That's right ... the combined power from every turbine you see in the picture, running at full capacity, is about the same as what's flowing through your gasoline hose.  I think that just underscores how power dense gasoline is.

Now be careful where you point that thing.

Saturday, September 15, 2012

Petulant Politicians and their Piss-Poor Performance

I've been pretty sick the past few days with a 103 degree fever, but the silver lining is that the time at home has given me the chance to catch up on some reading.  An excerpt from Michael Grunwald's new book, "The New New Deal," boiled my blood far more than the fever ever could.  Enough to get me back on the wagon again and start posting.

The part I read focused on the time shortly after the 2008 elections, when Barack Obama won the presidential election on a platform of hope and change.  The Democrats had also won strong majorities in the Senate (58 of 100 seats) and in the House of Representatives (257 of 435 seats).  Understandably, the Republicans were humbled, and were nursing their wounds at a strategy session.  The quotes -- not just the narrative, but the quotes -- that Michael Grunwald uses to describe the Senate Minority Leader, Mitch McConnell, make me furious:

The owlish, studiously bland Senate minority leader from Kentucky was the unlikeliest of motivational speakers.  He was a strategy guy, cynical and clinical; he reminded his members to stay calm, stay on message and stay united.  Obama had promised postpartisanship, and Republicans could turn him into a promise breaker by withholding their support.  "We got shellacked, but don't forget we still represent half the population," McConnell said.  "Republicans need to stick together as a team."  Or as Ohio Senator George Voinovich summarized the strategy, "If Obama was for it, we had to be against it."
...
But McConnell believed Republicans had nothing to gain from me-too-ism.  He reminded his caucus that Republicans wouldn't pay a price for opposing Obama's plan if it succeeded, because politicians get re-elected in good times.  But if the economy didn't revive, they could return from the political wilderness in 2010.  "He wanted everyone to hold the fort," Voinovich later explained.  "All he cared about was making sure Obama could never have a clean victory."
Excerpted from The New New Deal, copyright 2012 by Michael Grunwald, published by Simon & Schuster, August 2012.

I cannot explain my outrage at this kind of philosophy using even marginally polite language.  Is this how we teach our kids to play on the playground?  That if you don't get your way, the next best thing to do is be obstinate and destructive until you get your way?  I fail to understand why our Senators consider themselves above the most basic behavioral traits we try to instill in our youth.

This.  Is.  Disgusting.

This has nothing -- nothing -- to do with political ideology, or about Republicans vs. Democrats.  There are many tenets of the Republican party that I find appealing.  For instance, some elements of Representative Paul Ryan's budget plans are uncomfortable and different from what we are used to, but they are required to address the uncomfortable and different budget problems we face today.  The Republican ideal of a smaller, less intrusive government is broadly appealing to many people.  But Senator McConnell's uncompromising, obstructionist, screw-the-other-guys-at-all-costs is antithetical to everything that this country was founded on and stands for.

When James Madison was asked, "Are there any principles by which the American government works?" he responded, "Yes, there are three: compromise, compromise, compromise."

Look, dammit, you don't win your way back to popularity by being petulant and throwing a tantrum.  You win your way back to popularity by proposing a compellingly better path forward; by being more in tune with what people want; by making a positive case that you can address the current administration's shortcomings.

In business, in the military, and in engineering (and I've been involved in all three), you make your case for your position or your proposed path forward.  Sometimes you win and sometimes you lose.  The team's success requires you to execute the chosen task to the best of your ability, whether it was what you wanted or not.

That is how I expect elected officials to behave, whether I voted for them or not.  Anything less is disgusting.

Monday, June 11, 2012

Inspirational Quote #4

Nike had a stroke of brilliance with their "Just Do It" slogan and campaign.  I mean, what a simple, motivational, and utterly inspiring set of words?  In that vein, I offer this sentiment ... in the spirit of "Just Keep Doing It."


(Mr. Brooks is most famously known for writing the lyrics to "O Little Town of Bethlehem," but sadly, history has kind of neglected his inspirational preaching and writing.)