19 August 2011

Space Aliens Save the Economy!

Paul Krugman explains here how to use a fictitious threat of space aliens to save the economy.  The jist is:  the economy was saved in 1941 by an external threat that united the country and allowed the huge deficit spending, that had previously been blocked by congressional republicans, to have near universal support.  What they spent it on was actually negative social product--even less productive than Keynes example of paying people to dig a ditch and fill it up again--but they got greater than full employment by doing it.  A threat from space aliens could clearly do the same thing today.  By composing the threat appropriately, a clever fake could encourage needed infrastructure and social welfare spending.

Krugman says that this was in an old episode of the Twilight Zone (it turns out it's really from The Outer Limits), where a group of scientists faked an alien threat and tricked the world into world peace.   This is an old story, rewritten by many science fiction writers.  The first that I knew about was Arthur C Clarke's "Childhood's End", in which a benevolent alien race called the "Overlords" demonstrated that they could easily overpower any military on earth, illustrated the fraud of all religions and political and national partisans--generally with video--and convinced everybody to work together for the betterment of the world and succeeded in creating something fairly Utopian.  In the end, Clarke goes off the rails with some ESP claptrap, but it gave me an idea, and for a high school creative writing class, I wrote a version of the same idea, where a group of scientists commandeered part of the TV network to convince the world that such an invasion had taken place and to pursue world peace (VietNam was still a very active war at the time).  The "aliens" lived in zero G and could supposedly not tolerate earth's gravity or atmosphere, so they spoke over the TV in disembodied, godlike voices, destroyed military facilities, and commissioned "agents" (the conspiring scientists) to convey their wishes to the earthlings.  It wasn't a very good story (I was only about 15).  But I've never seen that episode of the Outer Limits, so I really did invent it.  (update: I just watched "The Architects of Fear" on YouTube and like Clarke, they drifted off into ESP claptrap and also a morality tale about solving your problems without trickery.  Sadly, troublemakers rarely have such morals)

The hard part would be getting real incriminating video like the "Overlords" did on the religions and partisans.  I bet the NSA could help.  Hacking the communications is clearly fairly easy, and once the "aliens" story has a little traction, unnecessary.  Homemade UAVs and cruise and ballistic missiles could convince most of the world of the reality of the alien threat, and prior to 1980 or so probably everybody, but the US intelligence community of today could probably see through it.  Again, NSA would be a good ally to have.   A real, working death ray might do the trick.

One story along this line that I did read was "Occam's Scalpel", by Theodore Sturgeon.   A brilliant but shallow businessman is convinced by a fake corpse and a story that invading aliens have been masquerading as human business leaders and intentionally polluting the atmosphere to terraform the earth in advance of their takeover--apparently the aliens need smog to live.  The shallow businessman seems to have been convinced by the fraud and when the story ends, we're thinking that with his brilliance he might be able to reverse the pollution trend.  There are, of course, lots of other stories about aliens solving our problems...perhaps the most famous is "The Day the Earth Stood Still"....klaatu barada nickto!

15 August 2011

The Most Socialist Presidents

I've been getting robocalls and push polls from various right wingers lately.  One of the standard talking points is that Obama is our most socialist president ever.  To anyone with the slightest knowledge of history and an understanding of the meaning of the word, this is an absurd claim.  Among the presidents since 1900, he's among the most pro-business.  He has done nothing to earn the term socialist.  The nearest is the new health care law--a requirement that everybody buy insurance from private companies, a few minor regulations of those companies with nothing that would prevent them from gouging, and a new exchange to give purchasers of that insurance a more convenient market.  This is pretty much a republican program: socialism for insurance companies, private enterprise for people.

Lots of other presidents are more socialist:

#1: Abraham Lincoln:  Our most socialist president ever, by far.  After the civil war, his three biggest achievements were the Homestead Act, the Transcontinental Railroads and the Land Grant Colleges.  All of these were major government incentives to stimulate growth by spending the resources he had available--giant tracts of land. Moreover, he was a supporter of workers--what we would come to call union rights.  From his first state of the union speech: 
Labor is prior to and independent of capital. Capital is only the fruit of labor and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration. 
In context, he makes it clear that he's including both free workers and slaves in what he calls "Labor".  Lincoln also pushed through the very first nationwide income tax, mainly to pay for the war.


 #2: FDR: I think most people are aware of the New Deal, the National Relief Agency, the WPA, and Social Security in his achievements.   In what will be news to most FDR haters, he didn't raise taxes to pay for his social programs.  Hoover had done that earlier.  FDR did eventually raise taxes, to pay for the war. 

#3: Lyndon Johnson was a brilliant political strategist and infighter.  He skillfully exploited a widely held sense of fairness, the worship of the martyred President Kennedy and the philosophy of government defined by FDR to push through the programs of the Great Society: expansion of Social Security, creation of Medicare, and the implementation of Civil Rights that FDR and Ike had started.   He was cornered by Goldwater, very much against his will, into allowing the Viet Nam war to expand.  His full throated support of civil rights transformed the South into a permanent stronghold for Republicans to this day, and their unthinking hatred of him has given the forces that would like to destroy his and FDR's legacy a far stronger hand than they would otherwise have.

#4: Theodore Roosevelt was simultaneously very pro business and very socialist.  He understood the need for public institutions, creating the National Park system, and boosting anti-monopoly regulation.

#5: Dwight Eisenhower ranks fairly highly because of one thing: The national interstate highway system.  He also did the first real civil rights enforcement and created NASA.

#6: Woodrow Wilson: not initially a supporter, he signed the constitutional amendment (pushed for by his predecessor Taft) that allowed a peace time income tax because he understood its necessity in the face of rising social needs and the realization that war was soon coming.

#7: Richard Nixon: Our most fervently anti-communist president also instituted wage and price controls, took us off the gold standard, created the EPA, OSHA and several other agencies.  He famously repeated Milton Friedman's line "we're all Keynesians now", a statement that was interpreted (wrongly) as supporting socialism.  And he went to China.    The price controls proved a disaster economically, as did his war policy, but otherwise, most of this stuff worked.

#8: Thomas Jefferson ignored the advice of his economic advisers and bought "Louisiana" from the French, at what was then a terribly high cost.  He quickly created expansionist programs to explore and settle it.  One of these many socialist contributions was "The National Road", the first government funded highway.  It still exists: it's called US Highway 40 and goes from Frederick, MD to St Louis, although Jefferson only planned to reach the Ohio River.  Today, the route is largely shared with I-70.

James Polk, Grover Cleveland, William Howard Taft, and Harry Truman all did things which today would be described as socialist.  Reagan, GHW Bush and many others things that would cause them to be ranked in the same general range of socialism Obama.  Did you know that Reagan raised taxes and increased government spending? And also:  "...where free unions and collective bargaining are forbidden, freedom is lost." Ronald Reagan, Labor Day 1980 (while running for president)

I'd rank Obama at about #15 or so on the socialist spectrum.  He did push for a slightly more socialist health care program than we got, but he caved to give us a program similar to the ones Dole and others were pushing for in 1993.   He undermined the already too-weak ARRA stimulus bill by filling it with tax cuts, as well as caving on tax cuts for the rich as he promised in the fall of 2010.  He gave up pushing stimulus and began pushing austerity before the 2010 election.

There definitely are more conservative presidents than Obama: GW Bush, Herbert Hoover, Warren Harding.  Note that history (including some pretty conservative historians) also rank these as having been among our worst presidents.

28 July 2011

Reinventing and Glue

Engineers are prone to something called NIH--Not Invented Here--because that is what engineers like to do: figure out how to do something and implement it.  They'd like to "Reinvent the world".  That's hyperbole, of course, but it's a tendency that their managers try to get them to resist:  If somebody has already done it, the current team doesn't need to do any new work and chances are good that the previous, ostensibly successful implementers, did a better job than the current team would.  By and large, this is good advice.  But not always.

A lot of the time, the old implementation doesn't quite exactly do what the new one needs to.  To repurpose the old work, we have to invent a new interface, to be able to fit it into the new work.  In software, we call that "glue code", or just "glue".    It's rare that glue is simple.  If the old work was well designed and modularized, it's at least a few lines of code.  It's usually quite a lot more than that, and surprisingly often, it turns out to be more than the code that's being reused.   The code that's being reused doesn't have to be tested, says management.  Perhaps, but the glue does have to be tested just as hard, and since the fit isn't perfect, the old code does have to be tested.  Suppose the old component was 2000 lines long.  If the glue is anything up to, say, 300 lines or so and the function really is similar, it's probably worth trying to make the glue work.  But if the glue is more than a thousand lines, you're really getting into diminishing returns.  It's very likely that reinventing the thing from scratch will work better for the new application, and even if it's 2000 lines long, you've eliminated the need for glue, saving a thousand lines and a bunch of testing.

There are other cases too: sometimes the old implementation wasn't all that well done.  Fred Brooks, in The Mythical Man Month, talks about second systems syndrome.  When doing the first implementation, it's all they could do to get it to work at all, and they likely were changing algorithms and interfaces all along.  It's quite likely the first implementation is kludgey and not too good.  The second time, they know better, but now they have a whole bunch of new ideas and they get a whole lot of bloat.  On the third try, they're getting closer to the Goldilocks point: not too big nor too little, refined, shaken down, appropriate algorithms, well thought out interfaces.   If the code you're trying to reuse is a first or second implementation, it's very likely you're just propagating a bad thing.

Finally, there are a lot of things that are more appropriate being reimplemented.  For example, simple searches or insertions that occur at user time.   This is such a simple algorithm that nearly everyone who has written the code has done it several times, and won't get it wrong.   A new implementation will fit the new codebase perfectly and avoid any mingled source-tree complications.  Even if uses totally naive algorithms, it's often better to be simple than optimal, and it's likely that there's no actual algorithmic advantage to be gained (e.g: a bubble sort is so much simpler that it's actually faster than NlogN sorts if there are fewer than a dozen or so things to be sorted)

23 July 2011

Debt Limit

Suppose you're someone who needs their car for their job--a traveling salesman, for example.  Your predecessor has run up ridiculous debts and left the scene.  It wasn't your fault, but you're now left holding the bag and you must deal with the situation.  One of the changes your predecessor made was to cut your hours worked, hence your income. The credit company has been on your case for months, and now they've announced that they'll send out the collection agency to take your car on August 2nd.

You've got a number of people giving you advice:

Nancy and Harry say you need to buckle down and work more hours, and do what you can to pay off at least part of the debt.

Michelle says the collection agency thing is an empty threat that you can safely ignore.

Eric and John, who incidentally were a big part of the spending spree, and have been whispering that it was you who really caused the problem even though you weren't even with the company when most of it happened, say you need to cut way back on spending, including maintenance of the car, your advertising budget, and canceling your health care.  You must not work more hours--in fact, you should work fewer.  This is so important to them that they'll willingly bankrupt the company to keep their mid-day tee times.

Barry says you need to both cut back on spending (but not anything that affects income or long term sustainability) and work more hours.

Which advice should you take?

22 July 2011

Display Resolution and Aspect Ratio

In 1994, the "Digital HDTV Grand Alliance" decided upon a new television standard for the whole world.  They specified a list of resolutions, most of which have an aspect ratio of 16x9.  They chose to allow various aspect ratios for individual pixels, and they did not specify any resolutions past 1920x1080.  These definitions were hugely counterproductive, not just for the TV industry but also for the then rapidly growing personal computer industry, as well as being confusing for most users, and completely, utterly, unnecessary.

Between the invention of moving pictures and about 1960, nearly all video had an aspect ratio of 4x3. There was good reason for this: Many things in our environment, from buildings, to sporting events and conversation groups, fit well in the 4x3 frame.   When television came along, the movie business felt threatened and in their effort to come up with a more immersive experience, they invented wider aspect ratios.  Because of the Cathode Ray Tube display technology in use at the time, TV could not duplicate this.  Many movies, but by no means all, embraced the new mode and placed subjects wide apart in the frame.   When those movies came to be displayed on 4x3 screens, the incompatibilities were addressed with two bad options:  "Pan and Scan", which loses the width of the widescreen cinematography, and "Letterbox", which uses only a small part of the screen to show the whole picture, but in a much reduced window.  The movie people were understandably upset by damage done to their cinematography...a problem which was entirely of their own creation.

When digital TV became possible, the same people saw a way out of the box into which they'd painted themselves: they'd make the new TVs support widescreen.  These same people managed to dominate the conversation.  Never mind that movies are only a small part of TV content and that 4x3 worked very well for almost everything else.  Never mind that the new digital technology made it trivial and transparent to support any resolution you chose to transmit in.  They knew analog TV hardware and movies, and made a standard with that mindset and only the next 5 years or so in mind.  They didn't understand Moore's law, or really anything about computers at all, even those these were central to what they were doing.

What they should have done was standardize two things:  the digital data format and square pixels.  Period.   They should specifically NOT have specified resolution. If I want to watch a lot of movies, I'll buy a display with a wide aspect ratio.  If I'm a sportsfan or TV news addict, I'll buy a display with a low aspect ratio.   If I want to do the other once in a while, I'll suffer in just exactly the way I have been for movies.  But it'll be MY choice, and I'll choose the style that serves me best.  The technology to adapt easily is a necessary part of every digital TV display (and personal computer).  There's no need to standardize.

The free market is a powerful thing.    When higher resolution displays become available, the market will decide which resolutions to sell, not some committee that's stuck in the mistakes they made in the 1950s.  The software and hardware to adapt content to match the display (it's called stretching and cropping) is a necessary part of every digital TV and computer display controller.  Plugging in a different set of numbers is simple.  Adapting content resolution to style, cost and availability of the necessary bandwidth is equally simple.   If half the country is watching the superbowl or some major movie, it makes sense to use a lot of bandwidth.  If I'm watching a talking head discuss current events, I don't mind if my picture is being transmitted at 320x240.  Save the money the bandwidth costs. 

It turns out that most people have a hard time understanding resolution and aspect ratio.  I'm not sure why this simple thing should be so hard, but it is.  But because the HD Alliance chose to provide for both 1:1 and 3:4 pixels, they dramatically increased the confusion.  When 4x3 content with 1:1 pixels appear, a great many TVs stretch it to wide aspect ratio, so as to fill the screen--distorting the picture.  Moreover, the manufacturers tend to bury the necessary mode controls--I suppose because usability testing found them confusing, and consequently amazingly many people have gotten so used to watching distorted pictures they've stopped noticing.    By simply standardizing on 1:1 pixels, the TV could automatically adapt.  No user controls would be necessary.  Instead, we have various and confusing "wide" "panorama", "4x3", "Zoom", etc.,  modes.

HD aspect ratio sickness has infected computers, too.  In 2003 I bought a laptop with a 1400x1050 (so called SXGA+) display surface.  Today, it's fairly challenging to find a laptop with a vertical resolution higher than 768, 73% the size of that 8 year old computer.  This is because the market for display surfaces is completely dominated by the TV business--just as in the days of CRTs--and most small TVs are 1280x720.   You can buy a monitor with much higher resolution: up to 2560x1600, but even finding out what the resolution of most display surfaces is from the marketing literature or salescritter is surprisingly difficult.  I care MUCH less how big it is in inches,  than I do how much VERTICAL resolution it has.  Nearly all applications and websites have wide menu bands across the top and bottom, dramatically reducing the space available (the window I'm using to type this subtracts 350 pixels from the top of my window and 160 from the bottom--leaving only 258 pixels of usable space on a 768 high monitor.  Windows 7 live photo gallery (the app that provoked this flame) steals 200 pixels from the top and 95 from the bottom when in editing mode, 38%.  what could be more important in a photo app than being able to get the picture as big as possible?)

