Thursday, October 30, 2014

Data: it's what's for breakfast...

Data: it's what's for breakfast...  The next time some low information numbskull tries to tell you how horrible the wars around the world are these days, and how we're all going to die – show them the graph at right.

Humans have never been this safe before.  Ever.

When you show this to someone who believes, deep in their low information heart, that the Iraq war killed more Americans than all other wars combined ... you can tell from their face that their brain is frying right in front of you.

Source.  More...

Amelia Earhart: mystery solved?

Amelia Earhart: mystery solved?  Well, not yet –
– but now there is a very credible piece of evidence that says she and Fred Noonan (her navigator) made an emergency landing on the remote Nikumaroro atoll, and perished there before anyone could rescue them.  The piece of metal at right – found on Nikumaroro – has been positively identified as being part of Earhart's plane.  Sonar studies have found an object, 600' underwater, that could be the wreckage of her plane.  Much more here.


Comet 67P, close up and personal...

Comet 67P, close up and personal...  Rosetta is getting down close to Comet 67P's surface (just 6 km!) to prepare for the launch of the Philae lander in just a couple weeks...

Antares explosion...


Antares explosion...  Doug S. passed along this Fox News story on the Antares rocket explosion.  Most of the coverage I've read has been dominated by ignorant reporters breathlessly leaping on this single failure as if it were some sort of world-class disaster, proving the inability of American industry to successfully launch rockets into space.

Orbital Sciences (the builders of Antares) chose to use refurbished Russian engines for Antares because at the time of their choice it looked like the best combination of cost, speed, and reliability.  Years of NASA mismanagement (which continues unabated) had practically destroyed anything resembling innovation or advancement in American rocket technology.  The Russians had a solid, reliable – even though old – rocket engine technology, and it was available cheaply because of the fall of the Soviet Union and the Russian desperation for hard dollars.  American companies – especially those in bed with NASA – were forecasting decades and multiple tens of billions of dollars in development costs.  Did Orbital Sciences make a bad choice?  I don't know any reason at all to believe that.

A rocket blowing up is not exactly a new phenomenon.  We've had our own share of that with American rockets, and so have the Russians, Europeans, and Chinese.  Rockets, especially the larger ones, are marvels of complex technology straining at the very edge of what's possible.  It's amazing to me that any of those rockets don't explode!  Someday we might advance rocket technology to the point where launches can be thought of as routine and safe, but today is clearly not that day.

Here's some additional coverage, some of it a bit more objective than the Fox News report: here, here, and especially here...

If you find maggot infestations extremely disgusting...

If you find maggot infestations extremely disgusting ... then your political inclinations are most likely conservative.  Or so says this study.  It also makes the claim that a tendency toward progressivism or conservatism is closely correlated with how strongly you react to something disgusting – and that both of these are primarily heritable traits.  That last bit – that political tendencies are heritable – is particularly scary, as that means demographics favor the progressives (mainly because minorities vote overwhelmingly for Democrats, and they have more children than any other voting group).

This reminds me, though, of an odd factoid I read years ago: a ranking of voting preference by profession.  Sanitation workers and septic tank cleaners were top of the list for progressives.  Hmmmm...

European language tree...

European language tree...  Beautiful!

Obama says: “Please don’t vote Democrat...”

Obama says: “Please don’t vote Democrat...” ScrappleFace...

Earth-moon system...

Earth-moon system...  As seen by the Chinese Chang'e 5 spacecraft as it zoomed around the far side of the moon.

When I was a young lad in the early '60s, I remember eagerly watching the news as it showed the grainy black-and-white photos returned by early NASA robotic missions to the moon.  We've come a long way since then, but the Chinese have progressed even more.  In the early '60s, while we were shooting for the moon, Mao was firmly in control and his crazy policies were killing millions and had the country retreating rapidly toward the Stone Age.  Now China is successfully developing and launching robotic explorers on their own, and seem on pace to rival NASA's capabilities...

