Jan 4 2013

Geeking out on Arduino

Mainly getting used to the circuitry. Haven’t written any code from scratch yet.

Not familiar with Arduino? It’s software code and hardware, both called Arduino, that help you make things that do things. (And a lot of its success comes from a generous community that’s built up around the tools.) Projects can be sillily simple: the first basic project anyone does is write some code that makes a little light blink. Or it can be insane: the website Instructables features “20 Unbelievable Arduino Projects”, including a Flamethrowing Jack-O’-Lantern. (Actual text: “WARNING!: This pumpkin is extremely dangerous and you definitely should not make one of these. The instructions were posted here are for entertainment purposes only. I do not condone the manufacture or use of flamethrowing jack-o’-lanterns. Seriously, nothing good will come of making one of these. Don’t do it.”)

I haven’t made a Flamethrowing Jack-O’-Latern yet. Here’s the basic stuff I have made though:


Dec 17 2012

Can life insurance be a lever to push down gun ownership?

About our epidemic of gun violence, I have a somewhat “actuarial” question: are life insurance companies a good pressure point for reducing gun violence? Here’s my logic.

Facts:

  1. Cancer survivors have to wait five years after getting a clean bill of health before they can get a reasonably-priced life insurance policy. (My own five-year anniversary is Jan 31, at which point my quoted rate drops to normal instead of ~$800/month.)
  2. In 2009, there were 9,146 homicides by firearm — in the top 50 causes of death in the U.S. that year, that puts homicides by firearm above 3 cancers and at least 5 other diseases that would disqualify a person for life insurance.
  3. While I can’t find an exact number, there is a significant correlation between a person owning a firearm and that same person dying in a homicide by firearm. Anecdotally, I’ve heard it doubles your risk.

I spoke with an insurance company this morning, and they confirm they do not take firearm ownership into account when they determine the price of a life insurance policy. So questions:

  • Why don’t they?
  • If there’s a good actuarial reason for not taking gun ownership into account, could it be that those less-likely causes of death reinforce each other, that those with cervical cancer are significantly more likely to get oral cancer? In other words, do deaths by less-likely causes of death add up to something higher than the homicide of a gun owner?
  • Conversely, are there causes of death correlated to gun ownership other than homicide (and suicide)? The likelihood one will develop alcoholism? That one will die by other kinds of violence?
  • If so, are those absolute numbers too low to matter to insurers? 0.8% of Americans died in 2009. .003% of Americans died in homicides by firearms, so 0.37% of all American deaths in 2009 were by homicide by firearm.
  • What percentage of those .37% (that original 9,146 homicides by firearm) were eligible for life insurance?
  • Of that percentage, how many owned guns?
  • Is that number too small for insurance companies to care?

Probably. Conclusion: Convincing life insurers to charge more of gun owners, with gun ownership as the sole factor in price, would have little effect on homicides by guns. Another factor might be that the U.S. has so many gun owners, the “gun homicide premium” is already socialized throughout the life insurance-holding population.

That leaves health insurance premiums as the remaining commercial, as opposed to legislative and cultural, deterrent to gun ownership. That’s especially true in that health insurance is triggered throughout one’s life, rather than just at death: health insurers would have a strong motivation to charge more of gun owners should gun ownership be strongly correlated with non-fatal injuries or illnesses.

Or are there other commercial deterrents?


Oct 18 2012

Bernoulli’s principle, economics, and the presidential election

Stick with me on this one…

Politically, I’m a believer in what I’d call Bernoullian politics. Bernoulli’s principle, oversimplified, says that if air passes over two sides of an object at different speeds, the pressure exerted on those sides is uneven. It’s part of why planes fly: the curved upper half of the wing disturbs the the circulation of airflow, while less so on the flatter bottom half. That is, pressure at the top and bottom are different. Increase that difference enough (get the plane going fast enough), and a sixty-four-ton 747 can fly.

So, I like to apply that metaphor to politics and economics, with issues, events, and time standing in for wings, pressure, and velocity. Let’s put it like this. When things are steady over time on one side of an issue and convoluted over time on the other, the steady side will always push the issue the direction it wants to go. Likewise, when things seem certain on one side of an economic decision and unsettled on the other, a person’s decision will tend to have a bias toward the certain-seeming side, whether that’s a good thing or not.

On economic issues, here’s real-world example from today’s New York Times: “Rising College Costs Pose Test for Obama on Education Policies”.

Americans believe college degrees are a prerequisite for personal and national success, and over time, that becomes more and more strongly believed, almost as if time is accelerating because the belief is more and more self-reinforced. The issue (access to a college degree) now has pro-college policies on one side (for example, gov’t subsidized loans) that are way more fixed than swirly arguments about whether college is worth the total cost. So, the issue — the wing in our metaphor — moves in the pro-college direction.

