Tuesday, October 7, 2014

“This has been a mind-changing experience for me...”

“This has been a mind-changing experience for me...”  Easy prediction: Debbie will love this video :)  Via friend, reader, and former colleague Simon M...

Invisible ink...

Invisible ink...  A history...

Don't mess with old ladies!

Don't mess with old ladies!  Via my mom:
A mature lady gets pulls over for speeding...

Older Woman: Is there a problem, Officer?

Traffic Cop: Yes ma'am, I'm afraid you were speeding.

Older Woman: Oh, I see.

Traffic Cop: Can I see your license please?

Older Woman: Well, I would give it to you but I don't have one.

Traffic Cop: Don't have one?

Older Woman: No. I lost it 4 years ago for drunk driving.

Traffic Cop: I see...Can I see your vehicle registration papers please.

Older Woman: I can't do that.

Traffic Cop: Why not?

Older Woman: I stole this car.

Traffic Cop: Stole it?

Older Woman: Yes, and I killed and hacked up the owner.

Traffic Cop: You what!?

Older Woman: His body parts are in plastic bags in the trunk if you want to see.

The traffic cop looks at the woman and slowly backs away to his car while calling for back up. Within minutes 5 police cars circle the car. A senior officer slowly approaches the car, clasping his half drawn gun.

Officer 2: Ma'am, could you step out of your vehicle please! The woman steps out of her vehicle.

Older woman: Is there a problem sir?

Officer 2: My colleague here tells me that you have stolen this car and murdered the owner.

Older Woman: Murdered the owner? Are you serious?!

Officer 2: Yes, could you please open the trunk of your car, please. The woman opens the trunk, revealing nothing but an empty trunk.

Officer 2: Is this your car, ma'am?

Older Woman: Yes, here are the registration papers. The traffic cop is quite stunned.

Officer 2: My colleague claims that you do not have a driving license. The woman digs into her handbag and pulls out a clutch purse and hands it to the officer. The officer examines the license quizzically.

Officer 2: Thank you ma'am, but I am puzzled, as I was told by my officer here that you didn't have a license, that you stole this car, and that you murdered and hacked up the owner!

Older Woman: Bet the lying bastard told you I was speeding, too!

When your pet discovers it's going to the vet...

When your pet discovers it's going to the vet...  My mom sent me a collection of these; the one at right is my favorite.  That expression is exactly what Miki (one of our field spaniels) has when we park outside the vet's office...

Photosynthesis 2.0?

Photosynthesis 2.0?  Scientists appear to be on the verge of figuring out a way to boost crop plants' photosynthetic efficiency by 25% or more.  Should they?  It's a tough call, with good arguments both pro and con...

Traveler captures train/truck collision...

Traveler captures train/truck collision...  You'll want to watch this full-screen.

Nobody was hurt, which is amazing, as I'm sure you'll agree after you watch this.  The “smoke” the narrating woman refers to is actually evaporating liquid argon – harmless unless it displaced all the oxygen where you were breathing, which is very unlikely outdoors...

Edgar Allan Poe's mysterious death...

Edgar Allan Poe's mysterious death...  I hadn't realized it was quite this mysterious!

Doubts about object-oriented programming (OOP)...

Doubts about object-oriented programming (OOP)...  I read a long article by Lawrence Krubner this morning.  I have no idea who Lawrence is, but I found his article quite fascinating, and some of his points resonated strongly with me.

