Thursday, January 29, 2015

A little morning humor...

A little morning humor...  Via reader Simi L.:
Not feeling well, and being concerned about his immortality, Barack Obama consults with a psychic about the date of his death.

Closing her eyes and reaching out to the future, she tells the President, “You will die on a Jewish holiday.”

With much anxiety, Barack asks, “Which holiday?”

“It really doesn’t matter.”  She replies.  “Whenever you die, it will be a Jewish holiday.
Ah, Simi ... thanks for the belly laugh!

Wednesday, January 28, 2015

I got to get me one of these!

I got to get me one of these!  It's so much fun to watch this video.  A car with “insane mode” – that's pure, distilled awesome!  I had nothing but happy thoughts after seeing it.  Then I made the mistake of reading through the comments (mostly from people having the same reaction I did) and seeing this:

I don't want to be on the same planet with these people...

Geek: the impossible just takes a little longer...

Geek: the impossible just takes a little longer...  The reason I started coding again is because I'm working on bringing up my new blog (SlightlyLoony).  It will probably be a few months before I actually start posting there, as I have quite a bit of coding to do before it will work the way I want it to.  Partly that's because I'm hosting it on Ghost, which is a brand-new and not fully baked yet blogging platform.  Mostly, though, it's because I want some features that the Ghost platform doesn't support, and likely never will.

One of those features I wanted is the ability to upload some data to the blog periodically, and then have that data available to people reading the blog.  For instance, I'd like to have the weather forecast for the next few days show up.  I can “scrape” that sort of data from other web sites, then package it up for display on my blog – but to do that, I need to upload that data to the blog server somehow.  Many blogging platforms provide an API for that sort of thing, but Ghost does not.  I spent quite a bit of time on the Ghost forums, researching the issue and asking questions about it.  The conclusion from expert Ghost developers: it can't be done.

This morning I came up with a way to do it, and I whipped up a prototype and tested it – it works!  Best of all, it's easy as can be.  Here's how it works:
  • I created a special “bucket” on Amazon's AWS S3 storage service.  This bucket has the name “”.
  • I created a DNS record (a CNAME record) that aliases “” to the S3 storage URL.
  • I wrote a program that uploads the data of interest to a particular set of files within the S3 bucket.
  • In my client side code (running in the blog reader's browser), whenever I want to access some of that data, I use the URL “[file name]” to get it.  The browser thinks it's on the same host, because “” is a subdomain of “”, where the browser loaded the page from.  No cross-site scripting rules are violated by this.

Holy rocks?

Holy rocks?  Well, holey, really.  Scientists have discovered that the combination of hot rocks (like cooling lava) with microscopic pores in them promotes the development of nucleic acids that can replicate.  In other words, that might be how life began on Earth...

A different kind of optical illusion...

A different kind of optical illusion...  I love this collection of paintings by Ron Gonsalves!

The unending pain of ObamaCare...

The unending pain of ObamaCare...  Reader and friend Larry E. emailed me on this while I was reading the article on Hot Air yesterday :)  It seems that when you tote up all the costs, the federal government is spending about $50,000 for each person covered under the law.  That's far more than it would have cost simply to purchase a pre-ObamaCare policy for each of them.

I like the way Hot Air closed their article:
You were lied to. Again.
Yes.  Yes you were.

Apple makes some great products...

Apple makes some great products ... and they reap great rewards for doing so.  I know that great design is hard.  In a lifetime of engineering, I've only made a couple of designs that I thought were great, and I'm not sure how many people would agree with my assessment :)  But the world abounds with examples of great design, though relatively few of them are in the tech world.  With the example of Apple to validate the model, I'm surprised there aren't a host of Apple wannabes (that is, design-focused high tech manufacturers) visible to the consumer public.  But there aren't...

On a trip I made recently, I had a three hour layover in Houston.  I spent a good part of that time in a store that carried high-end laptops (Dell, HP, Asus, etc.).  All of these laptops cost less (though sometimes not all that much less) than Apple's MacBook Pro, which I use.  None of them, in my not-so-humble opinion, matched Apple's physical design, fit, or finish.  They were very nice laptops, mind you – but they all had easily visible design flaws, or fit and finish issues.  Then there's the fact that they all had Windows as their operating system (with one exception: a Dell that could be purchased with Ubuntu Linux).  After 8 years of using OS X, there is no freaking way I'd go back to the nightmare named Windows.  Not happening.  And Linux's desktops, while much improved, aren't even close to being as usable as OS X yet.

