Sunday, October 18, 2015

Twelve foot tall Cosmos!

Twelve foot tall Cosmos!  My mom sends this photo, saying:
Special soil prepared by Scott, grown in 12 inch pot on my deck this summer...is 12 + high and just started to bloom. That is some nutritious soil! Warren is 6 feet tall.
Scott is my brother, soon to be moving out here to Utah – and hopefully, to be providing said super-soil to us! Warren is my brother-in-law, who (when he's not gaping at giant Cosmos) is a great help to my mom by taking care of a zillion little (and some not so little) maintenance issues at her house.

Newspaper headlines...

Newspaper headlines...  Reader Simi L. sent along a great collection of classic newspaper headlines.  Many of them I'd seen before, but not these:


First findings released by New Horizons team...

First findings released by New Horizons team...  Good article here.  Lots of new raw photos, too, like the one of somewhere on Pluto at right.  Pluto's surface is weird!

Mammatus clouds...

Mammatus clouds...  The word “mammatus” is Latin for “having breasts”, which pretty much guarantees these are my favorite kind of cloud :)  I've only seen them myself one time, in the Philippines when I was there in the U.S. Navy, in the '70s.  Via APOD, of course...

Mythconceptions...

Mythconceptions...  An interesting compilation in the form of an infographic...

Warthogs in Estonia...

Warthogs in Estonia...  Gorgeous photos of American A-10 "Warthogs" parked under the aurora borealis at a military airfield (Ă„mari Air Base) not far from Tallinn, Estonia...

Paradise ponders...

Paradise ponders...  It's raining today; started late yesterday afternoon in a stop-and-go kind of way.  There hasn't been much accumulation out.  The temperature is in the mid-50s, and it's 100% humidity (naturally), so it feels fairly chilly out even when it's not actually raining.  It will be mostly an inside day today, I think.  The dogs and I will have to live without our beloved morning walk.

I've been working away on a couple of tough (and therefore interesting) programming challenges.  The first one is comparing the result of a double precision floating point with zero, where we want the result of the comparison to zero to be true even when the result of the subtraction is slightly different than zero.  That's a far harder problem than one might think, a special variant of the also tough general case of simply comparing two floats.  Click on the link to that article if you'd like to know more about the whys and wherefores.

