The Daily Parker

Politics, Weather, Photography, and the Dog

The dangers of cut-and-paste coding

Last night, while studying for an economics exam, I took a moment to execute the following SQL against a client's production database:

UPDATE table_name
SET column_a = 'Equipment', column_b = 'Equipment'
WHERE column_a = 'Boojums'
GO

UPDATE table_name
SET column_a = 'Borfins', column_b = 'Equipment'
WHERE column_a = 'Nerfherders'
GO

The client called this morning to ask why the application suddenly had two different types of equipment, one which looked suspiciously like a collection of borfins.

You can see what I did, of course. I copied the first statement and forgot to change the copy's second argument. And I quite deservedly looked stupid.

What makes this even funnier: I executed the statement against a staging server first, carefully (I thought) checked the results, and then executed it against the production server. This is why having someone else do quality assurance is a good thing for most programmers.

Again with the broken parking meters!

The city of Chicago, apparently responding to citizen complaints, has started fixing broken parking meters on its own and billing the company:

Indications of a more urgent approach to fixing the problems became apparent Monday morning when the Tribune observed meter inspectors and repair personnel working downtown.

It followed a Tribune story on Friday that exposed the broad scope of the problems and how drivers and business owners are angry at the city, which watched rates quadruple this year as part of a 75-year deal to lease 36,000 meters to Chicago Parking Meters LLC for almost $1.2 billion.

There's not much more in the article. But I have to wonder, will the city actually collect the money it bills? And if not, will the city boot the company's office building?

The perfect crime?

Via the New York Times Freakonomics blog, Germany's Der Spiegel reports an unusual acquittal:

German police say at least one of the identical twin brothers Hassan and Abbas O. may have perpetrated a recent multimillion euro jewelry heist in Berlin. But because of their indistinguishable DNA, neither can be individually linked to the crime. Both were set free on Wednesday.

... DNA [found at the crime scene] led to not one but two suspects -- 27-year-old identical, or monozygotic, twins with near-identical DNA.

German law stipulates that each criminal must be individually proven guilty. The problem in the case of the O. brothers is that their twin DNA is so similar that neither can be exclusively linked to the evidence using current methods of DNA analysis. So even though both have criminal records and may have committed the heist together, Hassan and Abbas O. have been set free.

Of course, society's to blame, but this is kind of cool.

Know your enemy

Though, as Mark Morford explains, you need to choose one first:

Communists had their turn. Feminists. Hippies. Then came the evil homosexual people, with their famous, much-lauded agenda to destroy the holy sanctimony of Christian marriage via encouraging girls to smoke and listen to punk rock, teaching interior decorating to straight boys and convincing innocent church pastors and Republican senators to fellate them in cheap motel rooms. The horror!

But no longer. Proposition 8 and The Ugly Mormon Uprising of 2008 notwithstanding, the gays have nearly completed their vile mission. They are everywhere. They are almost normal. ...

Which leaves us a gaping hole, an urgent question in need of an answer. Who's next? Whom will the pseudo-moralists in America accuse of trying to convert our innocent children to their depraved ways? ... Will it be, say, the polyamorists? Vegetarians? Yoga teachers? Polyamorist vegetarian yoga teachers who like anal sex and Ecstasy and really strong coffee? We must ponder. We must find out.

I less-than-three Morford.

Does she know what day it is? I dunno. Alaska.

Sorry.

Alaska's disasters, natural and man-made, are front and center today. First, today is the 20th anniversary of the Exxon Valdez disaster. Who can forget?

An estimated 11 million gallons of oil eventually spilled into the water. Attempts to contain the massive spill were unsuccessful, and wind and currents spread the oil more than 100 miles from its source, eventually polluting more than 700 miles of coastline. Hundreds of thousands of birds and animals were adversely affected by the environmental disaster.

Today, however, Louisiana governor Bobby Jindal's mockery of volcano monitoring last month has taken an annoying turn for his Alaska counterpart Sarah Palin:

As a slew of observers -- from local officials to geologists to bloggers to Paul Krugman ("the intellectual incohernence is stunning") -- pointed out at the time, volcano monitoring is crucial work. At the risk of stating the obvious, using advanced technology to predict when a volcano might erupt, at the most basic level, allows local officials to, um, save people's lives by evacuating them. It's hard to think of a better use of government money.

Why is Jindal's line looking even worse now? Because, as you've likely heard, Alaska's Mount Redoubt, 100 miles southwest of Anchorage, erupted [Monday] night. And a USGS geologist confirmed to TPMmuckraker that a portion of the stimulus spending for volcano monitoring that Jindal lampooned has been slated to go to USGS monitoring Redoubt.