My perspective on OOP is a little different than Lawrence's, and in fact probably a little different than the vast majority of today's programmers.  This difference in perspective comes about mainly from my age (I'm 62) and the fact that I never had any formal education in computer science or programming – I'm entirely self-taught.

The age matters because I started programming (in '73) before OOP was adopted by the programming community.  In fact, its predecessor (“structured programming”) was just then being introduced.  The most common form of program architecture then was what we'd call “spaghetti code” today – horrifying, hard to understand, and even harder to maintain.  Furthermore, I learned to program in assembly languages, which (back then, at least) contained absolutely no support for even structured programming, much less OOP.  So I've experienced three “normal” regimes in my career: spaghetti code, structured programming, and OOP.  I've written code in well over 100 programming languages, and production code in at least 50.  I've also played around with functional programming, though much less extensively.  I've written quite a bit in Forth (a language that's hard to categorize) and one large project in Prolog (which also doesn't fit easily into a category).

The lack of education matters because I have very little exposure to the theory of programming languages, or architectures for that matter.  What little I have learned is entirely from real world experience (maintaining existing software and creating new software), and not at all from anyone's idea of what the “right” way to do something is.  I've read quite a few books about the theory of programming, but always after the fact, in an effort to understand something new that I've run across.  In many, many conversations with other software engineers this difference in my education manifested itself – generally because my conversational partner would say something that sounded like utter gobbledegook to me, and I'd have to have them explain it to me in language that I could understand.  My most intense experience like that occurred in the '90s, in the course of conversations with two particular engineers: Julia and Mike.  They spouted OOP jargon I'd never heard before at a prodigious rate, and I had to do a lot of reading and parsing of their utterances to have a prayer of understanding what they were saying.

So my perspective is different than most.  So is my conclusion about programming theory.

I don't think it matters.  Or, to say it another way, I don't think it is substantially easier or more likely that understandable, maintainable code will be written as spaghetti code, structured programming, or OOP.  The vast majority of programmers will write opaque, unmaintainable crap no matter what programming model they're using.

I say this with some confidence, after more than 40 years of working with quite a few substantial bodies of code.  There isn't a single one of them that I can point to as particularly understandable or maintainable.  There are no significant differences in the spaghetti code, structured code, or OOP.  It's all equally bad.

That's not to say that I've never, ever seen good code.  I have.  I like to think that I've produced some of it.  But that good code is always in relatively small chunks – a few thousand lines at a time, at most.  Most of the large bodies of code I've worked with have a few pieces like this, like polished jewels stuck in a cow flop.

So I think Lawrence is right: OOP is crap.  But so are the alternatives :)  I think the only thing that matters is how good the programmer is, and whether he or she did the work with craftsman-like care...

“...the lamp of the West still shines brightly in Asia.”

“...the lamp of the West still shines brightly in Asia.”  That's the concluding phrase of Bret Stephens' excellent piece in today's Wall Street Journal about the current struggle in Hong Kong.  He speaks directly to one of my pet peeves: the overwhelmingly admiring tones used by America's pundits and lamestream media when speaking of mainland China...

Monday, October 6, 2014

Barn: all trussed up and nowhere to go!

Barn: all trussed up and nowhere to go!  All the trusses on the sides of the barn are up, and they've started on the fascia and the boards that keep the trusses from twisting.  I'm amazed how quickly they could put all those trusses up.  It was a three man team for most of the day (four briefly), and they worked together like a choreographed dance team.  They may get to the center set of trusses as early as tomorrow.  Once those are up, it's going to look like a barn!


Some praiseworthy customer service...

Some praiseworthy customer service...  Last week I installed a lighted magnifying mirror for Debbie, in our new bathroom.  All went well until I got to the very last step: attaching the mirror to to the mounting bracket.  There should have been three teensy little machine screws to attach it, but there were only two.  Worse: the screws were an oddball metric size, and were finished to match the mirror – there's no way I'd find one in a hardware store.

Dang.

So I made the dreaded call to Zadro's customer service number.  If Zadro's was a Utah company, I wouldn't be dreading it – as getting good service here is almost a certainty.  But Zadro's is in Huntington Beach, California – so there was no telling what I'd run into.  Hence the dread.

But as you can guess from the intro, I was in for a pleasant surprise.  First, a nice young lady took my report, then said she'd get a replacement right out to me.  She took my address and promised it would go out right away.  That was this past Friday.  In this morning's mail was an envelope from Zadro's, and in it was the promised part.  The right part, too!  Five minutes later, the mirror installation was complete.  It's a very nice mirror

Kudos, Zadro's, for a fine example of the right way to do customer service...

Fun with microscopes...

Fun with microscopes...  I've long wanted a decent low-powered microscope, the kind with stereo eyepieces, a camera port, and 2x to 100x power.  I started watching out for a good deal on one, and just last week one popped up on Amazon: an AmScope trinocular model, with powers from 3.5x to 120x – almost exactly what I wanted, and at a great price.  So I got it.

Just now I was playing around with the camera option, and for your delectation I have three photos for you.  The first two are of a fly zapped by our high-voltage, thunderclap-producing fly zapper.  When I first picked this guy up, there was still a little smoke swirling up from it, and various parts are missing.  But ... he's not moving any more :)  The last photo is a sliver of oak flooring trimmed off when the flooring guys were installing our floor.  The characteristic oak pores (this is end on) look like craters on the moon...

Barn: the trusses begin...

Barn: the trusses begin...  The builders arrived bright and early this morning, and went right to work on the trusses that go on either side of our barn.  One guy put up hangers (left photo below) for the inside end of the trusses (the end closest to me when I made the right photo below, showing theses trusses).


Teak shower bench...

Teak shower bench ... with a dumb design flaw.  But it's fixed now!

We were originally planning to have a granite shower seat in one corner of our new shower.  However, after doing some reading on the challenges with granite – and its annoying habit of freezing your tushy off if you sit on it – I decided against that.  But we still wanted a seat in our shower.  I remembered a visit we once made to Ventana, on California's Big Sur coast, and how much we liked the shower there.  It was all rock, with a teak bench – so I started looking and found the one above.  Except for one little problem, I love that bench.

You can see the problem in the left-hand photo below.  The cross-members that hold the seat on exactly match two of the rows of square holes (you can see one of these: the second row of holes from the top) – and when I take a shower, they fill up with water.  That water then just sits there for hours, until it soaks into the wood.  That's not good for the long-term condition of the bench.

Upon investigating, I discovered that the edge of the cross-member, on the outside edge (top in the photos) extended just 1/10" or less past the edge of the hole.  That gave me an opportunity to drill some nearly hidden short holes at a 45° angle to provide a drain.  This proved to be very easy to do (right hand photo below), and in short order I had the problem fixed.  Yay!


Commute times...

Commute times ... by zip code, on an interactive map.  This map is full of surprises for me, but I think I figured out that most of the surprises are bedroom communities with a long commute to where the jobs are...

When I first listened to this video...

When I first listened to this video ... I thought it must be a hoax.  No way could a human vocal tract do this!  But then I did a little research, and there is considerable material out there on the phenomenon of polyphonic singing (look toward the bottom of this article, or these search results).

Speechless, I am...

Top 10 giving states...

Top 10 giving states...  This is charity as a percentage of income:
Here are the top 10 most generous states:
1. Utah: 6.6 percent giving rate
2. Mississippi: 5.0 percent
3. Alabama: 4.8 percent
4. Tennessee: 4.5 percent
5. Georgia: 4.2 percent
6. South Carolina: 4.1 percent
7. Idaho: 4.0 percent
8. Oklahoma: 3.9 percent
9. Arkansas: 3.9 percent
10. North Carolina: 3.6 percent
The original article I spotted this in doesn't mention it, but there's also a strong correlation between generosity in charity and which presidential candidate the state voted for in 2012.  Follow the first link to see that.  I'll bet you can guess how this works out :)

Some pithy posters...

Some pithy posters...  Via reader Jim M.:


Interesting political development...

Interesting political development...  In the race for the Kansas senate, an independent (Greg Orman) is substantially leading the incumbent (Pat Roberts).  Roberts is Republican in a state that hasn't elected a Democrat for senator for a long, long time – and the conventional wisdom was that he was a shoe-in for this election cycle.

What I find interesting about this is that Orman appears to be genuinely independent: a politician without any party affiliation, affection, or even influence.  He's got his own views on a wide variety of topics, and they don't fit well with either party's platform.  He's a wealthy businessman, and self-funding (so doesn't need any party money).  His positions are more in conflict with my own than in agreement, but he does appear to be more interested in solving problems than in any particular ideology. 

This strikes me as much closer to the Founding Father's ideas about “citizen government” than the party system we have today.  I'm not sure what a Senate full of a diverse group of truly independent thinkers would be like, but I'm pretty sure I'd like it better than the current mess.

But then, I guess that's a pretty low bar, isn't it?

Curiosity aids learning...

Curiosity aids learning...  At first I thought this article was just confirming the obvious: that curiosity motivates people to learn.  Well, duh!  But they're actually showing something more: that learning while curious leads to greater retention.  There's some speculation about why that should be, but it's just speculation based on blood flow observed in various sections of the brain.  That's a widely used technique, but nobody is really sure that's any more accurate or informative than phrenology...