Tuesday, August 28, 2012

What I Don't Like About My E-Reader

For the last few years I've had one of Barnes & Noble's nook e-readers.  I've bought a variety of books to read on it, and borrowed e-books from the library.  But I have a problem with it.  It's not one of the normal problems that I hear people complain about.  Yes, the contrast leaves something to be desired, particularly in low light.  Yes, the power connection is in an awkward place if you're putting the reader in some sort of a rest while charging it.  Yes, I've dropped it and put a small ding on the screen.  Yes, the screen is too small to deal well with technical books.  Yes, the user interface for organizing books and other files could be better.  But those aren't what I want to complain about today.

The problem I have with my e-reader is that it tempts me to do illegal things.  Once you start poking around on the Internet, you quickly discover that there's an enormous volume of pirated print material, particularly what I'll just call "geek fiction."  All of those old books have been scanned and run through some sort of character recognition software in order to produce computer-readable versions.  New books of interest show up fairly quickly.  If there's an e-book version of the new book, unencrypted copies of that also show up quickly, avoiding the character recognition errors to which the scanned copies are subject (for example, the character pair "cl" is often recognized as the single character "d").  TTBOMK, all of the encryption schemes used by the publishers and distributors have been broken [1].

 The e-reader has also tempted me to begin design of a rapid book scanner based on a digital camera, and to look at the software chain necessary to convert images of the books in my personal collection into EPUB format.  I'm not the first to do so, of course.  There's a whole community of people dedicated to do-it-yourself book scanning.  And commercial scanners up to and including robotic scanners that automatically turn the pages.  I'm not getting any younger, and the day will come when I want to live somewhere smaller.  When that happens, many of the bookcases and their contents are going to have to be left behind.  But I don't want to give up a lifetime's worth of tucking away books that I've purchased.

There are a variety of reasons why people would want to make a copy of a print book if it were quick and easy to do.  Backup copies are an obvious one; if my house burns down, I lose hundreds of books that would be hard to replace.  My favorite reason came from a student I spoke with at the University of Denver.  At the beginning of each quarter, he spent a Saturday or Sunday afternoon while football or another sport was on TV scanning all of his new textbooks.  He didn't cheat in the sense of scanning the book and then returning them for a refund; he kept the dead-tree version of the books.  He didn't do character recognition either, just took a picture of each page and stored it as a fairly high-resolution image on his laptop.  Then, when one of his professors said, "Now, if you'll all turn to page 257 in Wilson," he's got a copy with him.  A few keystrokes pulls it up.  Meanwhile, the rest of the class is looking desperately through their backpack to see if somehow (by accident) they've brought that book to class.

I know I'm going to build the scanner and acquire the software -- there's absolutely no way that I'm going to resist the temptation [2].  I just wish that the writers and publishers would work out an archive and pricing scheme so that I didn't have to.  Here's my advice to them, particularly for out-of-print books.  It's out of print.  You're not going to make a dime from it unless a miracle happens and enough demand materializes to make it worth a press run.  The cost to store an e-copy is trivial, as is the bandwidth to deliver it.  Make it available somewhere easy to find for a dollar or two.  At that price, I'll download a clean e-book rather than any of (1) scan it myself if I have it, (2) wait weeks for it to show up from my local library's network and scan it, or (3) find someone else's scanned copy online.  And particularly if the author makes it available, s/he makes almost a dollar that they wouldn't have otherwise.

[1] And if not, they will be soon.  This is a technology battle that the publishers can't win.  Each has to pick a scheme.  That scheme has to run on consumer electronics that has a very slow turnover, so they're stuck with the scheme.  I have argued for years that in that situation, the encryption will be broken in a general sense -- that is, there will be software available for personal computers that will decrypt everything encrypted with a particular scheme, not just brute-force cracking of a particular item.  To paraphrase Napolean, "I generally find that God fights on the side of the heavier artillery," and the hackers' artillery is by far the heavier.

[2] If it comes down to it, I'm competent to write the necessary software myself.  Suitable algorithms for each step have been published, and I spent years coding up other people's algorithms from time to time in order to evaluate performance.

Friday, August 24, 2012

2012: A "Power to the States" Year?

Since the adoption of the US Constitution, there have been ongoing tensions between the federal government and the governments of the individual states.  While the most widely-known consequence of differences of opinion over what authority the states retain has been the US Civil War, debate over the federal/state relationship continues to this day.  For the past century or more, the states have pretty consistently been on the losing side.  So far in 2012, though, there have been three developments in which the states' authority has been (or will be, if campaign promises are kept) reinforced.

First, the US Supreme Court ruling (Virginia v. Sebelius, hereafter just Virginia) regarding the Patient Protection and Affordable Care Act limited the power of the federal government in two ways.  For the last 100+ years, the Commerce Clause of the Constitution has been stretched to allow regulation of more and more activities.  In Virginia, the Court found that that clause couldn't be stretched far enough to allow the federal government to require individuals to purchase health insurance.  The second thing that the Virginia case did was establish that there are indeed limits to how much coercion the federal government can threaten the states with.  As I've mentioned before, this part of the decision appears to me to create a great deal of uncertainty around the federal/state relationship that will take additional court cases to clarify.  For example, the threat to states that fail to implement unemployment insurance programs that conform to federal requirements seems to me to meet exactly the standards set out as being excessive in Virginia.