Simple economics might suggest that the expense of double-hulled tankers and of volcano monitoring equipment might be lower than the expense of cleaning up Alaska. But that's for us in the reality-based community, I guess; the GOP didn't get it in the 1980s, and doesn't get it now.

Heads I win, tails the Fed loses

Via Krugman, a clear and convincing description of why the Geithner plan may save the economy and make a few bankers even richer, at the modest expense of a few dollars per family:

Half of the [iunvestments of $100] wind up worthless, so the investor loses $300 total on those. But the other half wind up worth $100 each for a $16 profit. $16 times 50 pools equals $800 total profit which is split 1:1 with the Treasury. So the investor gains $400 on these winning pools. A $400 gain plus a $300 loss equals a $100 net gain, so the investor risked $600 to make $100, a tidy 16.7% return.

The bank unloaded assets worth $5000 for $8400. So the private investor gained $100, the Treasury gained $100, and the bank gained $3400. Somebody must therefore have lost $3600…

...and that would be the FDIC[...].

Warms the heart, it does. And it convinces me I'm in the wrong profession.

Metra: Party like it's 1979

Metra, which runs Chicago's heavy-rail commuter lines, hasn't changed much at all since the 1970s, as today's Chicago Tribune describes in sad detail:

Metra runs on paper, as in paper tickets. Although the majority of riders use monthly passes, passengers in January still bought more than 666,000 one-way tickets or used 10-ride tickets, which conductors have to punch individually.

... Other open rail systems have done away with punching and checking individual tickets. For example, conductors on Boston's Massachusetts Bay Transportation Authority check tickets with hand-held electronic devices. ... On Caltrain, a commuter rail line operating between San Francisco and San Jose, passengers buy tickets from vending machines and conductors make random checks. Anyone without a ticket faces a $250 fine.

[And] it's cash or checks only on Metra. The line doesn't take plastic because of the processing fees that credit-card companies impose, Metra spokeswoman Judy Pardonnet said.

The article also mentions a lack of information about train whereabouts that even our CTA buses provide.

I think the article makes Metra sound better than it really is, simply by comparing it only to its American analogues. The authors ignore, presumably out of pity for Metra, the Shanghai Maglev at one extreme, or even more typical European rail systems like Berlin's S-Bahn and the UK's Oyster Card scheme as examples of how to modernize at the very least how people pay for transit.

All right, maybe Transport for London isn't the best example. Still, when Boston has free Wi-Fi and we can't even pay with credit cards, something is wrong. At least TfL has a dedicated express train running from Heathrow to central London (on which you can use your Oyster Card), and we have...the Blue Line. Sad, really.

Only a week late

I've finally gotten around to producing a .kml file from my last flight, on the 14th. I flew Chicago Executive to Waukesha, Wis., thence Milwaukee (where I made two A320s wait for me, but not on purpose), thence Waukegan, Ill., which is the #1 practice-landing destination in the North Suburbs, as far as I can tell.

Good flight, about 2.2 hours total, all logged as cross-country. I haven't seen the bill yet, but the fuel surcharge dropped from $3.20 an hour to 30c, so right there I'm saving...two cups of coffee.

Obligatory airplane-on-little-airport-tarmac photo:

I should explain that it took a week to get this photo onto this blog because I left my camera in the airplane, and only this afternoon had time to go fetch it. That means I was more concerned with safety than, you know, cameras. Right.

Who didn't see this coming? Really?

It turns out, the privatization of Chicago's parking meters is becoming a total cluster:

During spot checks around the city, the Tribune found:

  • Outdated fee and violation-enforcement information still posted on many meters since the city switched from six parking zones to three.
  • Meters that, regardless of what the stickers indicate, charge the wrong hourly rates for the zone in which they are located, increasing the chance of vehicles being ticketed. For example, in the 1800 block of North Clybourn Avenue, an area where 25 cents is supposed to buy 15 minutes of parking time, meter No. 279089 provides only seven minutes for a quarter. A black marker was used to cover up the "15" on the meter's rate sticker with "7."
  • A surge in broken meters, many overstuffed with coins.
  • Stepped-up writing of tickets for parking-meter violations.

The parking-meter companies last weekend exercised an option in the contract that allows them to ticket vehicles parked at expired meters, Walsh said. Chicago police officers and parking enforcement aides also continue to write tickets, and the city will keep all fines collected.

Asked why the concessionaire would spend resources on ticketing even though it cannot keep any fines, Pete Scales of the Chicago Department of Budget and Management said, "That extra enforcement is an added incentive to fill the meters."

So, pop quiz for anyone who's taken Intro to Microeconomics: what are the incentives for either the parking meter company or the city to provide fair and accurate parking meters, or to keep them in good repair?

Pop quiz for second-year law students: Is a class action suit warranted, and if so, for what relief, and in which court?