Election fraud?

Election fraud?  A few days ago I posted about reports of voting machines in Illinois registering votes for Democrats when the voter tried to select Republican candidates.  The election officials called that a “calibration error” and said it was limited to a single machine.  Since then, many more cases have been reported, in Maryland as well as Illinois.  Both states are notorious for their past history of election fraud.  For some reason, that made me suspicious :)

Now there's video (from Moline, Illinois) of this “calibration error” in action.  You decide: fraud or calibration error?

Wow...


Wow...  It's impossible for a white male like me to accurately imagine what it's like to be a minority in a predominantly white country, but I've tried hard.  It's helped that over the years I've had good friends who are non-white, and who would talk with me openly.  Despite my best attempts to understand, one thing that has always puzzled me is why minorities overwhelmingly vote Democratic – the observable track record of the Democrats in America's large cities is abysmal, especially with respect to minorities.  Mind you, I'm not at all sure the Republicans would have done any better, but for decades now they've had almost no chance to even try administering our big cities.  While we've had the occasional Republican mayor (e.g., Rudy Giuliani in New York, Pete Wilson in San Diego), and the occasional Republican city council member, by and large America's largest cities have been controlled and run by Democrats.  The biggest reason for this is that minorities (especially blacks and Hispanics) vote for Democrats in percentages routinely exceeding 80%.  Why?

The speakers in the video at right are leaders in the black community, well-known and well-respected.  I speculate that the scales have (finally!) fallen from their eyes because of Obama's overt failure to deliver – despite his being black himself.  Whether I'm right about that is irrelevant, though.  I'm hoping that their disillusionment is the beginning of a trend – not to have minority voters vote Republican, but rather to have them think about who they're voting for, rather than voting reflexively for any one party...

Wednesday, October 29, 2014

On diamond drill bits...

On diamond drill bits...  Well, technically they're hole saws, but I'm using them as if they're drill bits.  One of the characteristics of these diamond bits is that they wear out pretty quickly on hard substances (like the porcelain tiles in our bathroom).  I've been getting 8 - 10 holes from each drill bit, and they're about $15 each – so it's costing me over 50 cents in tooling for each hole.  That's not something a homeowner generally has to worry about with drill bits :)

I got to wondering exactly how these bits were made, and what they look like close up, so I stuck a used one under the microscope.  This one still has some life in it.  In the left hand photo (about 15x) you can see the composite of metal and diamond chips that make up the working surface.  The white “frosting” is dried porcelain tile powder from the last time I used it.  When drilling, I keep the bit wet, so the ground off porcelain forms a kind of slurry or mud that sticks to the drill bit, then dries very hard.  The diamond chips are transparent, and pale yellow or green in color.  I have no idea what kind of metal they're embedded in.  The right hand photo is centered at the same spot, but I zoomed it to 60x; in it you have a clearer view of just those chips.

I couldn't see any of this with just my eyeball.  With my fingernail I can readily feel that the surface is rough, but to my eye it just looks like a matte-finished metal surface.  It's very different when magnified!


Progress report...

Progress report...  The barn builders haven't been here this week, darn it.  They're off on another job down in Ogden.  I'm not sure when they're coming back, but hopefully tomorrow.  Sheathing the interior and putting siding on the exterior are the next steps.  Also installing the electrical service and the heating boiler, along with toilet, sinks, etc.

The roofers skipped a couple days because the head demolisher was sick.  They were back today and demolished another quarter or so of our home's old roof; they're just over half done with that now.

I've been busy as heck, installing ceiling fans, fixing electrical problems, and (most recently) installing blinds.  Prior to this morning, the only privacy in our bedroom was provided by the thick foliage on the trees and shrubs outside.  In the past week, basically all the leaves of deciduous trees fell off.  Not wanting to frighten all the local young women, I thought it would be a good idea to get those blinds up.  As of this afternoon, we've got blinds on all the bedroom windows, plus the bathroom window.  The latter was a real pain to put up, as I had to drill four holes through the porcelain tiles lining the window casing, and I had to drill them up, as the blinds mounted on the top.  My arms hurt :)  But I got it done...