Second, this week a three-judge panel of the DC Circuit Court of Appeals vacated the EPA's Cross State Air Pollution Rule (CSAPR) at least partially on the grounds that the EPA is required to give the individual states an opportunity to solve the problem on their own before imposing a federal clean-up plan.  Earlier in the month, a different federal court vacated the EPA's rejection of the Texas state rules for obtaining certain types of air pollution permits.  Both cases turned on the language of the federal Clean Air Act, which gives the states a significant role.  In one sense, the cases are more about subjecting the federal executive branch to the authority of Congress than about the federal/state relationship, but the decisions will inevitably cause the federal executive to defer more often to state desires in the future.

Third, Mitt Romney published an energy policy document for use in his 2012 Presidential campaign.  One of the major points in that proposal is to empower states to control onshore energy development, and in particular to oversee the development and production of energy on (much of the) federal lands within their borders.  The impact of such a change in land management would be almost exclusively in the West; federal land ownership outside of the West is too small to be significant.  Unstated in the white paper is whether or not states will be allowed to levy severance taxes on any new production done under their permitting.  State severance taxes are typically higher than what the state would receive through federal royalty sharing.  Either way, the existence of extensive federal land holdings in the West, and how that land should be managed, has been a perennial issue out here.

I cheerfully admit to being a supporter of decreased federal authority in some areas where both the federal and state governments have authority (but not all areas, social insurance and civil/voting rights being two where there should be a consistent national policy).  Federal land holdings in the West are a particular sore spot for me; it certainly seems that by being "late to the party" in terms of statehood, the Western states haven't been treated equitably.  2012 might well be a year in which the increase in federal power at the expense of the individual states has stopped, or at least slowed.  I look forward to seeing if the pendulum that has swung one way for most of the last century will swing the other way now.

Tuesday, August 14, 2012

Update (corrected) regional electricity generation

Man, I hate it when I find a bug in software I've been using for some time.  Better to acknowledge the error than to try to cover it up.  I put up an essay on September 5, 2011, comparing the sources used to produce electricity in the states that make up the Western Interconnect and the rest of the contiguous US states.  There were numerical errors in that piece.  The following is a corrected version.

Earlier this year I posted a piece that observed that in the US, nuclear power was largely an Eastern phenomenon.  I was curious about other differences in the sources for electrical power in the East and West portions of the US.  The EIA publishes numbers for electricity generation by state and "fuel".  Several caveats go with the following discussion:

  • Figures are for calendar year 2007, the last year before the recession.
  • Hawaii and Alaska are excluded.
  • "West" is the 11 states from the Rockies to the Pacific Coast, "East" is the other 37 contiguous states.
  • Pumped-hydro power is excluded -- it's minor and in some states has a negative value, which just confuses things.
The first thing that jumps out of the aggregate numbers is that the West generates only 17.9% of the total, while the East generates 82.1%.  The West's population, based on June 2007 figures from the Census Bureau, was almost 23% of the population total for the 48 contiguous states, so the share of generation is somewhat less than I had expected.  I can think of a variety of possible reasons for the difference.  In no particular order: more moderate climate; less energy-intense economies (eg, less heavy manufacturing); and newer, more-efficient infrastructure such as housing.

The share provided by the five largest sources of generation for the West and East are shown in the table to the left.  As expected, there are fairly dramatic differences between the two regions.  The East depends much more on coal and nuclear (almost 75% of their total) than the West does (about 40%).  If conventional hydro power is counted as renewable, then the West gets about one-quarter of its electricity from renewable sources.  Western wind, with a value of 0.0181, was close behind geothermal as a renewable source in 2007, and passed geothermal into the fifth spot in 2008 [another update: by 2010, renewables totaled a bit over 28% in the West].

The next table shows the top ten sources of electricity by region and source when measured against the US total.  Depending on your biases, the table is making any of several different points.  I'll stick to the one that says the table shows the need for two distinct energy policies (at least with respect to electricity) in the US, one for the West and one for the East.  The problems of replacing the power from an aging fleet of nuclear reactors is an Eastern problem.  The problems of replacing large amounts of coal generation in order to address climate change issues is an Eastern problem.  When the time comes -- and I believe it will -- when the East requires a heavy dose of austerity, in terms of sizable per-capita reductions in electricity use, it will be difficult to justify imposing exactly the same degree of pain on the West.

Political TV Spending, So Far