Problem is, always moving in a pro-college direction leaves colleges themselves with little incentive to lower costs. If college is a prerequisite for success, then all the things that make college “better” — newer dorms, star faculty, wired classrooms, football teams with national TV exposure, academic scholarships — are believed to be necessarily good things, no matter the cost. Students and their families will pay anything.

It’s essentially a ruinous version of supply and demand. Price is set at the intersection of supply and demand. But when demand is absolute, somehow someone will provide the supply, in this case colleges providing every feature asked for and lenders+government providing the financing. Supply will keep trying to reach that non-negotiable demand, meaning price keeps going up.

The President’s policies — indeed, our financing-education policies going back to the G.I. Bill — are focused on making college more affordable, for more people, with the goal of getting everyone a college degree, because an educated population is good for the country. Here’s where Bernoulli comes in. Colleges don’t set out to raise tuition. But why wouldn’t they raise tuition when there’s so much less pressure on the low-cost side of the airplane wing? If a family used to be able to afford $10,000/year tuition with no government help, and the government says, “Good news, with our new grant program, we’ll give you $10,000″, what motivation does a school have to not raise tuition to $20,000?

(This is the same debate with the mortgage interest deduction. Being able to subtract your mortgage interest from your taxes is supposed to mean it’s easier to afford a house. But it makes it easier to afford a house. All it does is give a clear incentive for sellers to raise the price of their property, because the buyer can afford more.)

And just like health care costs, each effort to make it more affordable lessens the pressure on one side of the issue, giving the steady, stronger pressure (cost) the chance to move the issue.

That’s on the economics side. Bernoullian politics, meanwhile, are why I’ll be voting for President Obama on November 6. Like others, I have little idea what his priorities actually are for a second term — and even less of what Mitt Romney’s are. But when it comes to issues I care about — especially that we’re delusional about intergenerational, George Jeffersonian economic mobility and equality of opportunity…that the American Dream happens in Denmark three times as often as in America, that it happens twice as often in Canada — the current President is more likely to push Congress to support policies that, in turn, lift the plane toward the American Dream than Governor Romney is. The President won’t (and can’t) do it in a too-fast way, but he also won’t allow a stall.

But back on the economics side, I’m glad Paul Ryan has made it easier to discuss entitlements. The quality of the discussion isn’t any good, but the first step to recovery is admitting you have a problem, and we’re closer to that than we were four years ago, or even four months ago. What concerns me, taking the Bernoulli’s principle-as-flight metaphor to its conclusion, is that at some point, flying faster and faster — in our case, time passing as we do nothing — eventually either puts so much pressure on the wing that it snaps or so disturbs the airflow that the entire aerodynamic system breaks down, the plane’s belly flips to the front, and the whole thing disintegrates. It’s what will happen in higher education without a controlled deceleration that takes upward pressure off costs: at some point, and suddenly, the wings snap as parents of 17-year-olds share the conclusion that a four-year degree isn’t worth the cost, or all of higher ed stalls as a quorum of employers share the conclusion that colleges aren’t delivering them qualified employees who aren’t already saddled with debt, that it will be cheaper to train employees themselves.

I admit it’s a messy metaphor. But I always think of it when I ask myself why I still support the President. I feel there’s just the right balance of pressure there to keep our plane rising, if slowly. A Romney presidency doesn’t seem like it could resist the pressure coming from the far right, even if Romney in his heart is a moderate (but, again, how are we to know?). Bernoulli’s principle tells me Romney would snap our wings.


Oct 16 2012

Beatles analogy


Oct 1 2012

Latest home improvement project: Pegboard, including “How To”

Shoulda taken photos as I went through each step, but here’s how it went down…

Time

3 hours (most if it in front of the TV while glue dries in step 3), plus 2 years (optional, step 6)

Materials

  • 4′x2′ pegboard (multiple sheets if you have more wallspace, they’re made to fit alongside each other; just be sure to use heavy tape to keep them aligned while you build/attach the frames in steps 3 and 4)
  • 1x3s for a backing frame, cut to two pieces at 2′ and two pieces at ~43″.
  • Power drill (saw elsewhere that a hammer drill is strongly recommended for masonry)
  • Masonry bit, 5/32″
  • Wood bit, 3/16″
  • Level
  • Wood glue
  • Wood clamps (or similar)
  • Screws, “Tapper” style, 3/16″ x 1 3/4″
  • Assorted pegboard holders

How To

