Sunday, March 29, 2015

With CSS, More Seems to be Less

In the beginning -- at least for my purposes here -- there was HTML.  Tags gave straightforward markup capabilities, but large amounts of the actual presentation were left to the readers' discretion.  Some people like serif fonts; some people don't.  Some people need bigger text to read comfortably.  Some people don't like 36-point headlines.  In an online world, those are choices that ought to be left to the reader.

Then the Web was increasingly taken over by commercial concerns, who hired graphics design professionals to lay out more sophisticated pages.  Professionals who took much greater advantage of the newer HTML capabilities to force the pages to look the way the professionals thought they should.  Color!  Giant text!  Tiny text!  Five fonts for different purposes on every page!  Not to put too fine a point on it, but some of the professionals seemed to have taken degrees in Ugly and Hard to Read.

Some Web browsers gave their users tools to fight back.  One of the reasons I settled on Firefox early on was that it let me override part of the ugliness.  I could specify fonts that were usually honored and a minimum font size (a maximum would also be nice, if anyone at Mozilla is listening).  From time to time I would look over someone's shoulder to see how they experienced the web.  I gloated internally, about how much more consistent in appearance "my" web was compared to theirs.  How much easier to read.  How much more visually attractive, because of my superior taste in fonts [1].

Then came CSS, and the widespread adoption of various CSS libraries, and the use of JavaScript to set CSS properties, and the widespread adoption of JavaScript libraries that did all sorts of things besides the feature or two the page developer needed.  Some browsers helped the readers out again, by allowing the user to have their own style sheet that was applied to all pages.  But CSS has, among other things, specificity rules that make it possible for the page developer to identify a particular element at such a fine grain that none of the browsers will honor the user's choices.  In fact, the specificity rules can get so complex that developers need specialized tools to debug their pages, trying to figure out why some bit of text here or there isn't in the font/size/whatever that they expected.  The image accompanying this post is a portion of a screenshot of Firebug, one such tool, showing part of the CSS cascade that resulted in a piece of text on a downloaded page ignoring my font choices.

I suppose I shouldn't feel so strongly about this that I'm sitting here considering the question, "How hard would it be to write a Firefox add-on that (reasonably intelligently) overrides the font choices for all of the content on every page?"  Guess I've finally turned into a full-blown curmudgeon.







[1] Not to mention faster, because Firefox had Adblock, and it's amazing how much faster the front page of a newspaper site loads if your browser simply skips loading 30 advertising elements from DoubleClick's under-engineered servers.

Wednesday, March 25, 2015

Will Distributed Generation Kill the Big Utilities?

A friend of mine wrote an interesting piece for Utility Dive this week.  The basic premise is that the rapid growth of edge generating capacity – think rooftop solar – will outpace the country's transmission and distribution grid's ability to cope with the added complexity.  I'm an advocate of renewable energy supplies, so think it's a question worth considering.  I think of the problem in terms of three questions: (1) Which grid?  (2) Can such a collapse happen?  (3) Will such a collapse be allowed to happen?