The last ceiling fan I just finished yesterday morning.  It was far more challenging than I had expected, mainly because someone (presumably the previous owner) had seriously botched the installation of the one I was replacing.  The old ceiling fan was mounted to a blue plastic junction box, which in turn was held in place by two nails into a joist – not even close to being strong enough to hold up the fan.  The previous owner “solved” this problem by putting six large sheet metal screws into the sheet rock on the ceiling.  Ack!  That fan was right over their bed, too – totally unacceptable.  So I had to get rid of all the old bad installation, patch the screw holes, repaint that part of the ceiling, install a new metal junction box (working in a 5" diameter hole!), and only then could I install the new fan.  I was very glad to finish that one, I don't mind saying!

One nice thing about the old ceiling fans: all four of them have new homes.  One of our neighbors lives in an older house, and they're always looking for ways to upgrade.  They took the three nicest fans to replace two not-so-nice ones they have now, plus add one to their workshop.  The fourth old fan has a much more interesting future ahead of it: one of this blog's readers (“eg”) inquired about getting just the motor from it – to make it into a potter's wheel!  That particular fan had a kind of cheesy looking fake brass exterior, and I was just going to toss it.  How great that someone can use the one part that looks good on it!

Why dogs kick when you scratch their belly...

Why dogs kick when you scratch their belly...  The things I never new before!

A great intro to calculus...

A great intro to calculus ... by someone who taught himself through online materials.  It's a perspective I appreciate :)

24 things they should have taught me in school...

24 things they should have taught me in school...  The GIF at right shows how camouflage paint is applied to a helmet.  All 24 here...

Tuesday, October 28, 2014

Scientists and floating point math...

Scientists and floating point math...  An article I read this morning makes a valiant attempt to demystify floating point math for scientists.  I'm not sure it succeeds :)  Reading it reminded me of an experience I had back in the early '80s.

A San Diego company had themselves a real problem.  They'd contracted with an independent consulting engineer (very common back then for anything involving microcomputers) to develop a TTY modem that ran on a single chip microcomputer.  This was to be part of a device to allow deaf people to use telephones.  Telephone companies had recently been mandated to provide such devices for deaf customers, and this company was trying to win the bid to supply the local telephone company with thousands of them.

The problem was that the engineer they hired had quit in a huff, and claimed to have accidentally destroyed the source code for the firmware on the chip.  All the company had was a single mostly-working chip, from which the object code could be read.  They wanted someone to reverse-engineer the code, deliver the reconstructed source code, and (ideally) to fix the problems.

I took that contract, but only on an hourly rate basis, as I had no idea what I was going to find.  The company didn't like that much, but they also had no alternatives.

The firmware had originally been written in assembly language, as most performant things were back then.  That was a mixed blessing.  It was easy to get the source code back without useful symbol names – but quite challenging to actually understand the code and assign useful symbol names.  I spent several weeks totally immersed in that code.

A big part of the code turned out to be a floating point package, one that the previous engineer had apparently written himself.  I had just written one of these a few years prior (as part of Tarbell Basic), and I'd also written one while in the Navy, so I had some familiarity with how to do this.  This particular package had some trigonometric functions in it that were used by the modem software – and those trig functions were written in a way that caused cumulative errors of exactly the kind described in the linked article.

So I went back to the company who hired me and told them that I'd found a significant problem, and it was one that could be fixed.  Naturally, they wanted to know what the problem was.  While explaining it to the engineering team, I discovered that the source of the trig function algorithm was a scientist who worked for the company: he had handed that algorithm to the former programmer, who implemented it as asked.  So the source of the problem wasn't the programmer, but rather this scientist (a physics guy who knew about digital signal processing).  Next thing I know, I'm lecturing this scientist on the details of how floating point worked, and he really, really didn't want to hear it :)  In the end, the only way I could convince him was by constructing simple test cases and showing him the results.