So an Apple fanboi I shall remain, for now :)

A big step yesterday...

A big step yesterday...  I've been a subscriber to The Wall Street Journal for over 30 years, since my first print subscription in 1981.  In the '90s I switched to online-only, mainly because the print edition was always a day late where I lived.  At first the online edition was a mere shadow of the print edition, but within just a few years it was the better choice anyway.  I've been reading (well, at least skimming) that paper every day for all those years.

Starting next week, that's coming to an end – my subscription expires on February 4th, and I'm not renewing.  It's not that I'm no longer interested in its content – I am.  The main reason I'm stopping is that Dow Jones (the publisher) has finally managed to raise the subscription price to the point where I just can't justify it any more.  It's now $300 a year, nearly a dollar a day, to read content that I can largely find elsewhere for free.

So sadly, and reluctantly, I'm saying goodbye...

Tuesday, January 27, 2015

Holy crap!

Holy crap!  I wrote some more code today (Java, JavaScript, HTML, and CSS).  After discovering that bits and pieces of it actually worked, I even committed it to GitHub.  Amazing!

Thermal imaging...

Thermal imaging...  Just a few years ago, this infrared imaging technology cost tens of thousands of dollars for a low-end device.  Now it's available as a teensy add-on to an iPhone or Android, for a couple hundred dollars.  After some quick testing around the house, I can tell you that it works as least as well as those military-grade devices the last time I saw one of them in action.  I haven't seen it in low light level situations yet (we'll try it tonight), but it looks very promising.  Here are three shots I took around the house:

The first one shows Miki, watching Debbie eat her lunch (and hoping for some of it to drop down within his range).  Note how his head – and especially his eyes – glow brightly.  Those are the areas where his body is losing the most heat.

The middle photo is of our kitchen table top, without my hand in the photo.  I made this by placing my left hand on the table top, counting to five, then taking my hand away and snapping the photo.  The infrared camera is sensing the very slight temperature difference caused by my hand's presence a few seconds before I took the photo.  My hand's image was still clearly present 20 seconds later, then rapidly faded away.

The last photo is a closeup of Miki's head (still sitting, waiting hopefully).  The resolution isn't even close to the visible light camera, but it's plenty good enough to discern what you're seeing.

I'm looking forward to trying this tonight, to see if we can spot some wildlife...

Obama rebuilds the American dream...

Obama rebuilds the American dream...  Via my mom:
One Old Lady Who Loves Obama - A DIFFERENT TAKE...

This is certainly a different way to look at what is happening.  One 82-year-old lady loves Obama and she may have a very good point. She says that Obama is amazing, and is rebuilding the American dream!

She gives us an entirely new slant on the "amazing" job Obama is doing, and she says that she will thank God for the President.  Keep reading for her additional comments and an explanation. When discussing Obama, she says:
1. Obama destroyed the Clinton Political Machine, driving a stake through the heart of Hillary's presidential aspirations - something no Republican was ever able to do.

2. Obama killed off the Kennedy Dynasty - no more Kennedys trolling Washington looking for booze and women wanting rides home.

3. Obama is destroying the Democratic Party before our eyes!  Dennis Moore had never lost a race. Evan Bayh had never lost a race.  Byron Dorgan had never lost a race. Harry Reid - soon to be GONE!  These are just a handful of the Democrats whose political careers Obama has destroyed. By the end of 2014, dozens more will be gone.  Just think, in December of 2008 the Democrats were on the rise. In two election cycles, they had picked up 14 Senate seats and 52 House seats. The press was touting the death of the Conservative Movement and the Republican Party. However, in just one year, Obama put a stop to all of this and gave the House and the Senate - back to the

4. Obama has completely exposed liberals and progressives for what they are. Sadly, every generation seems to need to re-learn the lesson on why they should never actually put liberals in charge.  Obama is bringing home the lesson very well: Liberals tax, borrow and spend. Liberals won't bring themselves to protect America.  Liberals want to take over the economy. Liberals think they know what is best for everyone. Liberals are not happy until they are running YOUR life.

5. Obama has brought more Americans back to conservatism than anyone since Reagan. In one year, he has rejuvenated the Conservative Movement and brought out to the streets millions of freedom loving Americans. Name one other time when you saw your friends and neighbors this interested in taking back America!

6. Obama, with his "amazing leadership," has sparked the greatest period of sales of firearms and ammunition this country has seen.  Law abiding citizens have rallied and have provided a "stimulus" to the sporting goods field while other industries have failed, faded, or moved off-shore.

7. In all honesty, one year ago I was more afraid than I have been in my life. Not afraid of the economy, but afraid of the direction our country was going. I thought, Americans have forgotten what this country is all about. My neighbors and friends, even strangers, have proved to me that my lack of confidence in the greatness and wisdom of the American people has been flat wrong.

8. When the American people wake up, no smooth talking teleprompter reader can fool them! Barack Obama has served to wake up these great Americans! Again, I want to say: "Thank you, Barack Obama!" After all, this is exactly the kind of hope and change we desperately needed!!

9. He made Jimmy Carter happy since Jimmy is no longer the worst president we've ever had.
A cheerful read, if you don't think too critically about the assertions.  While I wish I felt the same optimism that the author does, I do not.  I see little evidence (as opposed to talk) that the American electorate is actually supportive of (much) smaller government.  I do remember similar public feelings – when Carter was president – and after a brief flirtation with sanity, the electorate reverted right back to big government proponents (remember the Clinton administration?).  The government is now vastly larger by any method of measurement than it was during Carter's term.  I won't be surprised at all if the government continues to grow, even if we managed to elect, say, Ted Cruz.

Monday, January 26, 2015

Barn progress...

Barn progress...  The painters were here today and Friday, taping and (today) starting to prime the OSB.  On Wednesday the texturing guys will be here, probably for two days, making the walls in Debbie's agility court purty.  Once that texturing is done, the entire first floor will be painted.  Woo hoo!

The folks at Agri-Service came down today and picked up my tractor.  It's going into the shop for a 100 hour service (routine) and for some testing to see if they can find the source of a slow (but very irritating!) hydraulic leak.  We timed it so that we had a week's forecast with no snow in it, so I won't be snowed in without a plow...

Progress report...

Progress report...  We did a lot of different things today.

First, we replaced about 15 of those god-forsaken CFL pigtail bulbs with daylight LEDs – far more light, and at a color temperature we find pleasing (the old bulbs were about the amber of a smoky candle, and not much brighter).  Much better in the rooms we fixed.  The main challenge with this process is finding the right LED bulbs to fit the various fixtures.  This danged house must have 15 kinds of light bulbs in it!  And there are another 6 or 7 rooms left to go :)

