Wednesday, November 25, 2009

It being two days before a race...

... I ran my standard two-days-before-a-race workout today: 3x400m with 3-minute interval (surrounded by the typical warm-up and cool-down stuff). The idea is to run very fast; Mr. Newton always instructed us to run each one 2 seconds faster than the one before. So my "very fast" times? 74, 71, 70.

I've been working in more speed workouts lately, and I'm certainly not slacking off on those days, but I am just slow right now. Between the altitude and the cold-weather clothing I don't think that's an awful workout, but I should be able to run faster than that! I'm really not sure what's up.

Wednesday, November 18, 2009

Neato source grepper!

I don't think this is anything too novel, but I just came up with this function for my ~/.bashrc to make grepping through source trees easier. Typically I egrep -nr $REGEX $PATH, but then the results are polluted with vim backup files and sometimes object files. With this little function in place I can simply agrep $REGEX $PATH and get none of that junk:

local argstr=
local first=1
local i=
for i in "$@"
if [ $first = 0 ]; then

echo -ne "$argstr" | xargs -0 egrep -nr | egrep -v '~:[0-9]+:|^Binary file'

I suppose the caveat is that if you program in a language where constructs matching ~:[0-9]+: are legal this could filter out some source. Entering stream-of-consciousness... Of course, even in C/C++ they're legal within strings. Hm. Filtering the output like that to filter files is brain-dead, using find to filter files up front would be better... but then you'd hit the command-line length limit... I bet someone has written a tool for this... probably using Perl... Leaving stream-of-consciousness

Indeed, there is ack. And, of course, it's in Perl. It is way better than my little bash hack.

EDIT: It turns out that I totally missed missed two options to GNU grep that would have saved me the trouble of writing anything but an alias: -I (short for --binary-files=without-match) and --exclude='*~' to get rid of those vim files. At least I got to learn how xargs works.

Thursday, November 12, 2009


I need a bumper sticker for an experiment. Specifically, I need a bumper sticker that says, "Barack Obama is not a socialist. I am." Then I'll put it on my car, park it on a street that's public but not in plain view of everything, and see how long it goes before being vandalized.

You typically think of graffiti/vandalism as an urban thing... I've actually seen some in Wyoming, just, like I said, not in places people walk every day. Out of town a few miles on the dirt roads where I go running, people leave their mark.

Also, they shoot holes in road signs. It's funny -- if I saw holes shot out of a speed limit sign in Chicago I'd get the hell out of wherever I was (is that true? I don't remember ever seeing that in Chicago but I can't be sure...), but it doesn't register the same way here (it also might not register, say, out by the Indiana border, around Lake Calumet, near the Ford plant, in Hegewisch? Because that whole area is basically central Illinois with Chicago addresses. Speaking of which, and I've mentioned this before, Monee is on the address grid). I guess Wyomingites with guns point them mostly at animals. Animals that aren't human. It's a small distinction that makes every bit of difference when you are, in fact, a human.

Which is an odd coincidence, to be sure...

Monday, November 2, 2009

California budget

DISCLAIMER: I lived in California for a year. I have lived in Wyoming for less than that. Therefore I'm a total expert on this stuff. Oh yeah.

It's fairly well-known that California has high state income taxes and is currently in an enormous budget crisis. Meanwhile Wyoming has no state income tax and is not doing nearly as badly. Economic conservatives blame California's high government spending. Moralists blame Californians' "sense of entitlement", as if it's somehow different from other places in that regard. But there are some other reasons California has a harder budget situation than most states. Here goes.

1. California's Federal balance of payments. California pays more money to the Federal government than they get back in Federal spending. The report states that a large part of this is due to California's relative wealth and youth compared to the rest of the nation. But the chart on California's share of US population, tax burden, and Federal spending still shows that California gets less federal money than its population would suggest. The report also suggests that the census might undercount California's population share. I can't find a very detailed report like that for Wyoming, but this report shows that in 1998 Wyoming received much more non-defense spending per person than California. Because California's cost of living is higher, the cost of equivalent projects in California is higher (because labor, materials, and land are more expensive). California's mean income, adjusted for this, is probably still higher than the national average, and thus it should carry a higher mean tax burden, and probably should have a negative balance of payments. But overall Federal spending per person should not be so far below the national average.

My understanding is that Federal spending on roads, for example, often winds up skewed towards rural roads that are the only connection between towns. In Montana they put up signs near road construction projects showing the percentage of the project funded by Federal, State, and local taxes. My experience with these signs has all been very recent (and thus been affected by the Federal stimulus package and its spending on infrastructure), and they all show projects dominated by Federal spending.

2. California faces significant challenges that many other states don't. California is home to some of the richest people in America, but also has a large poor population. Public schools in California have the challenge of educating students that come in speaking very little English at a much higher rate than most states.

3. California's state government does things that other states' don't, and some of those things benefit the whole country. I can think of a few very easily. California's public university system is the best in the nation. That's to be expected, as it has the biggest population and economy of any state. But it goes beyond that. According to the US News and World Report College Rankings (there's no perfect way to rank universities, but this is at least an attempt) 17 of the top 50 Universities in the US are public, and 6 of those are in California (Cal-Berkeley, UCLA, UCSD, UC-Davis, UC-Santa Barbara, and UC-Irvine). Berkeley is the highest-ranked state school, at #21 overall, and UCLA is tied for second with Virginia, at #24. Berkeley and UCLA each have lower out-of-state tuition than any school ranked higher, and are a bargain for residents. Only one other state, Virginia, has more than one state University in the top 50 (UVA and William and Mary).

Another is the California Air Resources Board (CARB). CARB came about in 1967, before the Federal government's Clean Air Act and continues to set tougher pollution standards than the Feds. It's the only such state agency that's allowed to exist, and since all new cars sold in the US today meet its standards, it's helped to keep the air clean throughout the nation.

4. California is politically primed for budget problems. First, California's state legislature is really polarized. I'm talking about the chart at the bottom of the post. California has the most liberal Democrats, the most conservative Republicans, and nobody in the middle. Meanwhile they need 2/3 of the legislature to pass a budget or tax increase. Oh, yeah, and property tax revenues are artificially low thanks to Prop 13 and the shady activities of property owners trying to evade reassessment when remodeling or selling their homes.

Prop 13 was, obviously, directly the result of a ballot question. The supermajority rule is in the California Constitution, but attempts to lower the requirement (i.e., to 55% in 2004) through ballot questions have failed, making it indirectly the result of a ballot question. California is one of the most democratic states in the country, with many important questions on spending falling directly to voters, and to some degree Californians have expressed their "sense of entitlement" through these choices (not that I think people in other states would do any differently), only to see them cause problems in the future. A smaller example that I witnessed first-hand is continuing voter support for VTA light rail in Santa Clara County without rider support (the lack of ridership makes it a huge money hole).