I had an insight yesterday that led to a nice solution for me.  In my original formulation, I did something like this:
if( nearlyEqual( a - b, 0.0, epsilon ) {...}
Where a and b are doubles, and epsilon is how close a - b and 0.0 must be in order to be considered equal.  This is a conventional comparison: you subtract the two numbers and compare the result to zero.  In this case, however, the results can be wildly different than what you expected, as that linked article explains.

The solution was crazy simple: I simply rewrote the formulation as:
if( nearlyEqual( a, b, epsilon ) {...}
Voila!  No more problem.  It always gives me a kick when I beat my head against the wall working on a tough problem, and the solution turns out to be easy!

The reason this solution worked is that epsilon is relative to the exponents of the numbers being compared.  In the first formulation, if one or both a and b are computed and should be considered equal, there will likely be a very small difference between a - b – but exactly how small depends on the size of those numbers.  In general, the exponent of the difference will be roughly 16 (base 10) less than the exponent of the given numbers.  So if the two numbers were on the order of 10^100, the difference would be on the order of 10^84 – a tiny difference relative to the given numbers, but a long, long way from zero!  So of course they don't look like they're nearly equal.  In the second formulation, because a and b are the inputs to the nearlyEqual() function, the function knows what their exponents are, and can accurately judge what's close enough.  Oh, so easy!

The second issue I haven't solved yet.  I need a hash function over an array that is sensitive to each nonzero value and its index.  The function should generate different results if the values at a pair of indices are swapped, and should generate the same results no matter what order the values and indices happen to be presented in.  I'm still pondering that one...

Saturday, October 17, 2015

Paradise projects: the next one...

Paradise projects: the next one...  We've been waiting quite a long while for this project to get started – getting a well drilled on the parcel that has our shed on it.  This well is mostly a backup in case something happens to our spring.  The well water won't be nearly as good as the spring water, but it should be far more reliable.  My plan is to run the well feed into the shed, set up a water conditioning system (softening and iron removal) there, along with a cistern (probably 1,000 gallons), secondary pump, and pressure tank.  I'll use the water in the barn and its surrounding landscaping, but mainly it will be there as backup for the spring.  To make that work, I'll have a bit of plumbing done so that I can switch the use of the pipe between feeding the shed from the house and vice versa.  Then if anything ever does go wrong with the spring (or its associated cistern and pump), I can just flip a few valves and get water from the well.

Several of my neighbors recommended the well driller – one Elray Westlake of Preston, Idaho.  Most of these neighbors had had bad experiences with one or another of the other local drillers (Preston is just a few miles north of Logan; we're quite close to the Idaho border here, so Elray is really still local).  Of Elray, though, everybody had only good things to say.

I first contacted Elray in September of 2014, just over a year ago.  He had quite a big backlog of work as the local construction industry was shaking off the recession.  I told him my requirements weren't urgent, and he should just keep me in mind the next time he had his rig down near Paradise.  About six weeks ago, he contacted me and said he'd soon be ready to start.  We've talked a few times since then – he's quite a character, very entertaining to talk with – and yesterday he called to say he was ready to go.  Sometime today he drove his rig over, along with a couple of trailers full of casing pipe.  You can see all that in the photo above, where he's parked along the north side of our little pine forest.  The well is going in just behind the drilling rig.  On Monday the work begins!

What sort of camera do I use?

What sort of camera do I use?  A reader wrote and asked, so I'll answer for everyone: for over a year now, I've used nothing other than my iPhone 5.  Usually I don't even post-process them; they're straight out of the camera.  Occasionally I'll do a little color-correction, temperature-correction, or cropping (I did all three on a few photos this morning). 

Do I miss the 35mm SLR?  Most of the time, no.  And I certainly don't miss lugging all that stuff around!  The iPhone's convenience and the fact that I'm always carrying it on my person trumps the technical advantages of the SLR the vast majority of the time.  Occasionally I miss the telephoto lens (naturally, the biggest and heaviest of the lot), especially for wildlife.  Even more occasionally I miss the macro lens, for flower closeups.  Most of the time, though, the combination of the wide angle lens on the iPhone and its pixel density lets me do anything I want to. We'll be getting a new phone sometime soon, and the new iPhone 6 camera with built-in optical stabilization and even higher pixel density will only increase these factors.

I likely will get a system camera again someday, but I'm guessing that it won't be a 35mm system.  The old standby camera companies (Nikon, Canon, etc.) are struggling because so many of the people who would formerly have purchased their 35mm SLR products are moving to either the smaller dedicated cameras or, like me, are simply using their mobile phone's camera.  The camera companies still have the advantage on the glass (the lenses), but the phone companies (especially Apple) have the upper hand on the software, display, and integration side.  The sensors are pretty much a tossup.  I'm sure this will all settle out one of these days, and somehow some company is going to get the best of both worlds.  I wouldn't dare try to predict which company that would be; there are just way too many possibilities.  About the only thing I'd bet on would be that the sensors in the future will trend smaller than 35mm, and consequently the lenses will be much smaller (and therefore more convenient!).  When it looks like the dust has settled for a while, and that there's something resembling a standard for the glass emerging, that's when I'll likely jump into a system camera again...

Paradise ponders...

Paradise ponders...  Our salmon yesterday afternoon was great.  We had the Ora King salmon again, with Debbie's technique of baking in foil with a mayonnaise-peppadew concoction on top.  Yummy stuff!  She also made a sort of stir-fry of potatoes, onions, and fresh bell peppers from our neighbor's garden.  Also extremely yummy!  We were both so full we could hardly move afterwards, though...

The mutts (Miki and Race) and I went for our walk this morning, after missing the past two days for various and sundry reasons.  We hit the trail shortly after the sun poked its way up over the Wasatch Mountains, in a partly cloudy sky.  This made for some interesting lighting effects, in some cases nicely highlighting the fall color.  I spent the entire time looking at the scenery, and didn't actually notice any wildlife (though I'm sure it was there!) until we were walking back over the irrigation canal bridge in our driveway.  There, in a box elder tree on the north side of the bridge, was a big, noisy flock of chickadees.  There must have been at least two dozen of them, all chattering away like mad, and flitting to and fro for no apparent reason.  Miki (the bird dog) completely ignored them.  Race (the sheep-herding dog) watched them intently, perhaps thinking that they looked like they needed herding :)  Some photos of Paradise for you:


Down the rabbit hole...

Down the rabbit hole...  That's where I've been going, in my bits and pieces of spare time.  The particular rabbit hole of the moment is matrix operations on gigantic (m x n on the order of 10M) but quite sparse (non-zero entries less than a couple percent).  These matrices are used to solve large systems of linear equations, where most operations are done on rows.  There are some special challenges here.  For instance, the sparsity changes (both up and down) as the calculations proceed.

I'm far from the first person to ever solve such problems – people were working on this exact problem back in the '50s and '60s.  There's an enormous body of both research and practical implementations – but remarkably little that's open source, and none that I've been able to find in Java that's well-suited to my problem (circuit simulation).  I'm quite surprised by this. On digging into what it would to implement it myself, I've discovered that it's not really all that hard, and that most of the challenges are in optimizing for the large scale of the operations involved.  Some of the optimization is actually compression.  That all feels like familiar territory – I know very little about matrix arithmetic, but there are a lot of articles and papers on implementation freely available on the web, and it all looks like stuff I should be able to do a good job implementing.

So down the sparse matrix arithmetic implementation rabbit hole I go :) 