08 June 2011

Politifact Fairness

PolitiFact, a political fact checking web site operated by the St. Petersburg (FL) Times, purports to be fair.  By and large this seems to be true, but they seem to hold people towards the left of the spectrum to a much tougher line than people to the right.  A recent example:

http://www.politifact.com/truth-o-meter/statements/2011/may/19/nancy-pelosi/nancy-pelosi-posts-questionable-chart-debt-accumul/ in which:  she promotes this table on how much each president raised the debt:
Ronald Reagan: Up 189 percent
George H.W. Bush: Up 55 percent
Bill Clinton: Up 37 percent
George W. Bush: Up 115 percent
Barack Obama: Up 16 percent


PolitiFact concede that the numbers for Bush 1 and Clinton are correct.  They ignore Reagan because the source they used didn't go back that far.  But those numbers are easy to track down.  I get 186% under Reagan.  not the same but close enough  The big discrepancy was that Pelosi's staff made a mistake, and started Obama's term on 20 Jan 2010, not 2009 as is correct.  this moves one year of supposed Bush debt to Obama, giving Bush 86% increase and Obama 34% up to the date of the chart.

Then they double down.  They point out that some economists think that the ratio of debt to GDP is what's important, to factor in inflation and such.   GDP grew during Bush II, and collapsed in the worst recession in 70 years almost simultaneously with the election.  So under Bush, the denominator grew, and under Obama it shrunk dramatically.  So reporting things this way makes it look like Obama grew the debt much more than he did.  To be fair, nearly all of Obama's debt is stuff he had no control whatever on: increased medical costs, unemployment insurance, and very little on things like the wars.