Then we replaced the broken wine refrigerator with a new one.  The old refrigerator was a conventional compressor-type cooling unit (just like an ordinary kitchen refrigerator).  The new one uses a thermoelectric cooling unit (using Peltier devices), and consequently is completely silent (no moving parts).  Wine refrigerators, it turns out, are not a standard size – they vary in height, width, and depth.  So far as we could tell, there are no two the same.  The new one we bought is about 3/4" wider and 2" shorter than the one we're replacing.  It's under-counter, so that meant I had to cut 3/4" of the cabinet's facing off (there was plenty of room behind the facing).  I clamped a piece of wood in the right place to act as a guide, then used a battery-powered oscillating saw to do the cutting.  This let me cut right down to the floor and right up to the bottom of the cabinet top, and it made a very nice smooth cut.  It was so nice, in fact, that we're not going to put a trim strip up to cover the cut – it looks finished just the way it is.

Finally, we fixed a silly switch arrangement for the light in the walk-in closet in our bedroom.  That closet was originally an office when the house was first built.  The second owner converted it into a closet, installing shelving along the walls, but not changing the location of the switches and outlets.  One (of several) unfortunate consequences of this decision was that the light switch ended up on the inside of the closet, and worse, on the inside of a shelving unit.  To turn the light on, you had to walk into the closet, make a 180° turn, then fumble around in the dark between clothes on the shelf to flip the switch.  This is not what we wanted :)  So I carefully measured and cut a hole for a junction box on the bedroom side of the closet wall, adjacent to where the existing switch box is located.  Then I wired a new switch into that box, connecting it to the existing wiring inside the junction box that the old switch was mounted in.  Then I removed the old switch, and we're covering that old box with a blank plate.  Now we have a switch where it belongs – outside the closet, next to the door – very convenient.