SPDX: an interesting (and easy!) solution...

SPDX: an interesting (and easy!) solution ... for one of the more annoying challenges facing software engineers these days: copyright and license notices in source code...

New Enceladus photos from Cassini...

New Enceladus photos from Cassini...  There are lots of interesting raw images (like the one at right) to peruse, and a short article on the recent close flyby (closest one ever; they're accepting more risk as Cassini nears the end of its long and incredibly productive life)...

Friday, October 16, 2015

Paradise ponders...

Paradise ponders...  I had quite the busy day yesterday, working with Tyler (the generator guy).  Early in the morning I headed up to Thomas Petroleum (where I bought the propane tanks), with the mission of exchanging the regulator I'd bought the day before for a new one with lower output pressure.  That turned into a very educational experience for me – these regulators are more complicated than they appear at first blush.  Working with an engineer there, we figured out that for our situation we actually needed two regulators (see second photo below): a primary (the red one) and a secondary (the green one).  The most unexpected discovery to me is that a single regulator stage can't reduce the pressure from the roughly 200 PSI of the tank to the roughly 1/2 PSI that the generator needs.  That 400:1 reduction is beyond the capability of these diaphragm-based mechanical regulators.  We need two regulator stages, each reducing the pressure by about 20:1, to get that kind of overall reduction.  There are two-stage regulators in a single package, but they can't produce the volume of gas needed by the generator – so we had to get two individual regulators, each fairly large, to do the trick.  I now know way more about gas regulator systems than I ever wanted to know as a result of this exercise :)

Because we needed two separate regulators, the plumbing as originally constructed wouldn't work.  I gave Tyler a call to let him know the bad news, and we figured what would be needed to get the plumbing right, and gave the plumbers a call.  Tyler came to the house a short while later, finished the last of the wiring (you can see this work in next-to-last photo – that's a lot of really big wire crammed in there!), and then it was time to give it a try.  This time it fired right up.  It works ever so much better when the engine is getting fuel!  Then Tyler did a little bit of clean-up work, removed the forms from the slab he'd poured on Tuesday, and he was done.  We're now fully backed up, both house and shed.  Yay!

Overall I'd unhesitatingly recommend Tyler and the Golden Spike Electric crew to anyone who needs a generator.  They were wonderful to work with, accommodating to our needs, and did a job far better than I know how to do.  They're also just plain nice folks, the kind I'd like to have over for dinner sometime...