And don't forget, there's a recognized corrector for inflation:  CPI.  based on that, Obama grew it 35%, GWB 71%, Clinton 30%.

PolitiFact gave Pelosi's staiff their "Pants on Fire" rating.  A fairer analysis gives it a "Half True" rating.  This sort of thing is shockingly common on PolitiFact.




















04 June 2011

Roosevelt Conservatism

I call myself a Roosevelt Conservative.  By this I mean that I agree with the social, legal and economic perspective that the two Roosevelt administrations exemplified.  Conservatism is the idea that there are valuable lessons to be learned from the past, which can be applied to the present and future, and that we should not embark upon changes without carefully considering their consequences.  Lots of the people who call themselves conservatives today are something closer to radical reactionaries, harking back to a wonderful delusion of the past that never actually existed and determined to implement it no matter what the consequences.  Most are simply naive authoritarians, who subscribe to a narrative provided by authoritarian leadership.  This is neither conservative nor is it responsible.

Both Roosevelt presidents had a vision of government which included, simultaneously, limits on the abuses of big business while simultaneously trying to stimulate all businesses.  Most people are familiar with TR's anti-monopoly agenda.   He was not against business.
Our aim is not to do away with corporations; on the contrary, these big aggregations are an inevitable development of modern industrialism, and the effort to destroy them would be futile unless accomplished in ways that would work the utmost mischief to the entire body politic. We can do nothing of good in the way of regulating and supervising these corporations until we fix clearly in our minds that we are not attacking the corporations, but endeavoring to do away with any evil in them. We are not hostile to them; we are merely determined that they shall be so handled as to subserve the public good. We draw the line against misconduct, not against wealth.
  He also fought long and hard for the Panama Canal, the National Park system and more.