Which grid?  I continue to be disappointed by pieces written as if the US had a single network for transmitting electric power.  There are three: the Eastern, Western, and Texas Interconnects are synchronized AC networks that have minimal AC-DC-AC connections between them.  The history that led to three grids is straightforward.  The Great Plains are a relatively empty buffer nearly 500 miles wide that split the country.  The yellow line on the figure to the left (you should be able to use your browser's "view image" option to see it full size) runs roughly down the middle of the GP, and comes relatively close to the dividing line between Eastern and Western Interconnects.  Texas was able to opt to be its own grid and did so, hoping to avoid federal interference.  Note that El Paso, the only major metro area in Texas that is west of the GP, is part of the Western, rather than Texas, grid.  Each of the three grids has a different degree of complexity, different renewable resource portfolios, and a somewhat different political environment.

Can such a collapse happen?  In order: least likely for the Texas grid; somewhat more so but not a significant risk for the Western grid; quite possible for the Eastern grid.  The fundamental difference is a simple matter of complexity.  The Texas grid serves about 27 million people, and the large majority of the demand is inside the triangle formed by Houston, Dallas-Fort Worth, and San Antonio.  The Western grid serves about 70 million people, and the large majority of demand happens in half-dozen or so large population centers: Seattle-Portland, Northern California around San Francisco Bay, Southern California, Las Vegas, Phoenix-Tucson, Front Range Colorado, and Salt Lake City.  A small number of single-state situations, and limited interconnect problems.  The Eastern grid, covering 205 million people across 36 states, is a whole 'nother matter.  I've written before about the relative complexity of the grids as illustrated by low-carbon studies done by the various national labs.  There are plenty of nuts-and-bolts studies for the Western grid that all come up with similar plans.  Such studies for the Eastern grid simply don't seem to exist because the problem is so much harder.

Will such a collapse be allowed to happen?  In Texas, not just no, but hell no.  A single state legislature, a single PUC; they can regulate the snot out of distributed generation in such a way that it's useful, but not threatening to the collapse of the grid.  In the West, probably not.  Most of the individual Western states have statutory requirements for large renewable share of total supply and are already thinking about intrastate distributed generation.  There are only a couple of interstate grid topologies that make sense.  The Western Governors Association spends considerable effort looking at the regional transmission grid as a whole.  When it comes to the Eastern grid, though, I throw up my hands.  When people write about the US having an aging, third-world, rickety electric grid, they're largely writing about the East.  Too many jurisdictions, too many places to connect... yeah, it could be allowed to happen.

My bottom line is that I acknowledge the risk my friend writes about; I just don't acknowledge that it's a national problem.

Sunday, March 22, 2015

My Name is Michael, and I'm a Pack Rat

Sometimes the first step to solving a problem is to admit that you have one...

Out in my garage is a galvanized steel bucket. Here's a picture of my daughter with the bucket. She's carrying about three small rocks in it, destined to be mulch for weed control, because she needed to be helping. My daughter now has a daughter of her own just about that age, who looks equally serious when taking on an important task like moving rocks. (I know because the granddaughter and I took a walk around the neighborhood the other day, and stopped to spend a few minutes returning the neighbor's rocks that someone had kicked out onto the sidewalk to their proper place in the landscaping. It was clearly Important Work.) The bucket is stained with this and that these days, and there are other better buckets in the garage, but I'm not about to get rid of it.

I have a piece of software called "scraps" that I use every day. I wrote the first version of it something more than 30 years ago, with the intent of using it instead of writing things on scraps of paper that I would promptly lose. Do you want to know the name, address, and phone number of the dentist who pulled my wisdom teeth the year after I moved to New Jersey and went to work for Bell Labs? It's in there, down at the bottom of a scrap titled "Dentists" that has contact information for every dentist I've seen since then. For no more than it does, an unconscionable amount of time has been spent porting that hunk of antique C code to every operating system I've ever used, from assorted versions of UNIX to DOS to Linux to Mac OSX...

There are a large number of bookcases in our house. The overflow from those are stashed away in bankers' boxes down in the basement. Some of the books in them are textbooks from when I was an undergraduate, and not just books from my major. Some of the books are trash fiction that filled long hours on business trips in the days before portable computing, that I'll never read again. (Sorry, Eric Van Lustbader.) I've been trying to get rid of some of them, but seem to be incapable of throwing any away until I have a suitable EPUB version stored and properly backed up. (It's astounding the range of out-of-print books that people have scanned and put up on the internet.)

My name is Michael, and – among other vices – I'm a pack rat...

Friday, January 9, 2015

New Toy

One of the things on my list of long-term projects is a DIY book scanner. There are a ridiculous number of paper books in my house, and I'm getting old enough to think about downsizing the living quarters at some point. Lots of people have done impressive things in the field, like this one. Being who I am, though, I want a system where the hardware is simpler and smaller, even if that means that the software has to be somewhat more competent. The rough rule-of-thumb of "put everything possible into software" served me well for 25 years in a high-tech field, and I'm not about to give it up.

The usual camera people put into a DIY scanner is either an old smartphone or an old snapshot grade digital camera.  Those are cool, particularly if there's one or both readily at hand.  My own experience with them, at least with a book scanner in mind, is getting them to take the picture when I want it, and to get the picture out of the camera into a computer where it can be worked on.  One a different tack, I've also been wanting to spend some time playing with a Raspberry Pi computer.  Hoping to get two birds with one stone, I purchased a Pi (model B+), a micro-SD card that would let me set up Raspbian easily, and a five mega-pixel camera module.

After going through the old electronics box, I plugged a monitor into the HDMI port, a keyboard and mouse into two of the USB ports, plugged in an Ethernet cable to tie it to the switch in my office and powered it up.  Looked like... Linux.  I felt like the little girl from Jurassic Park: "It's a UNIX system.  I know this!"  The second day I put all of the old electronics back in the box and just ran "ssh -Y" with the appropriate options from my Mac. I haven't gone very far with the camera yet, besides configuring the Pi to use it and verifying that it works. On the other hand, I have spent some time entertaining myself by porting a variety of small software that I've written over the years to the Pi.  Just to see how things went. And "porting" implies that the process was harder than it actually was.

After fooling around for a bit, I copied part of my collection of cartogram software over to it. One of the core pieces is written in C – after downloading a couple of needed libraries (using the provided Debian aptitude and apt-get commands), those just compiled. My front- and back-end code that sets things up for those core number-crunching programs is written in Perl – had to download the GD module, but that also just worked. Copied over some data and map files and ran things and – cartograms! Things ran pretty slowly, but the chip doesn't have the kind of heavy-duty double-precision floating point hardware support that "real" processors provide.

I'm looking forward to seeing how much of the job can be done on the Pi.

Thursday, November 6, 2014

Why Did I Think It Would Take Longer?

One of the things that I anticipated would happen, when the Republicans regained control of the US Senate, was that movement conservatives would start talking about opening the Yucca Mountain nuclear waste repository.  I thought it would be somewhere down the line, after they had dealt with the PPACA, tax rates, and (in the energy realm) CO2 regulation.  Silly me.  In today's George Will column in the Washington Post, George has it on his list of six things the Republicans should do very first thing.

I know I'm not entirely rational on the subject.  For many years, though, it has struck me as odd that there were a bunch of people making arguments that spent fuel is safe enough to store less than 100 miles upwind of a major metropolitan area in the West, but it's not safe enough to store in the states where it's produced.  That the dry storage casks are so tough that nothing can happen if they fall off of a truck or train in a Western state, but not tough enough to be safe to store in the states where the waste is produced.  And politically, pundits who oppose the idea that the federal government can ever force anything on individual states seem to be just fine with forcing transport and storage of spent nuclear fuel on states that (a) don't want the stuff and (b) mostly don't have reactors of their own producing waste.

I've said it before, but the federal government's record is not encouraging.  Ask people near Hanford, Savannah River, or the former Rocky Flats how they feel about it.  The first radioactive waste arrived at the Waste Isolation Pilot Plant in New Mexico in 1999, which is supposed to be safe for at least 10,000 years.  This year, americium and plutonium particles were detected above ground a half-mile away from the facility.  Granted, the containers from which radioactive material leaked were much less robust than dry casks in which spent fuel is stored.  OTOH, I'm inclined to agree with Ryan Flynn, New Mexico Environment Secretary, at a news conference after the WIPP incident: "Events like this simply should never occur. From the state's perspective, one event is far too many."

Tuesday, October 28, 2014

A Different State-Splitting Trend?

In 2013 there were a number of proposals put forward to create new states by splitting existing ones.  The most widely covered ones have been Colorado's 51st State movement, the State of Jefferson movement in far northern California and southern Oregon, and the movement in western Maryland.  One thing that all of these have in common is that they represent more rural portions of the states in question seeking to "escape" from the urban parts of the states.  Certainly in the cases of California and Colorado, the escape would come with a hefty price tag -- the rural areas that want to leave are subsidized financially by the urban areas.

This year there have been two new state-splitting proposals with the opposite perspective: urban areas seeking to be free from the rural areas.  The first of those was the ballot initiative in California that would seek to split the state into six parts.  Funding for signature collection came from a Silicon Valley venture capitalist who reportedly believes tax rates in his new state would would be substantially lower because they wouldn't have to subsidize the Central Valley and rural northern California.  Too few signatures were collected for the initiative to make this November's ballot.  The second is a proposal to split off southern Florida, so the urban areas there could begin taking steps to deal with climate change consequences like rising sea levels.

The proposed split of Florida is shown in the upper portion of the figure to the left.  Things are in an early stage.  South Miami's city commission passed a resolution calling for the separation and will now send the proposal to the 24 counties that would be South Florida.  As is true for so many of this type of proposal, this one probably won't go anywhere.  The hurdles for actually splitting a state are pretty darned high.  Among other things, Congress would have to bless it, and the balance of power between political parties, particularly in the Senate, becomes a major consideration.

Why do I say this is a movement by an urban part of the state to flee the rural part?  The lower part of the figure is a cartogram with counties resized to represent population.  The green line shows the proposed division between north and south.  The red/blue coloring is the standard one for election cartograms and shows whether the county voted majority-Obama (blue) or majority-Romney (red) in 2012.  The three biggest urban areas in the state -- Miami, Tampa, Orlando -- would be in South Florida.

Thursday, September 18, 2014

Write Like the Wind

Today, in my e-mail, was a request for a political contribution.  That's not unusual, but today, to sweeten the pot, I was offered the chance to win a dinner with George R. R. Martin, author of the Game of Thrones series.  I don't dare send them any money; I might win.  Then I would find it necessary to play the video below at the meal, because neither George nor I are getting any younger and it would be convenient if he finished the damned series before one of us dies.