There was a happy ending to all this, though.  Once I convinced the scientist of the errors consequent to his algorithm, he was willing to listen to some alternatives.  One of them was a well-known approach that avoided the cumulative error problem and also was many, many times faster than his algorithm: a simple polynomial approximation.  I didn't invent this; I got it from a book written in the '50s by someone with the appropriate degree.  Even the scientist was happy with this one!


Geek: fast inverse square root hack...

Geek: fast inverse square root hack...  This has long been one of my all-time favorite hacks, mainly because it looks so incredibly unlikely at first blush (a magic constant of 0x5f3759df? really?), but then turns out to have a solid reason why it works.  I've read explanations before, but none so clear as this one – and I love the generalization of it to other powers besides 0.5...

A habit of ignorance...

A habit of ignorance...  Way back in 1972, I had recently enlisted in the U.S. Navy and was attending a series of schools at the Mare Island Naval Base near Vallejo, California.  The first training I underwent was for basic computer repair, and that training started with a dose of digital logic.  One of the first things we were told was that if we flunked out of this school – as about a third of the attendees would – we would be reassigned to another school on the same base: the PBR (river patrol boat) school.  These were plywood boats, lightly armed, that patrolled Vietnamese rivers – and their crews had the highest casualty rates of all the armed forces fighting in Vietnam.  That concentrated my mind wonderfully, to steal a turn of phrase from Mark Twain.

One consequence is that I paid serious attention to the classroom work, even when it didn't appeal to me – something I had never done before.  I also started observing the students that did well and those who did not, the better to guide myself.  There was an “Aha!” moment for me one day that I can still remember vividly.  The instructor posed a problem on a blackboard (with chalk!) and asked who had an idea how to attack it.  The couple of high-performing students I was observing looked puzzled and kept their hands down.  Nearly everyone else raised their hand – and not a one of them had any clue how to tackle the problem posed.  The “Aha!” was that the best students were the ones most comfortable with being ignorant.  How interesting!

That started me on what became a lifelong (and by now, pretty much reflexive) habit: to frankly acknowledge my own ignorance, both to myself and to others.  I don't always succeed at this, as my friends will attest :)  I'm better at doing so on technical subjects than on others.  I've learned that recognizing my own ignorance is a prerequisite to motivating myself to address that ignorance.  In other words, a key step in acquiring new technical knowledge is to recognize that I need that knowledge.  That might seem like a little thing, but it's played a very large role in my career.  There are an infinite number of interesting technical subjects that I'm ignorant of, and therefore no end of things for me learn.  I've never been comfortable when not learning; in fact, any situation that doesn't require me to learn something new is one that I find boring.  I've also learned that admitting ignorance does not lower the degree of respect that others have for my technical ability – in fact, it may do the opposite.  Because people know that I will readily admit to not knowing something, they tend to believe (not necessarily with justification :) that if I am not claiming ignorance, I must have some idea what I'm talking about.

Because of this context, I found this article quite interesting...

Farmhouse and scenery...

Farmhouse and scenery ... in Tuscany...


“Maybe the Vietnamese should send us some advisers.”

“Maybe the Vietnamese should send us some advisers.”  That line, from a column by Glenn Reynolds (aka “Instapundit”) certainly caught my eye.  I'm old enough to remember when Kennedy sent American military advisers to Vietnam, and I was in the U.S. Navy, taking South Vietnamese refugees on board our ship after the fall of Saigon.  That line has an emotional context for me.

So what's Mr. Reynolds talking about?  He's riffing on a study showing that just 70% of Americans believe people are generally better off under capitalism, with its attendant inequalities – but 95% of Vietnamese believe that.  Maybe we should take on some Vietnamese advisers!

The column makes some interesting points, and is well worth the read...