This morning Debbie and I left at the first blush of dawn to go wildlife viewing in Hardware Ranch and Ant Flats.  We had a spectacularly successful outing!  First up was a group of deer: a doe, a yearling, and a young buck.  It's a little unusual to see a buck in a group like that, so we speculate that it was that doe's two-year old son.  We watched them mosey down the mountain from our left, cross the road right in front of us, and head down to the river on the right.  A little further down the road, we saw an osprey stoop toward the river, just opposite us, and pull back just before hitting the water.  Then we watched him fly around, including directly overhead at perhaps 30' of altitude.  Great osprey viewing!  After he flew away, we headed out toward ant flats and stopped to look at the trout – and I spotted a dipper headed down the stream toward us.  This little fellow perched on a large rock in the middle of the stream and spent the next ten minutes posing for us.  That was by far the best view of an American Dipper we've ever had.  We continued for a mile or so on Ant Flat Road, then headed back to Hardware Ranch to see if we could see some elk.  None of them were in view, but on the way out we spotted a kingfisher perched high on a twig, not above the stream where we usually see them.  We stopped, fully expecting him to take off (as they generally do), but this one changed perches a few times until settling on a thick fence post, then did a slow 360° turn as if posing for us!  We were able to watch him continuously for over five minutes, while he was fully sunlit, and from every angle.  Great!  Finally, as we headed back down the canyon toward Hyrum, we spotted a pair of northern harriers, near the road, hunting over a large meadow while being harassed by a group of crows.  We had exceptionally good viewing of their low-altitude, slow-speed hunting – fully showing off their agile flying.

We love living here :)

Near Hardware Ranch there's a water bubbler, no longer working, that memorializes one A. J. Peterson, who had something to do with the establishment of the big game unit at Hardware Ranch.  I couldn't find out much about him online, and nothing definitive.


When we got done we decided to repair to Crumb Brothers for breakfast.  That was, of course, wonderful (croque madam for me, chocolate biscotti for Debbie). Next up is a grocery run, and Debbie is going to make us some Ora King salmon for dinner.  That's some mighty fine eating for us today!

Thursday, October 15, 2015

A paean to capitalism...

A paean to capitalism...  By Claire Berlinski, with a geekly bent, so you really should read it.  The comments are good, too.

This is your state...

This is your state ... when progressives take over!  California, New York, and Massachusetts aren't far behind...

This just in!

This just in!  Liberals surprised when reality smacks them upside the head...

A mature star...

A mature star ... with a mess of objects around it.  What is it?  One possibility: an advanced civilization.  There are other possibilities, too, but that one is exciting.  Naturally, scientists are all over it...

Paradise ponders...

Paradise ponders...  Yesterday I ended up spending almost all day helping with the generator installation, including several runs for parts (and I have another run to make this morning!).  In the morning the “gas guys” showed up and connected the generators to the propane tanks.  To my surprise, they used black iron pipe – which means they had to cut and thread the pipe to length.  In the case of the shed that was easy; for the house, not so much – the regulator was missing from that tank.  I had to make a run first to get the regulator, then to get the special connector to hook it up to the tank.  Late yesterday afternoon we discovered that the regulator was the wrong kind (it's pressure output was too high) and this morning I have to run to get a replacement.  The “run” in this case is 12 miles (each way) to the south end of Logan.  I'm going to be there at 8 am when they open :)

The first photo below shows the shed's backup generator, now completely installed and tested.  I was surprised at how quiet it was when we lit it off for testing – we could easily hold a conversation while standing right next to it.  Of course, this is the smaller one – we'll see how quiet the big one for the house is.  The other two photos are some details of the final wiring and startup process for the generators.

That startup process was far more involved than I'd have imagined.  Most of the work came from installing cold weather kits: a battery warmer (basically a heating pad wrapped around the battery) and a block heater (a circulation pump with a 1500 watt heater that keeps the coolant well above freezing).  Both of these ensure that even on the coldest days the generator will start quickly.  At least, that's the claim :)  The block heater involved considerable plumbing work, including working on components apparently designed for midgets with no skeletons.  Some of that was really challenging to get done!  Also challenging: swapping out the pre-installed carburetor orifice for natural gas for the smaller one needed for propane.  The main problem there was that none of us had the right tool – a very wide, thin flat blade screwdriver would have done the trick, but the ones we had that were wide enough were too thick, and the ones we had that were thin enough were too narrow.  Arggh!  Gerard (the startup guy) solved the problem with a little hammering.  It wasn't pretty, but it worked.

