The Daily Parker

Politics, Weather, Photography, and the Dog

What a dumbass

First, I picked up my new bike yesterday. But that's not the subject of this post.

No, the unfortunate real subject of this post is, "I am stupid."

I had to import about 3.5 million data points recently, and now that I'm using the data, I discovered that this quick-and-dirty construct was dirtier than it was quick. See if you can spot the problem:

const string sqlTemplate = 
   "INSERT INTO data_points (foreign_key_id,year_num,payment,cost) VALUES ({0},{1},{2},{3})";

...

foreach (CustomStruct item in someObject.someList.Values)
{
   string sql = string.Format(sqlTemplate, parent.RowId, item.Year, item.Cost, item.Payment);

   ...
}

That is why I am now executing SQL statements that look like this:

ALTER TABLE items ADD swap decimal(10,2)
GO
UPDATE items SET swap = cost
GO
UPDATE items SET cost = payment
GO
etc.

I am now waiting for the SQL to run.

Longest. Bike ride. Ever.

Today I pedaled my butt off, all the way up to Wisconsin:

The total ride was 130 km (80.8 mi). I had intended only to go 120 km (74.5 mi) to prepare for the North Shore Century in four weeks. But, I took a wrong turn somewhere in North Chicago, and lost the Robert McClory Bike Path entirely. That added about 6 km (4 mi) to the trip. Another 4 km (2.5 mi) got added on when I popped a spoke in the middle of nowhere:

Fortunately, Anne was home and directed me to the Zion Cyclery, and they had me back on the path in under 15 minutes:

So, a good ride, and now I know I'm ready for the full Century on September 17th.

The President's Diary

As channeled through American Prospect columnist Julian Sanchez:

August 11: My anger at The New York Times subsides somewhat as I skim Foucault and Sartre. Surveillance serves its disciplinary function only if the populace is conscious of it. And if Americans aren't wrenched from being-pour-soi to being-en-soi (at least in relation to an observer who is Other) by the objectifying gaze of the state—well, then the terrorists have won.

Read more.

Judge takes away our DVR

A Federal judge has ordered Dish Network to disable almost all of its customers' digital video recorders after parent company EchoStar Communications lost a patent-infringement suit brought by TiVo:

Thursday's ruling from U.S. District Judge David Folsom in Marshall, Texas, demands that within 30 days, EchoStar must basically render useless all but 192,708 of the DVR units it has deployed.
The decision comes four months after a jury ruled that EchoStar should pay TiVo $73.9 million because it willfully infringed TiVo patents that allow the digital storage of TV programming.

Crap. This could be inconvenient. All those Lost episodes we've saved could be...um...yeah.