ProPublica has a story up this morning with an interesting chart showing spending on TV political ads so far this year.  They aggregated spending by three categories of entity: political parties, super PACs, and 501(c)(4) non-profits.  Super PACs may not make contributions to candidates or political parties, but can engage in unlimited independent spending.  501(c)(4) non-profits are organizations whose primary purpose must promote social welfare for the community as a whole.  Such a purpose may be educational in nature.  Broadly speaking, 501(c)(4) corporations can lobby for specific legislation, but can't promote either candidates or parties.  OTOH, they can certainly attack candidates by disclosing information about them.  This past week, Crossroads GPS announced a new television ad buy in Nevada that accuses Representative Shelley Berkley of a pattern of unethical behavior.  Unlike political parties and super PACs, 501(c)(4) corporations are not required to identify their donors.

Broad observations...  It's going to be a long, negative election season.  Very large amounts of money are flowing into organizations whose message will, because of the constraints under which they operate, be negative.  The 501(c)(4) spending thus far is dominated by conservative messages; Crossroads GPS was created by Karl Rove and Americans for Prosperity is generally associated with the Tea Party movement.  It appears there are people with lots of money even during difficult economic times who wish to support a conservative message but remain anonymous while doing so.  I can think of good reasons for that, such as avoiding the flood of people looking for contributions once word got out that I could afford to make a large donation.  I fear that the reasons are not that good, as in voters will be disinclined to support my cause if they know that I'm the one behind the message.  To pick an issue like that, I may firmly believe that when people die, their assets should pass to their heirs without any tax.  But it looks bad if I'm spending millions to push that idea if I myself will benefit to the tune of hundreds of millions when Mom dies. (That's just a hypothetical -- Mom is not leaving me hundreds of millions of dollars when she dies.)

I have the dubious pleasure of living in a Denver suburb where: (1) it's in a swing state for the presidential election; (2) it's in a competitive district for the US Representative race; (3) it's a competitive district for the state representative race; and (4) it's a competitive district for the state Senate seat, and that seat is up for election this year.  I am not looking forward to the next three months.  I have set up a box where I can throw the (mostly unread) campaign and "educational" material that I receive this year.  I have a bet with myself that it will total more than 10 pounds of glossy brochures by election day -- at least it can be recycled.   I've lost track of the number of recorded phone messages pushing one position or another, or asking me to answer some questions, I've received.  I'm considering giving up TV and radio for the duration.

Thursday, August 9, 2012

Close Encounters of the Mechanical Kind

I have mentioned before, at least in passing, the historical sea change in how machines are controlled that has occurred, particularly in the last 10-15 years.  More than 30 years ago as a systems analyst at Bell Labs, I recall telling management that "it's a software world now", and their future projects would be late because of software problems, not hardware.  Today, almost everything beyond a certain level of complexity is controlled by one or more microprocessors, some sensors, some actuators, and a big pile of software.  For example, even a low-end contemporary automobile has more than a dozen processors running the various parts of the car.  General Motors says that two-thirds of the budget for the transmission they designed for a hybrid gasoline/electric SUV was for software development for the dedicated processor that operates the transmission.

 I have recently been presented with the opportunity to explore one of the historical alternatives to software control.  I came into possession of the floor-standing Regina music box that sat in my Grandmother Cain's parlor for many years.  It's a handsome piece of antique furniture, shown here in the garage after unpacking from the shipping crate.  This device plays music encoded using projections stamped into thin metal 15.5-inch diameter disks.  As the disk rotates, the projections pluck special gears that in turn pluck the tuned teeth on a steel comb to produce sound.  Somewhat surprisingly, there are a couple of places where you can still have new disks made.  The playing time for a disk of this size is about a minute.  This particular music box includes a disk-changing mechanism that can cycle through a dozen disks, lifting each in turn into position to be played.  Grandma's music box doesn't work enough to play disks -- yet -- but here's a YouTube video of a similar model that shows the basic operation.

The mechanism itself is fascinating (or a nightmare, depending on perspective).  A strong spring motor turns slowly; the turning barrel for the motor has a number of cams cut into it; each cam moves one end of a lever that, through various linkages, is translated into the proper motions at the proper time.  In one sense, I am incredibly lucky.  The box is stopped at the point in the cycle where all of the interesting things involved in changing a disk are happening.  This makes it possible to manually move the followers into the depressions in the cam and watch the corresponding levers move.  If the mechanism had stopped in the middle of playing a disk, working things out would have been much more difficult.

Perhaps the most interesting item is the governor that controls the speed of the spring motor.  The critical piece of it is that gold-colored widget near the top of this photograph.  The video linked above includes a brief shot of the governor in operation.  It spins at high enough speed that air resistance becomes a factor.  That air resistance is transferred back to the spring motor through a set of gears that provides a few-hundred-to-one mechanical advantage.  An ounce of pressure at the governor translates into tens of pounds of resistance that the spring must overcome, slowing it down.  The governor has two spring-loaded wings that unfold when it spins too rapidly, increasing the resistance and slowing the motor.  I'm not sure that I ever knew enough physics to actually write down a set of equations describing the system.  Or to prove that there's a single stable equilibrium for it.

So, what worries me most about the problems involved in restoring this disk player mechanism?  The people who have provided me information thus far all seem to be significantly older than I am, and I'm no longer young.