In the process of doing that wiring, I used a tool that was new to me: a circuit breaker tracer.  I found an outlet that I guessed was on the same circuit breaker as the light, and plugged a signal transmitter into it.  That unit sends a low-power radio signal into the wire.  Then I took the tracer unit – the size and shape of a very fat carpenter's pencil – and ran it up and down the circuit breaker panel.  It squawked on one circuit breaker, and when I shut that one off, the outlets and light in the closet were all dead.  That whole process took about 60 seconds, and eliminated the need to shut off one breaker at a time to find the right one.  Very nice!

Bureaucracies are the same everywhere...

Bureaucracies are the same everywhere...  Yes, even in Canada.

   Some assembly required.

Quote of the day...

Quote of the day...  This time from the Ricochet Daily Shot, on the subject of Loretta Lynch, Obama's candidate to replace Eric Holder as U.S. Attorney General:
Barring any last minute revelations of her killing a bunch of hookers or something, she is expected to be confirmed. (Even if she did off the call girls, she'd probably still be better than Eric Holder.)

Broadband Internet everywhere, for cheap?

Broadband Internet everywhere, for cheap?  That's the vision of Elon Musk, CEO of SpaceX and Tesla.  A couple of weeks ago he announced his intent to create a $10 billion network of low earth orbit satellites as the first step in an interplanetary Internet backbone.  These satellites, presumably launched by SpaceX, would provide Internet access to every spot on the planet.  Late last week, he announced a $1 billion round of financing, led by investments from Google and Fidelity – the first step toward realizing that vision.

Current satellite-based Internet distribution is almost entirely done with satellites in geosynchronous orbit, about 26,000 miles above the earth's surface.  At that altitude a radio signal takes about 1/7 of a second to travel between the earth and the satellite, a delay that is the inevitable result of the speed of light.  That delay may seem small, but it adds up very quickly.  The simplest possible web page (with no images or any other non-textual content) requires a minimum of 5 earth-to-satellite-to-earth signal trips (for the geeks: 3 to establish a TCP connection, then one request/response pair).  Each of those trips takes 2/7th of a second, so 5 trips takes 1 3/7ths seconds – and that's the fastest you can get!  There are some tricksy things that can be done to reduce the number of round trips, but the absolute best one can do is still so many trips that browsing the web feels sluggish – a very different experience than one gets with terrestrial Internet connections.  The geosynchronous satellites do have one very compelling advantage, though: a single satellite can service an entire continent (North America, for example).

Musk's vision for satellites in low earth orbits would have quite a different operating characteristic.  First and foremost, they'd be less than about 1,200 miles high – I'm guessing 500 or 600 miles.  Below roughly 500 miles the atmospheric drag limits satellite lifetimes.  Higher satellites increase the speed of light latency, but also increase the “footprint” (the size of the area the satellite can service).  On the other hand, smaller footprints might be desirable, to limit the number of connections that a single satellite must be capable of.  So my guess is Musk will opt for the lower orbital altitudes, to optimize performance and minimize individual satellite size and complexity.  To guarantee global 24x7 coverage, Musk will need hundreds of satellites – even more if there is to be redundancy.  Hence the $10B price tag, even with assumptions about SpaceX drastically reducing the cost of a launch.

Suppose Musk actually pulls this off (and his track record is pretty darned good).  What would that mean for Internet access?  It would mean that no matter where you were – in a city or in Antarctica – you could get 100mbps+, low-latency Internet access.  Broadband for all.  At sufficient scale (not a small constraint, mind you), the $10B price tag will look like peanuts compared to terrestrial methods that require things like digging trenches and burying cables or fiber.  In other words, if Musk gets enough people on the system, it has the potential to be cheaper than existing broadband connections.  Much cheaper.  If the orbits are at 500 or 600 miles altitude, the latency will be very comparable to terrestrial networks – in other words, no performance downside.

Internet distribution could be the killer app for space.  Google and Fidelity are apparently persuaded that that's a good bet.

And Elon Musk will own the world :)

What would Feynman do?