The fact that we had the wrong regulator on the house's propane tank prevented us from test starting the house generator.  In addition, Tyler (the electrician) was short a couple of components, and he'll be back today to finish that up.  Yesterday afternoon the power was turned off to our house for a couple hours, and also to the pump house (the building whose side is visible in the last two photos below).  Tyler got it all turned back on before he left for the day.  However, as I was taking my shower last night – just as I lathered up my hair with shampoo – our water completely shut off.  I took a guess that Tyler forgot to turn the breaker for the pump back on, and that we'd been using water out of the pressure tank all evening.  So I wiped off the shampoo lather with a towel, got dressed, grabbed a flashlight, and wandered out to the pump house (which is about 100' east of hour home).  Sure enough, the pump breaker was off.  Dang.  I flipped it on and by the time I got back in the house and re-undressed, the shower was good again.  Tyler's going to get some grief from me this morning :)


We had a very nice wildlife watching drive on Tuesday evening that I forgot to write about.  We drove out toward Hardware Ranch and up Ant Flat Road where we'd seen the baby beaver a few days before.  On the way up there, we had a kingfisher flying parallel to us, 15' or so from the truck's passenger side.  That was a short, but great view of him!  Then a little further along, pretty close to the turnoff to Ant Flat Road, we spotted a norther harrier hunting out in a big pasture – and watched him for a good ten minutes.  What spectacular low-altitude flyers they are!  After we left there and meandered up Ant Flat Road, we spotted a little gray bird down along the stream – and then saw it bobbing up and down.  A dipper!  That's one in the photo at right (not mine).  We knew they were hear from our reading, but hadn't spotted one before.  We've seen them in the San Juan Mountains, but always briefly.  Here we got to watch this fellow for ten minutes or so, with all the classic dipper behaviors: the bobbing, the swimming, the short hunting flights.  It was great!  Just before we headed for home, we drove out to the Hardware Ranch overlook, where we've seen all sorts of things.  This time there were a few people there with telescopes and binoculars, and when we looked that way with our binoculars we saw why: a herd of elk descending down a hill to the north of the overlook.  They're coming into the winter enclosure (which is the reason the overlook is there) where they'll be protected and fed during the winter.  What a great wildlife adventure!

Wednesday, October 14, 2015

Paradise ponders...

Paradise ponders...  Well, the generator folks showed up yesterday as promised, and much progress was made.  Some photos below shows the work in process.  I'm very pleased with the quality of the work they're doing.  The electrical work is top-notch – no shortcuts are being taken; the best parts and techniques are being used throughout.  They're doing a better job than I could do myself, thanks to their knowledge and experience.  What more could we ask?  The third and fifth photos below are of the generator for the shed; the other three are the generator for the house.


Miki, Race, and I went for an early walk this morning, along the route we used to do every day.  I've been taking alternate routes for a couple weeks, so now the “usual” route is the unusual one :)  The dogs were just as happy as always, in the crisp pre-sunrise air.  The former barley field that had turned green with a grass of some kind is being disc-harrowed; it's just dirt now.  The rig that's doing it is in the second photo, with the dogs for scale.  This modern tractor has far more power than the similarly sized tractors I knew as a kid growing up on the farm, and it is vastly more comfortable for the operator.  First, the cab is heated and air conditioned, fully enclosed in high-visibility glass.  The windows are cleaned with washers and wipers.  The seat is the fancy “active compensation” type, which means that hydraulics move it up and down to cushion the operator from the bumps.  Then, to top it all off, the cab has a Bose sound system built in, with radio, CD player, and a connection for your iPhone.  That's quite a far cry from the teeth-jarring, dusty, fully exposed tractors I drove on the farm!

I love the lighting effects of early morning and late evening.  In the third photo below, you can see the shadows of the Wasatch Mountains (to the east, behind me as I took that photo) on the slopes of the Wellsville Mountains (to the west, in front of me) and their foothills.