Note: The way I’ve done this means you won’t be able to use the three holes around the perimeter of the board. Wood will be blocking them from behind.

  1. Hold the bare pegboard flat against the wall and mark where to drill your holes in the masonry. I chose the second hole at each end of the pegboard.I happened to have 4x4s leftover from another project, and those were a big help — I placed them on the workbench, which gave me a surface exactly eight inches up with a chance to use the level.
  2. Drill holes at the marks with a masonry bit, which, god, what a pain in the butt that is. It takes a long, long time, a lot of strength, and lots of stopping to let the bit cool.
  3. Looking at the back of your pegboard, lay out your 1×3′s in a rectangle. This will be your frame — what you actually attach to the wall. Make sure you like how they fit, and then one by one, use your wood glue to adhere each piece to the board. Work one piece at a time; 1×3′s tend to bow, so clamp each end down and let dry however long your glue bottle says. (Mine is half an hour.)
  4. With your wood bit and using your earlier pegboard holes as a guide, drill holes through the wood. You’ll use these to attach everything to the wall. You’ll see I drilled mine at the second pegboard holes.You’ll also notice in the materials list that the masonry bit and drill bit are slightly different sizes. If you’re a gifted measurer, by all means, use both at 5/32″. But I used a bigger wood bit to give myself some literal wiggle room…I knew the frame and masonry holes wouldn’t perfectly aligned, so I knew I’d be able to go in at a slight, safe, still-strong angle.
  5. Assuming all your holes are lined up, carefully screw your screws through each hole in the pegboard/wood into the holes in the masonry. Go partway with each and then go back and tighten. Don’t go crazy tightening — you don’t want to rip out a chunk of masonry. Just go far enough that the board feels firmly in place.
  6. Spend the next two years obsessing over the best way to arrange your pegboard holders and hardware (optional).
  7. Place your holders and hardware.

Aug 7 2012

Tips for strong, memorable security questions and passwords

I was about to post this in a Facebook comment, but it’s too long. :) It’s part of showing some friends ways to choose strong, memorable passwords and security questions (and answers) in light of the mind-blowing “How Apple and Amazon Security Flaws Led to My Epic Hacking” article by Mat Honan. The upshot of the article is how bad guys can exploit how security practices differ across sites:

But what happened to me exposes vital security flaws in several customer service systems, most notably Apple’s and Amazon’s. Apple tech support gave the hackers access to my iCloud account. Amazon tech support gave them the ability to see a piece of information — a partial credit card number — that Apple used to release information. In short, the very four digits that Amazon considers unimportant enough to display in the clear on the web are precisely the same ones that Apple considers secure enough to perform identity verification.

Here are my tips:

Turn on 2-step verification for your Google account (https://www.google.com/settings/security). It takes about 10 seconds each time you do it. It texts you a unique code to type in each time you log into a new computer — but it means someone can only get into your account if they have both your password and, physically, your cell phone.

Facebook offers the same thing. Thanks to the wife for pointing that out to me: https://www.facebook.com/settings?tab=security.

For your security question answers, don’t use something in the public record or that you might have mentioned online somewhere. No maiden names, no street you grew up on, no pet names. Security questions tend to consist of easy-to-find stuff. Think about it. I can find out a person’s high school mascot by visiting a person’s Facebook profile, and if it’s public, I can see their school. If it’s not public, I can see their hometown and slowly start guessing local mascots. I’d target people from small towns with few schools. The name of the street they grew up on is often public record. Their age when they got married, had a kid, etc. is as easy as checking photo upload dates on Flickr, Facebook, or Shapfish.

There are sites that let you choose your own questions, and why more sites don’t do that, I don’t know. The fewer degrees of logical separate you have, the better; the more degrees of logical separation the attacker has, the better. For example, often there’s a piece of obscure information that, for one reason or another, has always stuck with you. So that’s a great question-and-answer pair to use. Consider “What nickname did S. give her car?” It’s easy to remember — you only need two steps of logic to remember it:

  1. Who do you know that nicknamed their car?
  2. Of those, whose name starts with the letter s?

But it takes many burdensome steps for the attacker to guess it, a few being:

  1. Who does the target know whose name starts with s?
  2. Of those (say, ten), what cars have they owned?
  3. Of those (say, 30 cars), what were their makes, models, model years, colors, and features that might suggest a particular nickname?
  4. Can I guess this correctly before I get locked out?

Likewise, a popular self-generated security question, tied to an object in your physical possession, can exploit the inherent complexity of books: “What are the first twenty characters on page 118 of my dictionary?” (But that assumes you’re near your dictionary or remember the letters.) The humorous part about that is that rule we’ve all heard, “Don’t use words from the dictionary,” so if you’re a stickler for that — and want something that doesn’t require a physical object at-hand — a great mnemonic device is to choose a memorable sentence and turn their first letters and punctuation into a password. “Art Monk, Redskins receiver, played in Super Bowl XXVI” becomes “AM,Rr,piSBXXVI”.

Some sites give the option to turn off email as a way to do password recovery, which is awesome. If an attacker has accessed your email account, he can change your account’s password and then start checking through your emails to see what sites you use…and then start resetting those passwords. So if you turn off email for password recovery and only use text messaging, to reset a password, the bad guy would have to have your cell phone in-hand.

Other things to think about…

Stolen passwords are a commodity. Bad guys will figure them out and offer a preview to other bad guys, who then buy them in bulk. Changing passwords regularly can take advantage of the lag between stolen passwords and sold passwords. (A while back, I turned off Google Search History and Googled an old password…it showed up in a plain text file of other passwords. Lesson learned.)

Of course, changing passwords often can be a pain, so I suggest programs like KeePassX. It lets you store your login information for any site you need to (or it can generate one for you). You then save it in a password-protected, encrypted file…but here’s the fun part. You can disguise that file as any file-type or file-size you want. So within the tens of thousands of files on your computer, there’s a single obscure password-protected, say, .mp3 that looks just like any other .mp3, that you’ve named a real song name, say, “Sonic Youth – Teenage Riot”. More brilliance: KeyPassX asks for your master password for every file it’s asked to open. Every file a bad guy tries to open is presented with the same dialog box as the actual password-holding file. The only way for an attacker to get to your password is through a threat of physical harm, which is a weakness of any system for keeping secrets. (Hm, though I guess a keylogger might do the trick.)

My only frustration with tools like KeePassX is syncing it across devices, since passwords are saved in files and a change to one file on one computer doesn’t change another file on another computer. So it’s worth thinking through a secure way to keep the file in an accessible location online, still mixed in with a large number of other files.

I’ve written a lot here, but all those tips are in fact quite easy to follow. The remaining, perhaps biggest weakness of security questions and passwords are, however, at the other end. I encourage you — at every opportunity — to yell at Apple, Facebook, your banks, everybody to coordinate, adopt, and keep improving best practices. The 19 year old who accessed Mat Honan’s accounts and wiped his computer of every important file in his life, every photo of his daughter, did it because the companies we trust don’t care to work with each other. Strong, memorable security questions and passwords don’t scupper every attack if the service at the other end doesn’t do its job.


Jun 24 2012

Chords, Elvis Costello, “Why Can’t a Man Stand Alone”

It’s not often nowadays you come across a song whose chords haven’t been posted online, but that’s the case with Elvis Costello’s “Why Can’t a Man Stand Alone”. So, here you are.

Some (lovely) dissonant notes in the bass of the recording can, at first listen, throw you off, but these chords’ll get you where you need to go…

A                   B E
Why can't a man stand alone?

F#m        C#m         Gdim          E             A       E
Must he be burdened by all that he's taught to consider his own?

    A             E          Gdim         E
His skin and his station, his kin and his crown

    A+D           A7♮         B              E
His flag and his nation they just weigh him down

         G#m        E
You know pride is a sin

        A          E            A            E
That we tend to forgive, but it gets hard to live

         C#m            E           A          B
When you don't have the love in her heart to begin with

A                   B E
Why can't a man stand alone?

A B E Why can't a woman be just what she seems? F#m C#m Gdim E A E Must she be tarnished by men who can only be men in their dreams? A E Gdim E When beauty meets ignorance they shout in the street A+D A7♮ B E Repeating their offer to each girl they meet G#m E The respect that she needs, A E A E It isn't a gift, but it gets hard to lift C#m E A B Yourself up when you don't have the strength to begin with A B E Why can't a woman stand alone?

Em+F# D C Em Em+F# D D7 Why can't a baby sleep at night and dream of the time to come D7 F#m B And never fear the world outside the touch of someone very near

A B Why can't a man stand up? A B Why can't a man stand up? A B E Why can't a man stand alone?

Jun 6 2012

The question is less, “Why are these colors beautiful?” than…

…”Why are we designed to find these colors beautiful?”


Apr 1 2012

Workbench v 0.1

IMAG0544.jpg

Frame built, pieces nearly square. Imprecision in cuts and bore holes resulted in some torquing and gaps, but lag screws largely pulled pieces back to perpendicular.

Top at the moment is simply a loose piece of plywood to check for level. I’ll start building the tabletop this week (32 54″ 1×2′s, pulled tight by five threaded rods and nuts, then sanded flat and level). The tabletop will have four small recesses to clear the lag screw heads at the underside. It will be secured with 4 4½ lag screws up through the 2×4′s and into the tabletop.

I’ll probably add plywood cut to size atop the stretchers as a shelf, perhaps with backings for both that and the tabletop to keep anything from falling off the back. Ideally I’d craft and attach drawers on the underside of the tabletop, but that’s something entirely different to learn.

Full plans at Popular Mechanics.


Feb 6 2012

[...]

BT in snow shoes

(No, not Gatsby.)