What would Feynman do?  This is an old blog post by Eric Lippert, but I saw it for the first time today.  It speculates on how Richard Feynman might have answered one of the crazy “lateral thinking” interview questions that used to be a fad at many high tech companies, including (most notoriously) Microsoft, Oracle, and Google.  Some of it is quite funny, especially if you're a Feynman fan.  Here's a sample:
Interviewer: Forget about measuring the voltage already! Suppose you can't reach the fixture to measure its voltage.

Feynman: Again, I must point out that it seems very odd to ask a question about diagnosis of an electrical system while not allowing the diagnostician to use common electrical tools. But anyway, you said that I was on the right track, so let's go with that. We know that modern dimmers do not put a variable resistance across the AC signal; rather, they selectively "cut out" a variable-sized portion of the wave and leave the rest of the cycle in its normal size and shape. We could build a device that works analogously to a dimmer, but much slower. The device could have a couple of rotating cams that flip a switch on and off once a second. Now we need not disassemble any of the switches, or cut the power at the panel. We attach the device to the first switch, flip the second switch off, and the third switch on. Since we have already established that the switches are single-location switches that have been wired correctly according to the NEC, we know that the switch in the "up" position is energizing its lamp and the one in the down position is off.  Now we go into the other room. The lamp that is off is controlled by the third switch, the lamp that is on is controlled by the second, and the one that is flipping on and off every second is controlled by the first. This system will work no matter what kind of lamps are in the fixtures, provided of course that they are good lamps, not burned out.
This reminds me of a story I read about Feynman, though I've forgotten where I read it, and why the story was being told.  In the story, someone who knew Feynman wondered out loud why the altimeter in an airplane always seemed to be wrong.  Feynman launched into a learned discussion of how the altimeters worked (bellows-type pressure gauge), the loose correlation between air pressure and altitude (due to humidity, temperature, and wind), and the numerous engineering problems associated with bellows-type pressure gauges (including non-linearity of the spring force in the bellows, thermal expansion and stiffness variation, and the “stiction” effects caused by metal crystals rubbing on each other).  Feynman's companion asked how Feynman came to know all this about how altimeters worked – and it turned out that the only thing Feynman knew was that they used bellows-type pressure gauges.  Everything else he deduced or inferred – classic Feynman...

Sunday, January 25, 2015

Coding again...

Coding again...  It's just over a year since the last time I wrote any Java code.  Today I wrote a short little program, doing a little web scraping – and it works.  I've forgotten tons of details, but I know the concepts very well (I should, after 15 years of Java experience!), so I'm picking those details up very quickly.  Before I could start writing code, I had to renew my subscription for my IDE (JetBrains' IntelliJ IDEA – I love the darned thing).  Then I discovered that IDEA doesn't like the default OS X 10.10 Java version – it wants a down-rev (Java 6) because of problems in the later JRE libraries.  So off I went to downgrade my Java.  That made all sorts of other things complain, and my log was growing at a prodigious rate – had to track down three hateful apps and figure out how to make them shut up.  Finally I could try writing some code!

My dumb little program reads a URL to get the HTML content, then parses it with a regular expression to get the three particular parts that I wanted.  It took a while, but I got it all working.  One of these fine days it will be part of something I want on my new blog: the ability to present third-party content that lives at a URL that varies (typically daily or more often).  JavaScript running in the browser is not permitted to look at the HTML of any site other than the one being browsed, so it can't do things like this.  My plan is to have a program that runs a few times a day on a server, finds all these content pointers, and then updates an assets file on the blog's server so that information is available to the code running on the reader's browser...

Progress report...

Progress report...  An electrical day.  I raided Home Depot for a couple additional ceiling boxes and some LED lamps.  Then Debbie and I put up the last two lighting fixtures in the cattery.  Those two had the same junky boxes as the first two, totally unsuitable for hanging lamps from.  In the process of installing the last two (which are controlled by the same wall switch), I discovered that the switch was miswired – and that it was (like many others in the house) a cheap piece of crap that was only working intermittently.  I fixed the wiring and replaced the switch.  Then I did the same exact thing in our bedroom, replacing two cheap switches that were operating intermittently.  One of them made a delightful sparking sound every time you turned on the lights.  Fixed now.

So now the cattery has beautiful bright white (daylight color temperature) lighting, even and mostly free of shadows.  Extra bonus: the switches work correctly, both there and in our bedroom.  I only have about 150 outlets and 60 switches to go...