Update, 3:43 pm CDT (20:43 UTC): The Federal Circuit Court of Appeals in Washington has granted a temporary stay of injunction to give Dish Networks time to work something out with TiVo. (I couldn't find the actual order online.) So we get to keep our DVR for the time being.

Inner Drive will be happy to help

The FBI spent $170 million on broken software, which it has since scrapped. Now it's planning to spend $450 million on, one hopes, working software:

Because of an open-ended contract with few safeguards, [San Diego-based Science Applications International Corp.] reaped more than $100 million as the project became bigger and more complicated, even though its software never worked properly. The company continued to meet the bureau's requests, accepting payments despite clear signs that the FBI's approach to the project was badly flawed, according to people who were involved in the project or later reviewed it for the government.
David Kay, a former SAIC senior vice president who did not work on the program but closely watched its development, said the company knew the FBI's plans were going awry but did not insist on changes because the bureau continued to pay the bills as the work piled up.
Along the way, the FBI made a fateful choice: It wanted SAIC to build the new software system from scratch rather than modifying commercially available, off-the-shelf software. Later, the company would say the FBI made that decision independently; FBI officials countered that SAIC pushed them into it.

Upton Sinclair's wisdom notwithstanding, consultants have an obligation to inform clients about problems before they become too large to solve. Consultants also have an obligation to make appropriate build-or-buy recommendations to clients; in this case, if SAIC made such recommendations, there doesn't seem to be any evidence.

On the other hand, the Post article suggests the FBI had almost no clue what they were doing, bolstering SAIC's claims that they told them so.

Still, even assuming the best possible facts in SAIC's favor, they should have done the right thing, whatever that "right thing" was at any point in the relationship. Like, for example, testing the software, even if the FBI didn't think testing was important.

When a project like that blows up, everyone looks bad. Sometimes the consultant just has to walk away before that happens.

Battle on the Lake Path

The Chicago Tribune has a lengthy article about the Chicago Lakefront path, and its many hazards:

Ideally, pedestrians and runners stay to the right of each lane near the perimeter or on the soft, gravel-covered shoulder. Faster traffic—cyclists and in-line skaters—travel on the inside, closer to the yellow line.
During these summer evenings, the minefield emerges, and each group blames the others. Sunbathing near the Ohio Street Beach, in-line skater Roger Mroczek turns and points at a child crossing the trail, oblivious to traffic.

I won't ride down the path during peak hours any more. It's not worth it. Even this morning around 8, I almost ran over a portly gentleman shuffling down the center of the path. Because he had his iPod plugging up his ears, he didn't hear me shouting "on the left" repeatedly.

I ride fast, but I'm always aware of everyone else on the trail. I stay right except to pass, which means faster riders can pass me easier. And I have no problem with runners who do the same—especially when they stay on the gravel shoulders or on the new, elevated running path between North Ave. and Oak St.

But my goodness, anyone, whether on a bike, on foot, or—horrors!—on rollerblades, who takes up the entire lane, deserves road rash.

At least we're not in last place

Only Turkey lags behind the U.S. in the proportion of people who believe the well-established fact that humans decended from apes:

Religious fundamentalism, bitter partisan politics and poor science education have all contributed to this denial of evolution in the US, says Jon Miller of Michigan State University in East Lansing, who conducted the survey with his colleagues. "The US is the only country in which [the teaching of evolution] has been politicised," he says. "Republicans have clearly adopted this as one of their wedge issues. In most of the world, this is a non-issue."
Miller's report makes for grim reading for adherents of evolutionary theory. Even though the average American has more years of education than when Miller began his surveys 20 years ago, the percentage of people in the country who accept the idea of evolution has declined from 45 in 1985 to 40 in 2005 (Science, vol 313, p 765). That's despite a series of widely publicised advances in genetics, including genetic sequencing, which shows strong overlap of the human genome with those of chimpanzees and mice. "We don't seem to be going in the right direction," Miller says.

Approximately the same number of Americans accept evolution as who don't, but 10% aren't sure either way. In Turkey, more than half reject the theory.

Gotta love the fundies.

Plutons?

I'm actually enjoying the International Astronomical Union's discussions about what, actually, is a planet:

The part of "IAU Resolution 5 for GA-XXVI" that describes the planet definition, states: "A planet is a celestial body that (a) has sufficient mass for its self-gravity to overcome rigid body forces so that it assumes a hydrostatic equilibrium (nearly round) shape, and (b) is in orbit around a star, and is neither a star nor a satellite of a planet." Member of the Planet Definition Committee, Richard Binzel says: "Our goal was to find a scientific basis for a new definition of planet and we chose gravity as the determining factor. Nature decides whether or not an object is a planet."
The IAU draft Resolution also defines a new category of planet for official use: "pluton". Plutons are distinguished from classical planets in that they reside in orbits around the Sun that take longer than 200 years to complete (i.e. they orbit beyond Neptune). Plutons typically have orbits that are highly tilted with respect to the classical planets (technically referred to as a large orbital inclination). Plutons also typically have orbits that are far from being perfectly circular (technically referred to as having a large orbital eccentricity). All of these distinguishing characteristics for plutons are scientifically interesting in that they suggest a different origin from the classical planets.

By this definition the solar system has 12 planets, including Ceres, Charon, and UB313 (which one suspects will soon get a "real" name).