His cousin FDR pushed through the construction of many bridges, dams and other projects.  These things were all incredibly stimulative of business, and flew in the face of the prevailing conservative policies.  Hoover's austerity had obviously made the depression worse, which gave FDR the election and a mandate to actually try to fix things.  First on the agenda: FDR quickly reversed the collapse of the banking industry. Initially skeptical, FDR eventually embraced the Keynesian economic policy.  Today, essentially all competent economists recognize that this was the right policy, both for then and now.  Unfortunately, there are a few people who call themselves economists who reject this.   In the words of Sinclair Lewis: It's difficult to get a man to understand something when his salary depends on not understanding it.   Keynesianism consists of a few simple ideas:  The economy needs to grow at a relatively moderate rate, neither too slow nor to fast.  This can be controlled by regulation and through manipulation of the money supply.  The best option is by controlling interest rates, but when this fails (called a "liquidity trap": interest rates are so close to zero that no further stimulus is possible by lowering them), the government needs to stimulate the economy by borrowing money in order to create businesses and hire people.

The Roosevelts also had ideas about law that are eminently sensible: The law is there to prevent abuses.  Killing and stealing for sure, but there are lots of ways to kill and steal that writers of the constitution or the precedents set by common law could never have thought of.  The worst of these are committed by the powerful against the weak.  The law is there not to protect the wishes of the majority or the powerful, but to protect the weak from the strong.  The strong and the majority will generally get their way.  But sometimes they do this to the harm of the weak.  A lot of the time this is unnecessary.  By protecting the rights of the weak, the powerful can get most of what they want without hurting the weak.  But this is only possible if the courts are able to adapt the law to the changing needs of society.

In January 1944, FDR gave a speech called "The Second Bill of Rights."  In it, he said that everyone deserved a living wage, housing, fair competition for their business, medical care, education, and a pension.  We have come close to fulfilling this a few times in America, only to get it snatched away.