Tuesday, April 07, 2009

 

Quote 'o the Day

While I suspected that would be the case, it's interesting to see it reported, even off the record.
The [US] officials also noted that while Obama gets more threats than usual as the first African-American U.S. president
-- Two US officials speaking off the record in conjunction with an assassination plot in Turkey.

Thursday, March 05, 2009

 

Cow Town

Of the 8 items that made the police/sheriff reports in today's paper (which will be unavailable tomorrow), two concerned cows on the loose. Really, I like living in a small town where bovines are among the authorities' highest concerns. Here's the entire list:
  • A ladder in the middle of South 23rd Avenue was causing a traffic hazard around 8 a.m.
  • Police could not find a black cow that was reportedly out of its pasture off Stucky Road.
  • An 86-year-old Bozeman woman was cited for shoplifting and released after she left a store on North 19th Avenue without paying for some items.
  • Dog feces were left on the porch of a home on Sanders Avenue.
  • A man who appeared to be passed out in a vehicle on North Seventh Avenue was just taking a nap between making deliveries.
  • A reportedly vicious dog ran away when he heard the man he was threatening on Shadow Circle cock his shotgun. The dog was also vicious towards deputies. Its owner was warned.
  • Two cows in a driveway on Norris Road were headed for the road around 9:30 a.m.
  • The driver of a large semi-truck tried to run another driver off the road at the Logan interchange and flipped the man off.

Tuesday, March 03, 2009

 

Quote o' the Day

All your downside are belong to us
-- Nobel Prize winning economist Paul Krugman gave that title to a recent post about taxpayers' and AIG. I love the fact that Krugman wins his field's highest prize and groks ancient Internet memes.

 

Gallatin County Montana Recycling Colle­ction Locations

I had trouble finding the recycling drop off locations around Bozeman and Belgrade, so I created this map.
View Larger Map

Tuesday, February 17, 2009

 

Quote o' the Day

If people can't think clearly about anything that has become part of their identity, then all other things being equal, the best plan is to let as few things into your identity as possible.

...

But there is a step beyond thinking of yourself as x but tolerating y: not even to consider yourself an x. The more labels you have for yourself, the dumber they make you.

--Paul Graham on small identities

Sunday, February 15, 2009

 

Bullet Dodged

In 2007 Australian conglomerate Babcock and Brown wanted to buy the main supplier of power to Montana, Northwestern Energy. Eventually, the Montana Public Service commission prevented the deal, basically on the grounds that they couldn't imagine BBI doing anything other than squeezing capital out of NWE hurting consumers. Recently, BBI has been forced to sell off all its assets to pay off its debts. Its market capitalization fell from many billions to effectively zero.

Tuesday, February 03, 2009

 

Removing C# #regions

I hate C#'s #region directive. Far too many folks abuse it. Even when it's not abused, Visual Studio's default settings (at least once upon a time) didn't allow you to search in a closed region, which drove me crazy. Jeff Atwood had a thorough piece about #region's evils.

A coworker of mine was about to go postal after dealing with some highly #regioned code, so I offered to fix it up for him. There are probably a bajillion ways to remove regions already, but here's another. This assumes you've got a Unix environment at your disposal.

  1. Get a fresh check out of your source code
  2. Change to a directory that you want to fix recursively.
  3. Get a list of all the files that contain regions and store it for later.
    grep --include='*.cs' -lRP '#region|#endregion' * | tee files
  4. Ensure that grep found approximately the expected number of files.
  5. Remove all of lines with regions.
    for $i in `cat files`; do sed -ibak -r '/#region|#endregion/d' $i; done
  6. Ensure your code builds and your unit tests pass.
  7. Remove whitespace from lines which contain only whitespace.
    for i in `cat files`; do sed -i -r 's/^[ \t]+$//' $i; done
  8. Ensure your code builds and your unit tests pass.
  9. Remove consecutive blank lines, leaving a single blank line.
    for i in `cat files` ; do sed -i '$!N; /^\(\)\n\1$/!P; D' $i; done
  10. Ensure your code builds and your unit tests pass.
  11. Commit!

Saturday, January 31, 2009

 

The Earth and Moon at True Separation

A while back, NASA released a beautiful image from the HIRISE satellite, which was orbiting Mars at the time, that showed the Earth and the Moon in a single shot.

It occurred to me that the apparent separation of the bodies was probably significantly less than actual, so I did the math to calculate the number of pixels that ought to separate them based on their sizes in the image. In case you're interested, the ratio of the Moon's average distance from Earth to its diameter is about 110. Then I created a new image that showed how far apart they ought to be to reflect reality.

The corrected image makes me think a few things.

  1. There is an awful lot of nothing out there.
  2. Those Apollo missions were astonishing.
  3. When somebody tells you that x of y lined up end to end would reach to the moon and back, it's probably further than you think.
  4. Gravity is a wacky, wacky force. It seems unintuitive that any attractive force could hold two bodies together at that distance. (There must be a really cheese declaration of devotion to be derived from that.)

Monday, January 26, 2009

 

Quote o' the Day

The hardest thing I ever did was to be an honest man, to accept my responsibilities.
-- Tony, homeless single father of 6 who has chosen to turn to charity instead of crime to support his family. He hopes to study to become a phlebotomist.

Tuesday, November 11, 2008

 

Why I didn't vote for Barack Obama

My friend Tim unknowingly extended his sympathy to me for my failure to vote for Barack Obama. Somehow that has compelled me to explain why I didn't vote for Obama.

My primary reason was that he didn't need my vote. Even when I filled in my absentee ballot two weeks ahead of time, it was pretty obvious that Obama was going to win. Some people watch sports; I read electoral college prediction drivel. Regardless of whether I desired him as president, I was convinced my vote wasn't going to decide who sat at 1600. Consequently, I decided to spend my vote to send a message.

I abhor the Bush administration and all other Republicans who speak of limited government, fiscal conservatism, and personal rights, yet have supported or claimed unitary executive power, have overseen the increase of the national debt to GDP ratio through the last 20 years of Republican presidency, and supported the USA PATRIOT Act.

It was clear that the Republicans would be the minority party for a while. I cast a vote to say to them, when you come back, please stick to the ideals that you claim. The Democrats will do a fine job of being a big government party that socializes. They will tax and spend. The nation does not need a borrow-and-spend party. The nation needs a conservative party that's actually conservative and does not lead the way in nationalizing industries. I expect the Democrats to do that. I expect them to do it in a competent, punitive way. I am embarrassed of a Republican President and his Treasury Secretary demanding 5% of our GDP be borrowed and given to one man to spend without oversight. I am shamed that he would spend that money to nationalize in a way that effectively gave those recklessly self-destructive corporations handouts equal in size to the equity stake required of them. Shame.

I am appalled by conservatives who see education as elitist, learning as suspect, and science as untrustworthy. They extol the virtues of our Founding Fathers, but they reject the life-long-learning ethic of those men. (c.f. 1776) The Bush-Palin wing of the party seems to value ignorance, instead. They seem to believe that current events have a clear liberal bias and should, therefore, not be understood. They value technology and its wealth-building, military-power-extending, nation-glorifying, life-preserving benefits, but revile as wasteful and immoral the basic research which produces those innovations.

While Obama did not need my vote, the Republican party desperately needed what little guidance I could offer by voting for a member of their party who is actually a conservative; who believes in listening to those with whom he disagrees in order to be informed; who defends balanced budgets as fervently as other Republicans clung to spending more than a bailout's worth on spreading Democracy in the Middle East.


Saturday, November 08, 2008

 

Recommended: Absentee Voting

I voted absentee this year for the first time. It was fantastic.

In the past I’ve dug around, found a sample ballot, researched the issues, filled in my sample appropriately, taken the sample to the polls, waited in line, and copied from the the sample to the actual.

This year I sat down at the kitchen table with my notebook, the Google, and my actual ballot. Then I researched, filled, and mailed.

Montana lets you check a box on your absentee ballot that causes the clerk to send you an absentee ballot for all future elections. Of course, I checked it.

The only downside of voting absentee in Montana is that you can only request such a ballot in the window of 75 days before to 0.5 days before an election. Now that you too may want to vote absentee, you'll just have to wait until the next election to remember to apply.


 

Quote o' the Day

This is a crisis spawned, in large part, by our own delusion.

We wanted to believe in ever-rising stocks, in a shop-till-the-terrorists-are-defeated foreign policy and homes that were worth whatever our mortgage broker told us.

For eight years, our government borrowed to pay for wars, tax cuts and prescription drugs, while we borrowed to pay for HDTVs, iPhones and Xboxes. Buy now, pay later wasn’t just a sales pitch, it was fiscal policy.

Later is now. To fix our economy we first must change our views of debt and savings.

That will take sacrifice, the one word from the president-elect’s speech that we must hear before all others.

-- Loren Steffy opining for the Houston Chronicle.

Sunday, October 19, 2008

 

Quote o' the Day

Men, it has been well said, think in herds; it will be seen that they go mad in herds, while they only recover their senses slowly, and one by one.
-- Charles Mackay in his 1841 book, Extraordinary Popular Delusions and the Madness of Crowds.

Friday, October 17, 2008

 

Quote o' the Day

I defy anyone to give a coherent explanation of what today's Republican Party, under George Bush and now John McCain, wants to do except perpetuate itself in power.

When a political party reaches the point of lurching incoherence, the most effective cure is a good, long spell in the wilderness.

-- Eugene Robinson in an op-ed for the WaPo

Wednesday, October 15, 2008

 

Quote o' the Day

I no longer have any clear idea what, exactly, the modern conservative movement stands for.

Eight years of 'conservative' government has brought us a doubled national debt, ruinous expansion of entitlement programs, bridges to nowhere, poster boy Jack Abramoff and an ill-premised, ill-waged war conducted by politicians of breathtaking arrogance. As a sideshow, it brought us a truly obscene attempt at federal intervention in the Terry Schiavo case.

-- Christopher Buckley, the son of conservative icon William F. Buckley, after resigning from the conservative "National Review" magazine, which his father founded.

Tuesday, September 23, 2008

 

Quote o' the Day

It's a fiesta in my arteries.
-- My office mate, referring to his microwaved chimichanga and its formerly molten, then coagulated Monterey Jack cheese.

Saturday, September 20, 2008

 

Quote o' the Day

I do not believe that history is going to be very kind to this president. I think that most of the time history is about a presidency, and a president. And the vice president is almost always a footnote in that story. But I believe that in this case the history is going to treat both the president and vice president unkindly almost in equal part.
-- Former Republican House majority leader Dick Armey, who feels he was most likely misled by his old friend Mr. Cheney in the walk-up to the Iraq war.

Tuesday, September 16, 2008

 

Quote o' the Day

Bush lands in Texas; Residents urged to leave
-- Headline from cnn.com's main page linking to this story.

Wednesday, August 27, 2008

 

Quote o' the Day

If you look at the list, you can see that anyone who's ever shot a gopher's got a speaking engagement here.
--Montana Governor Brian Schweitzer downplaying the significance of his being invited to speak at the Democratic National Convention.

Sunday, August 03, 2008

 

Splash

It's not great, but this is the best I got in my first attempt to catch a splash.

 

Quote o' the Day

The cost of shipping a 40-foot container from Shanghai to the United States has risen to $8,000, compared with $3,000 early in the decade, according to a recent study of transportation costs. Big container ships ... have shaved their top speed by nearly 20 percent to save on fuel costs, substantially slowing shipping times.

The recent surge in shipping costs is on average the equivalent of a 9 percent tariff on trade.

A NYT article on how the high price of oil also has benefits to the North American economies, bringing back to the Western Hemisphere work that had gone to the Eastern.

Monday, July 07, 2008

 

Almost

We took a road trip to Yellowstone yesterday. Yeah, it's nice to be able to decide spur of the moment to drive to Yellowstone. We filled up at Costco (let's hear it for 5% back on gas!) as we were leaving. I knew we were making pretty good mileage when we were better than 50 MPG when we got to the park. It just got better as the day went on. I was hoping to make it to 58 MPG by the time we got home. I did better than that. I was so close to 60 MPG. I probably could've made it if I'd gone and slowly cruised around the subdivision for a while, but it was 3 minutes to midnight and I was tired, so that can be a challenge for another day.

Friday, June 27, 2008

 

The Worst 10 Years, Part 2

A few years back I figured out how badly the stock market would have to perform for 2000-2010 to be the worst 10 years on record for the American stock market. At that time, it didn't have to do particularly well to avoid making the record books.

With the market's recent downswing, the possibility has become much more likely. We're almost exactly 1.75 years from the 10 year anniversary all time high of the S&P 500 index, 1527.46 on March 24, 2000. Today the S&P 500 is around 1282. To avoid being the worst 10 year span, the S&P needs to stand at 1715 in 21 months. That's a gain of 33.8% and an annualized gain of 18.1%.

Steven Pearlstein seems to think we may be headed for the record books, judging based on the headline, "This Recession, It's Just Beginning," of his WaPo column.


Wednesday, June 25, 2008

 

Quote o' the Day

Epic. I almost died three times but I’d do it again.
-- An anonymous racer in Primal Quest Montana commenting on the Gallatin River after having been rescued from its raging, overflowing waters. The river was so high that race organizers decided to cancel the Gallatin section midday and to truck the racers who hadn't completed the section to its end. Based on that experience, the organizers also canceled the 70 mile kayaking of the Yellowstone River, which is also flooding.

The race's nearly 600 mile long course is currently being run, biked, swam, climbed, etc. over a big chunk of southwestern Montana. The leading teams are performing shockingly well, fundamentally outclassing the bottom two thirds of the pack, which I find truly amazing because I suspect anyone who would pay $12,500 to race under their own power for 600 miles is a superlative athlete. That the leading teams seem to completing the course twice as fast as the other teams is astonishing.

I really don't have much respect for the physical abilities of the players in many of the widely-viewed sports. I really don't see much athleticism demonstrated in swinging a stick at a sphere and standing around in a grassy field for quarters of an hour at a time. These folks, I respect. I've hiked short sections (at most 14 miles at a time) of the course they're following and I was really tired afterward. I've kayaked the Yellowstone, which is tamer than the Gallatin, and I was scared. They're good and they're crazy.


Monday, June 23, 2008

 

Quote o' the Day

The PSC says homeowners and businesses should do all they can now to insulate their homes and offices.
-- The Montana Public Service Commission attempting to get out the word that natural gas heating expenses will be "significantly higher" this winter than last.

Sunday, June 22, 2008

 

Quote o' the Day

It is hard for me to find the words to express what a massive, fraudulent, pathetic excuse for an energy policy this is...

This from a president who for six years resisted any pressure on Detroit to seriously improve mileage standards on its gas guzzlers; this from a president who’s done nothing to encourage conservation...

This deadline is from a president who hasn’t lifted a finger to broker passage of legislation that has been stuck in Congress for a year, which could actually impact America’s energy profile right now — unlike offshore oil that would take years to flow — and create good tech jobs to boot.

--Thomas Friedman in the NYT regarding President Bush's demand that Congress allow drilling offshore and in ANWR by July 4.

Thursday, June 19, 2008

 

Quote o' the Day

Even if tomorrow we opened up every square mile of the outer Continental Shelf to offshore rigs, even if we drilled the entire state of Alaska and pulled new refineries out of thin air, the impact on gas prices would be minimal and delayed at best.
--Bryan Walsh for Time magazine explaining why President Bush's proposal to open drilling on the continental shelf and in ANWR to lower gas prices is somewhat disingenuous. Interestingly, Bush's father approved one of those bans.

Friday, June 13, 2008

 

Quote o' the Day

He made some poor choices last night.
-- Bozeman Police Sergent Colton Schumacher referring to a local man who is charged with speeding, driving under the influence, eluding officers, failing to obey a traffic control device, reckless driving, obstructing a peace officer and felony theft after stealing a car, driving 80 in a 25 MPH zone, and leading police on a three hour chase.

Wednesday, June 11, 2008

 

Quote o' the Day

It would not be an exaggeration to say that the Democrats’ nomination of Obama as their candidate for president has done more to improve America’s image abroad — an image dented by the Iraq war, President Bush’s invocation of a post-9/11 “crusade,” Abu Ghraib, Guantánamo Bay and the xenophobic opposition to Dubai Ports World managing U.S. harbors — than the entire Bush public diplomacy effort for seven years.
--Thomas Friedman in a recent editorial.

Monday, June 02, 2008

 

Quote o' the Day

There is no shame in recognizing your failings or getting help if you need it. The tragedy comes when we fail to take responsibility for our weaknesses and surrender to them.
-- President G. W. Bush speaking the the graduating class at Furman University.

Wednesday, May 28, 2008

 

Quote o' the Day

I was visiting my local Toyota dealer in Bethesda, Md., last week to trade in one hybrid car for another. There is now a two-month wait to buy a Prius, which gets close to 50 miles per gallon. The dealer told me I was lucky. My hybrid was going up in value every day, so I didn’t have to worry about waiting a while for my new car. But if it were not a hybrid, he said, he would deduct each day $200 from the trade-in price for every $1-a-barrel increase in the OPEC price of crude oil. When I saw the rows and rows of unsold S.U.V.’s parked in his lot, I understood why.
--Thomas Friedman in a recent editorial.

Sunday, April 20, 2008

 

Quote o' the Day

Unless physical things can be explained by mechanical laws, God cannot, even if he chooses, reveal and explain nature to us.
Excerpted from a fictional letter from G. W. Leibniz to Daniel Waterhouse in Neal Stephenson's Baroque Cycle.

Monday, March 10, 2008

 

Quote o' the Day

NPR's ATC interviewed Montana's Governor about Montana's refusal to play nicely with the federal mandate for REAL ID. If you have the time, listen to it instead of settling for my poor transcription. If nothing else, at least make it through the first paragraph.
Schweitzer: Well, we’re putting up with the Federal government on so many fronts, and nearly every month, they come out with another harebrained scheme, an unfunded mandate, to tell us that our life is going to be better if we’ll just buckle under on some other kind of rule or regulation. We usually just play along for a while and we ignore them for as long as we can. We try not to bring it to a head, but if it comes to1 a head, we’ve found that it’s best to just tell them to go to hell and run the state the way you wanna run your state.

Unfortunately this time around they've really got a hare-brained scheme. This is the way it works. This REAL ID that congress has come up with was supposed to help us with immigration, homeland security, and stop identify theft. Come on. These REAL IDs won't be available for another 7 or 8 years. Come on. There is no REAL ID. So they're telling the states that you're going to have to take your first step toward these IDs and the first step is to send us a letter to say that you're going to accept our provisions sometime in the future when we figure out what they're going to be.

Interviewer: Do you understand the national security concerns here? [etc.]

Schweitzer: Almost all those hijackers on 9/11 would have qualified to have a Real ID. This is the way the system works. You walk into a drivers license bureau somewhere and present them with a birth certificate. The problem is we don't have a standardized process of birth certificates across this country. You give me a half a dozen high school students and a Kinko’s, and I’ll show you a bunch of birth certificates that looks very, very real.

[...]

Schweitzer: So that everyone understands, the Montana legislature passed a bill that instructs the Governor and the Attorney General not to implement any provisions of the Real ID [Act]. And this is the only thing that I know of that has united the farthest Left to the farthest Right in Montana politics.

There was not one dissenting vote out of 150 legislators. They simply said that they were fed up with the federal government coming up with kooky IDs that do not make us any more secure. This is the federal government telling a state you must do something and you must pay for it. Well, thanks for playing. Montana's not in.

[...]

Interviewer: Well Governor Schweitzer, what happens in May [Real ID Act “deadline” for state announcing intent to comply] if somebody from your state wants to get on a commercial flight?

Schweitzer: They’re gonna show them their Montana driver’s license and they’re gonna get on that commercial flight and nothing’s gonna happen.

Interviewer: But that’s supposed to be the deadline.

Schweitzer: Blah, blah, blah, “supposed to be the deadline.” There’s nothing in the Constitution that tells Homeland Security that they’re supposed to do this or they must do this. In fact there isn't even any actions by Congress that says this is the specific letter you must have. This is another bluff by some bureaucrats in Washington DC and thank God we live a long ways from Washington DC.

Interviewer: Well, Governor Schweitzer, it's great to talk to you.

I think the governor and legislature are right to be up in arms about the REAL ID Act if for no other reason than the federal government placing a requirement on the states they the feds estimate will cost $14.6 billion and they've only offered $90 million, i.e. less than 1%, help to pay for the changes. The roughly $8 million that Montana estimates it would have to spend each year to support the REAL ID requirements is on the same order as the amount the state spent acquiring new parks and recreation lands in the most recent budget.

My hat tips to BoingBoing and Blacknell for having partial transcripts that I built on.


Sunday, March 09, 2008

 

Quote o' the Day

Success consists of going from failure to failure without loss of enthusiasm.
--Winston Churchill

Saturday, March 01, 2008

 

Pascal's Wager for Climate Change

Reading an email thread arguing about the reality of human caused climate change I accidentally analogized the situation to Pascal's Wager. Both are premised on the probability and risk-reward ratio of unknowable situations.
If there is anthropogenic global warming but we continue in our current energy consumption patterns, we continue to enrich petro-states and lead our economy teetering toward an economic precipice of short supply, high priced oil. If there is no anthropogenic global warming but we switch to carbon neutral energy sources, then we become more economically stable and self sufficient while paying ourselves to develop new energy infrastructure.
Of course, I'm not the first to think of think of such a thing. Apparently the idea goes by the name Global Warming Wager or the Precautionary Principle.

It looks like the arguments against the idea run along the lines of:

I think my statement differs from the normal formulation because it intertwines the political aspect. Our current course has resulted in a trade imbalance and a reliance on countries with which we often find ourselves at odds.

What do you think?


 

Mortgage Mess Meets Montana

The Billings Gazette is carrying a story about a borrower and a mortgage broker conspiring to fraudulently obtain loans. The story's spin is that the borrower will get to keep the houses and loans that he obtained on the sly, which seems somewhat appropriate considering that he's paid consistently on them. The more interesting angle on the story, I think, is that the borrower will be spending a year in jail for his role and the broker will be spending on the order of five years in the pokey.

Thursday, February 21, 2008

 

Recommended: "Class C: The Only Game in Town"

This fantastic, independent film recently won the Big Sky Film Festival. I was lucky enough to catch a screening of it tonight in Bozeman. In a word, it was poignant. I actually shed a tear and laughed very hard.

Class C follows five girls basketball teams from the smallest category of Montana high schools. The film's narrative is driven by their pursuits of a state championship, but the movie is rarely about basketball. Defeat, victory, ruin, possibility, humility, pride, place, and self-discovery all play much larger.

Beautiful cinematography featuring Montana's sweeping vistas give the film a wonderful flavor. An original soundtrack provides rich texture.

I was very impressed with the balance that the film's young directories demonstrated. Often with such movies, I cringe more than I emote. The directors successfully walked a fine line, exploring racial tensions, broken homes, and dying towns in a way that hurt just enough. Then they'd backhand me with a finely juxtaposed knee-slapper.

The girls, of course, are the stars of the movie. With a few exceptions, they're very impressive, grounded individuals who know exactly how much and simultaneously how little basketball matters. They articulate with compassion the struggle and joy of rural livelihoods.

I think the show has wide appeal, despite being set in Montana. I watched the film next to a woman who grew up in New York City; she enjoyed it very much.

I highly recommend trying to catch Class C. It airs on Montana PBS Wednesday, Feb 27 at 8pm and Monday, March 3 at 7pm.


Wednesday, February 06, 2008

 

Quote o' the Day

The Gallatin County Republicans held their Presidential nominating caucus at a local bar. The biggest name in attendance was Kansas Senator Sam Brownback, who was there to stump for John McCain. According to the local paper, Brownback approved of the choice of venues.
“I love the Montana style of holding this at a bar with cheap beer.”
The caucus coincided with happy hour at the bar, during which beers were $1.

On a slight unrelated note, Montanans spend the most per capita at bars. Amazingly, the average spending is nearly 5 times the national average. Combined with Montana's bar prices tending to be lower than elsewhere, well, that's a lot of drinking.


Sunday, February 03, 2008

 

Are you one of the smartest 60 million people?

Are you one of the smartest 60 million people? For that matter, are you among the top 60 million at anything? 60 million is a lot of folks. The two largest of the United States, California and Texas, total roughly that number. It's 100 times the number of folks in Vermont.

60 million is one percent of the world's 6 billion people. Mensa members are required to be in the top two percent of intelligence. To say that you're one of the smartest 60 million is to say that you're not just eligible, but you'd be one of the smarter members.

I mention this not to put anyone down, but just to give scale to the gigantic numbers.


 

Inversion

Matthew 25:29 reads in part, "For everyone who has will be given more, and he will have an abundance..." This is the same principle upon which modern consumer banking operates. The rich have something to offer for collateral, or better still have a reputation for handling money well, so banks are willing to loan to them. The poor have nothing to offer to secure a loan. They're "obviously" bad with money; why else would they be poor?

With this in mind Muhammad Yunus founded Grameen Bank to make very small loans to the poor. The initial round of loans averaged around $0.50 apiece. His position was that the least qualified should be given priority for loans. A woman who claimed she didn't know how to handle money because she'd never even touched it was their prime loan candidate, according to Yunus. The bank has grown to 2,100 branches, nearly 25,000 employees, and 7.4 million borrowers. For his trouble Yunus and the bank were awarded the Nobel Prize in 2006.

My favorite anecdote from listening to the podcast of Yunus' address to the Commonwealth Club involved his work with Dannon. The giant yogurt company wanted to work with him to produce an inexpensive, nutritional-supplement yogurt. He said they needed to find a way to package the yogurt that was biodegradable, instead of using plastic. Dannon searched far and wide and returned with plans to use a corn starch substance for the container. Yunus asked if the container could be eaten. They said no. He said it was no good to sell the poor something they couldn't eat. "When I buy ice cream, I can eat the package it comes in," he said.

I hadn't thought of a cone quite that way before.

Monday, January 28, 2008

 

Not even your two cents?

I find it oddly ironic that all of the blogspot.com blogs I could find which have names related to the phrase "in my opinion" seem to be effectively abandoned after at most three posts.

These inclue:

Many of these have no posts. Do you suppose this sample is reflective of the overall rate of abandonment at blogspot or is starting a blog explicitly about one's opinions a recipe for having none?


Saturday, January 19, 2008

 

Who Won?

Go look at the headlines tonight. They proclaim that on the Democratic side Clinton won Nevada. Look a little closer. You'll see Clinton won the count of state delegates with better than 50%. Unfortunately, Presidential candidates are not nominated based on the count of state delegates; they're nominated based on the number of delegates to the national convention. By that metric Obama got 13 and Clinton received 12. Who won? Who won the 2000 Presidential election? It wasn't the candidate who received the most votes.

On the Republican ballot in South Carolina, the media declares it a close contest with McCain garnering 33% of the vote and Huckabee 30%. However, on the metric that actually matters, convention delegates, McCain got 19 delegates and Huckabee only 5. What appears at first to be a 10% difference is nearly a 300% difference.

Yes, it's easy to snipe at the media. Yes, I'm going to do it anyway.

Journalists: lazily reporting elections for at least half a century.


Friday, December 28, 2007

 

Quote o' the Day

"We would like to return to work with our writers. If we cannot, we would like to express our ambivalence, but without our writers we are unable to express something as nuanced as ambivalence."
Steven Colbert and John Stuart announced that their shows would be returning to production without their striking writers. What pained me was CNN reporting that statement as if it was just another press release, not as the punchline it was. Then again, I suppose that's why the reporters are at CNN, not Comedy Central.

 

Math Works...Sometimes

Driving back from my hometown with my wife and daughter on Christmas Eve, the Prius started reporting that it was low on gas. I wasn't too worried about it because I knew that the Prius has a 10 gallon gas tank and the car was reporting that it was getting about 45 miles per gallon since I'd filled up. That should've meant that I could go 450 miles on that tank of gas. I knew that I only needed to travel a total of 415 miles to get home. My wife trusted me and we made it home safely to dream of sugar plums.

We stayed home on Christmas and the following day.

By the 27th, we needed to go out for groceries. It was basically 10 miles to the store we needed to go to. No problem: the math says that we should have another 35 miles on that tank of gas. We headed out on the interstate and a few miles in ran out of gas, which was a first for me in any vehicle.

The 2004-2008 Prius has a bladder in its fuel tank to reduce evaporative fuel loss. In cold weather, it's reported to allow less than a full 10-gallon fill.

Thankfully, one of our friends was just returning from the store. We called them when they were about 2 miles from us headed the other direction on the interstate. I ran across traffic, jumped in with them, got a ride home, grabbed the lawn mower's gas can, and drove our other car off to the rescue.

To my wife's enduring credit, she did not make fun of me and my misplaced faith in math. All of her laughter was directed at the irony of situation. Moments before the car dropped out of cruise control and started flashing lights at us, I had said, "I'm pretty sure there's one more notch to go on the gas gauge."

I'm extremely thankful that we ran out when we did. Had we run out a few miles earlier, we would've been stranded on the interstate on very nasty roads on Christmas Eve. She may not have been so kind.


Tuesday, November 13, 2007

 

Under Reported News: Chinese Submarine Stumbles into US Naval Exercise

I've seen very few US news sources reporting this story. A Chinese submarine surfaced within shooting distance of a US aircraft carrier during a naval exercise. Chinese officials "dismissed the affair as coincidence."
The lone Chinese vessel slipped past at least a dozen other American warships which were supposed to protect the carrier from hostile aircraft or submarines.

The incident, which took place in the ocean between southern Japan and Taiwan, is a major embarrassment for the Pentagon.

Analysts believe Beijing was sending a message to America and the West demonstrating its rapidly-growing military capability to threaten foreign powers which try to interfere in its "backyard".

Go ahead, search for this story. I get 11 hits, many of which aren't about this incident. Yeah, this sounds way less important than a has-been pop star running a red light, which gets hundreds of hits.

Saturday, November 10, 2007

 

Experimenting with Gravity

One of our neighbors let me shoot pictures of their baby. Here she is experimenting with gravity.

Of course the shot was serendipity.


Saturday, November 03, 2007

 

The FDIC shut down my bank and all I got was my lousy money

I have been a NetBank customer for a long time. I've been very happy with the it. I'd heard scattered reports that NetBank wasn't doing so well, but I wasn't worried about it. I mean, really, what's the worst that could happen to my bank? Besides, it would've been an enormous hassle to find a better bank and then set up all the cool automated bill payment and bill presentment stuff I had at NetBank.

Imagine my shock then when I tried to log into NetBank about a month ago and was abruptly greeted by a notice that NetBank had been shut down by OTS. (Alright, so the title is misleading. It's not actually the FDIC that shuts down banks. They only provide the insurance. But then again, nobody knows who OTS is.) ING Direct was taking over the FDIC covered deposits. My money was suddenly frozen. I felt like a nasty third world dictator against whom the US decided to take tough action. Weird.

All turned out well. Of course, all of my money was covered under the $100,000 limit. I was liquid again in a few days. The freeze happened smack in the middle of my house, car, power, and credit card bills being due. All of them were paid without a hitch. It's really sort of remarkable. It's easy to think of government regulation being more trouble than it's worth. This was certainly a case where I was thankful for government regulation and the oversight it provided.

Apparently, I can now say that I'm a victim of the subprime lending crisis. NetBank's undoing was the result of "payment defaults on loans sold, weak underwriting, poor documentation, a lack of proper controls, and failed business strategies." Sure, it's a pain to find and set up a bank with checking services as good as NetBank's, but I sure am thankful I got back my lousy money.


Saturday, October 06, 2007

 

In case you missed it

Researchers believe they've sussed out the purpose of the appendix. Essentially, it's a reserve of yogurt.

Sunday, September 23, 2007

 

What's the difference: hail vs. sleet

We were hiking today and the weather turned nasty. We were set upon by frozen precipitation. We desired to name our oppressor, but we unsure of the proper nomenclature. Upon returning home, I looked up hail and sleet. According to the good folks who catalog our lexicon, the only difference between hail and sleet is in size. The former includes globular frozen precipitation larger than 5mm in diameter; the latter is 5mm and smaller.

We were oppressed by sleet today. Let me tell you, every one of those 5 millimeters hurt.


Tuesday, August 07, 2007

 

The Fly on My Desk

It turns out that a housefly will go around licking the stuff that sticks to your keyboard.

Sunday, August 05, 2007

 

Playing with depth of field


Friday, June 29, 2007

 

Quote o' the Night

We saw Heartbreak House by George Bernard Shaw tonight. Wow. I had no idea he was so good. The quote of the night:
Give me deeper darkness. Money is not made in the light.
That pretty much sums up how I feed about the ideal office place. Blinds drawn? Check. Lights off? Check. Computer monitor the brightest point in room? Check. Totally reinterpreting another era's social commentary for my own purposes? Check.

Tuesday, June 05, 2007

 

Write State Leaders About Montana's 529

Perhaps you saw my post about the woes of Montana's 529 plan. Would you be willing to consider writing state officials to let them know how you feel?

Here's a sample letter that you can use.

Dear [State Official],

Montana has a 529 educational savings plan to help our families save for college. Unfortunately, a recent report by SavingForCollege.com found Montana's plan has the highest fees in the country. These fees add up in a major way, nearing $20,000 when saving enough for an MSU-Bozeman education. It's hard enough to save for our children's educations without being hindered by one of the most expensive plans in the country.

Please encourage the Board of Regents to investigate why their plan has the highest fees in the country.

Currently contributions to Montana's 529 plan are deductible from state taxes. Please also consider supporting legislation to extend that tax benefit to contributions to any 529.

Finally, please consider how we can keep the Board of Regents accountable in the future. Perhaps mandatory periodic reports comparing the fees and performance of Montana's plan to other plans are appropriate.

See http://montana529.info for more.

Thank you for considering this matter.

Sincerely,

[Your Name]
[Your Address]
[Your City, State ZIP]

To write to the governor, please use this form.

The email addresses of the regents are listed on this page.

To find email addresses for your state legislators, please use Project Vote Smart. On the left side of the page, you'll find a box to enter your zip code. Provided that they'll give contact information for your legislators and a bunch of other folks.

Thanks for thinking about writing. If you do, feel free to post a comment saying you did.


Tuesday, May 29, 2007

 

A Bum Deal

Montana's families are getting a bum deal.

A 529 plan is a college savings account that has a number of tax advantages. Most significantly, earnings are untaxed if used for college education. In Montana, another benefit is that contributions to the state's plan are deductible from income taxes. Unfortunately, Montana's plan† suffers from fees so high as to more than offset the benefits.

A deduction against Montana income tax is worth at most 5.175%‡. The Montana plan charges a 5.5% fee* against each contribution, a larger percentage than the value of the deduction. Compare that to Vanguard's 529 plan which charges no sales fee. If you contributed $1,000 to each plan, the Vanguard plan would have a $1,000 balance, while the Montana plan would have a balance less than the original contribution, even if you also contributed your tax deduction. Sadly, the state is offering a tax break to encourage families to act against their best interest.

The Montana plan is also a bum deal in subsequent years. Mutual funds make money by charging a percentage of an account's balance each year. This percentage is called the fund's expense ratio. The funds in Montana's plan have ratios ranging from 1.18% to 1.44%*. The funds in Vanguard's plan have ratios ranging from 0.5% to 0.7%, less than half that of Montana's funds.

To flesh out this comparison, I've published a spreadsheet comparing the growth of a moderate risk fund from each plan. Despite the income tax deduction advantage Montana's plan enjoys, it has a lower balance in every year compared to the Vanguard plan. By the child's 18th birthday, Montana's plan has fallen nearly $20,000 behind. The difference is entirely due to the plan's excessively high fees. For each 1% of Montana's population that uses the Montana-529 plan, an out-of-state corporation earns nearly one million dollars in unnecessarily high fees.

Should we feel some fealty toward the plan because it is Montana's? Absolutely not. The plan is operated by a California company with no offices in Montana. The state's government has essentially licensed Montana's good name to this company in exchange for a bad deal for its citizens.

I'm not the only one who's noticed the deficiencies of Montana's 529 plan. SavingForCollege.com published a report showing that Montana's plan had the highest fees in the country, fees that were usually double, if not triple, those of other states' plans. Arizona dropped Pacific Life's plan last year in favor of plans with lower fees. Montana is now the only state using that company's funds. SmartMoney singled out Montana's plan for having high fees. Morningstar also mentions the plan's high fees and that parents of relatively young children are better off going to another plan.

Clearly something should be done. I propose three changes.

  1. Montana should either find a new 529 plan with lower fees or should require Pacific Life to lower its sales load and expense ratios. We should fix what's broken.
  2. Montana should offer an income tax deduction for contributions to any 529 plan, not just the state's own. We should not use tax breaks to entice Montanans to settle for a bad deal. We should reward Montanans for saving for college even if our plan remains uncompetitive and they're forced to look elsewhere.
  3. We should prevent Montana from slipping into this situation again. The legislature should order periodic reports of the competitiveness of our 529. The Board of Regents, the government body responsible for the plan, has been negligent. Which of the Regents knows that their fund has the highest fees in the county? Hopefully, periodically shining a light on this dark, dusty corner of its duties will make the Board more mindful.

Please contact your state legislators and the governor and complain about this sorry state of affairs for Montana's families. You can find a sample letter and contact information here.

Footnotes:

There are actually two 529 plans offered by Montana. The plan I'll refer to throughout is the Pacific Life plan. The other plan is offered by College Savings Bank. That plan only offers stable-value investments, such as CDs. These investments yield less than the rate of college inflation. An investment in these options is essentially a money losing venture, as the purchasing power of the funds will be less at the time they're needed than at the time they were invested. Consequently, I consider plans like Pacific Life's, which invest in stocks and bonds, which can achieve average returns above the roughly 6% college inflation rate, the only option. Within the Pacific Life plan, three classes of shares can be purchased. I'm only considering the class A shares, as they're the best long term investment.

The highest personal income tax rate in Montana is 6.9%. Any amount deducted from state taxes is taxed by the federal government. If a taxpayer qualifies for the 6.9% Montana bracket, then he will pay at least 25% in federal taxes. The net value of the state tax deduction is calculated by: (deductible amount) * (state rate) * (1-federal rate), or 6.9% * 75% = 5.175%. See this tax deduction calculator for a better explanation.

* Please see the Pacific Life 529 Prospectus pages 21 through 23.

blog counter

Saturday, May 26, 2007

 

Random Linkage


Tuesday, May 08, 2007

 

Oh, Silly Utah

Recently I've noticed that the good folks in Utah are acting a little silly.

Exhibit A: The Utah GOP recently debated whether Satan was behind illegal immigration. Turns out there was support for causation, there just wasn't a quorum.

Exhibit B: A man driving a dark red car had his license plate revoked. It read "merlot."

Exhibit C: A while back Utah created the equivalent of a do-not-call registry for children's email addresses. Other entities, including the FCC, have considered and rejected such proposals as being untenable and ineffective. Undeterred, Utah created the list, forecasting that they'd generate millions of dollars in revenue. Instead, they've reported a net loss.

Exhibit D: So you want to sell a used CD in Utah (or Florida)? I'm going to need to see some ID. And get some finger prints. Oh, and you'll have to endure a waiting period. You'll never believe that the record industry, which has seen declining sales recently, would lobby for legislation to make it more inconvenient to sell used CDs.


 

Roomba

We bought a Roomba in the recent Woot-Off. It's great. For $145, we have a vacuum that we use much more often than our much more expensive, but not that much more capable, Kirby. It's great for cleaning up the mess that our infant daughter invariably creates when she eats. Speaking of our daughter, she was terrified of the Roomba at first, but now she's on "only fleeing from it when it comes directly toward her" terms with it. Otherwise, she happily pats it as it goes past her.

My only complaint about my Roomba is that it won't clean the rug in the center of our living room, which it detects as a drop off due to its dark color.


Tuesday, January 02, 2007

 

Quote o' the Day

In a recent episode of Discovery Channel's Dirty Jobs, host Mike Rowe assisted the "snake lady", a herpetologist who collects and studies the endangered Lake Erie Water Snake. The episode was quite outstanding, as an untrained TV personality wrangled 5 foot long snakes out from under rocks. Naturally, he was bitten repeatedly, causing him to bleed profusely and drop to his knees wincing in pain. Fortunately, the snakes weren't poisonous, but his fear and discomfort were quite real with him saying that he wanted to quit early in the day, a first as far as I know.

In the show's outtakes, which played as the credits rolled, the following exchange played out:

Rowe: I have a stupid question.

Snake Lady: There are no stupid questions.

Rowe: I have a book of stupid questions.

Snake Lady: (Sweetly.) What's that: your diary?

Ouch.


Monday, November 27, 2006

 

Quotes o' the Day

unnecessary risk upon the [NSTA] capital campaign, especially certain targeted supporters.
Excerpt from a National Science Teachers Association letter rejecting a donation of 50,000 copies of An Inconvenient Truth due to the displeasure acceptance of the gift would cause donors to the organization, such as Exxon Mobil, according to the Washington Post.


I've spent a week setting this thing up and using it, and the overall experience is about as pleasant as having an airbag deploy in your face.
From a review of Microsoft's Zune by the Chicago Sun-Times.


Cattle die, kindred die,
Every man is mortal:
But the good name never dies
Of one who has done well.
To commemorate his recently passed father, Milton, David Friedman, a blogger and also a libertarian economist, quoted the Hávamál.

Sunday, November 19, 2006

 

A Geek's Delight

I'm not so good at the word puzzles featured on NPR Weekend Edition Sunday's Sunday Puzzle segment. I think I've determined the answer about 4 times, including this week's puzzle.
Name a well-known American city, with 12 letters in its name, containing the letters of THANKS in left to right order, not necessarily consecutively. A hint: This is a city of more than 100,000 people.
This challenge was great for a geek.
  1. Find a list of US cities with at least 100,000 residents
  2. Paste that list into vi
  3. Search for the regular expression /t.*h.*a.*n.*k.*s/
  4. Submit answer
Yes, I still feel good about solving the puzzle even if I cheated. In case you'd like a bigger hint, the answer is a city in California with a name composed of two words.

Tuesday, November 14, 2006

 

Quote o' the Day

I'm a moderate, and there is no room left in the Republican Party for moderates. I'm not leaving the Republican Party; it has basically left me.
State Sen. Sam Kitzenberg R-Glasgow, soon to be D-Glasgow, who was decided to switch parties, giving Democrats a 26-24 majority in what had been a evenly divided Montana State Senate. His move is laced with intrigue, as Kitzenberg was given an unadvertised job by the Democratic governor's administration. Kitzenberg has said changing parties had nothing to do with his employment.

Monday, October 30, 2006

 

Video Recommendations


Monday, October 23, 2006

 

Credit where credit is due

Weird Al's new album, Straight Outta Lynwood, has landed on Billboard's top 10, with its premier song, White and Nerdy, getting number 9. Both marks are the artist's highest showings in his 27 year career. The White and Nerdy music video "world premier" on AOL was canceled because it was already widely distributed on YouTube and other video sharing sites. Rather than being miffed, Weird Al gives the Internet credit for his greatest success, saying,
The ("Nerdy") video has gotten a lot of attention, and the proliferation of places like YouTube (has) been a big help.

I'd kind of written off the chance of ever having another hit single, since record labels weren't really releasing commercial ones. As much as people are griping about the Internet taking sales away from artists, it's been a huge promotional tool for me.


Friday, October 20, 2006

 

It's not tool use, but...

Most impressive. One or more crows in Japan have learned that an easier way to crack a nut is to drop it into traffic. That left the subtle problem of having to retrieve the nut guts from amongst the wizzing cars. Watch the video to see the amazing solution.

From Ursi's Blog


Tuesday, October 17, 2006

 

Quote o' the Day

On today's All Things Considered, NPR's Scott Horsley reported on Bargain-Hunting in San Diego's Real-Estate Slump. He interviewed real estate auctioneer Bill Shepner, who offered this gem.
If you're looking for the next foreclosure, follow the Hummer. A lot of these Hummers were paid for out of equity lines and refinances -- and the Lexuses and the Mercedes.

Their income maybe was never enough to afford the loans, and their adjustable-rate mortgages are kicking in, and there's going to be some blood flowing in the streets.


Sunday, October 15, 2006

 

Free the podcasts

Two of my favorite NPR shows just announced that they'd start offering free podcasts. Previously, This American Life and Marketplace Money shows were available as podcasts from audible.com for a fairly hefty fee; to subscribe to Marketplace Money for a year cost nearly $120, whereas becoming a member of my local NPR station cost $20. Now they're available for the incredibly low price of "donate or feel guilty." Interestingly, at least TAL is following the New York Times model of moving the free content to a fee-required archive after a bit. I'll probably only use the Marketplace Money feed because it publishes new content earlier than YPR streams it, while TAL publishes after I've already created my own podcast of the content from YPR.

Saturday, October 14, 2006

 

Memory about Storage

I remember that before serious Internet access reached the small town I grew up in, there was a sundry electronic goods store there that would mail order computer parts. For some reason, I stopped there one day and asked them about computer component prices, even though I had neither sufficient disposable income to purchase or a computer new enough to support such items. I remember being shocked that they were charging in the neighborhood of $2.50 per MB of hard drive storage, when the going rate should've been closer to $1 per MB.

I tell this "back in my day, uphill both ways" story only because I think it's wonderful that roughly 12 years later hard drive storage can be purchased at about $0.25 per GB, according to recent postings on SlickDeals. That's a 10,000 times increase in value compared to the price the local shop offered years ago, an annualized improvement of about 115%. Of course, those numbers are at least as suspect as my "through two feet of snow, barefoot" memory.


Wednesday, October 11, 2006

 

Integrating FxCop into CruiseControl.NET

Recently, I needed to integrate FxCop into our CC.NET server.  I had a few design goals for the integration.
I found couple useful resources along the way:
I discovered fairly quickly that FxCop locks the assemblies that it's analyzing, which meant that I had to make a copy of the assemblies that FxCop was analyzing or else the build project would fail because it couldn't copy to its output directory.  I also discovered that the return value of FxCopCmd doesn't indicate whether rule violations were found, rather whether a catastrophic error was encountered.  That meant that to get the CC.NET build to break, I had to run FxCop from another application to control the value that was returned to CC.NET.  I decided to accommodate both of those needs with msbuild.  I could've used NAnt for the same purpose.  Specifically, to break the CC.NET build I needed msbuild to examine the FxCop output and return a failing error code if any violations were found.  The ability to parse an XML file isn't in the base functionality of msbuild; however,  the <XmlRead> task of MSBuild Community Tasks Project does have that ability.

The steps for my msbuild script are:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="RunCheck" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- Required Import to use MSBuild Community Tasks -->
  <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>

  <Target Name="RunCheck">
    <CallTarget Targets="Copy" />
    <CallTarget Targets="Check" />
    <CallTarget Targets="Report" />
  </Target>

  <Target Name="RunFxCopUI">
    <CallTarget Targets="Copy" />
    <Exec Command="attrib +R $(FxCopProject)" />
    <Exec Command='"$(FxCopExe)" $(FxCopProject)'/>
  </Target>

  <Target Name="Copy">
    <Copy SourceFiles="@(DllsAndPdbs)" DestinationFolder="$(FxCopWorkDirectory)" SkipUnchangedFiles="true"/>
  </Target>

  <Target Name="Check">
    <Exec Command='"$(FxCopCmdExe)" /project:$(FxCopProject) /out:$(FxCopOutput) /directory:$(FxCopWorkDirectory) /forceoutput' />
  </Target>

  <Target Name="Report">
    <XmlRead ContinueOnError="True" XmlFileName="$(FxCopOutput)" XPath="string(count(//Issue[@Level='CriticalError']))">
      <Output TaskParameter="Value" PropertyName="FxCopCriticalErrors" />
    </XmlRead>
    <XmlRead ContinueOnError="True" XmlFileName="$(FxCopOutput)" XPath="string(count(//Issue[@Level='Error']))">
      <Output TaskParameter="Value" PropertyName="FxCopErrors" />
    </XmlRead>
    <XmlRead ContinueOnError="True" XmlFileName="$(FxCopOutput)" XPath="string(count(//Issue[@Level='CriticalWarning']))">
      <Output TaskParameter="Value" PropertyName="FxCopCriticalWarnings" />
    </XmlRead>
    <XmlRead ContinueOnError="True" XmlFileName="$(FxCopOutput)" XPath="string(count(//Issue[@Level='Warning']))">
      <Output TaskParameter="Value" PropertyName="FxCopWarnings" />
    </XmlRead>

    <Math.Add Numbers="$(FxCopCriticalErrors);$(FxCopErrors);$(FxCopCriticalWarnings);$(FxCopWarnings)">
      <Output TaskParameter="Result" PropertyName="FxCopRuleViolations" />
    </Math.Add>

    <Error Text="FxCop encountered $(FxCopRuleViolations) rule violation(s). Critical errors: $(FxCopCriticalErrors). Errors: $(FxCopErrors). Critical warnings: $(FxCopCriticalWarnings). Warnings: $(FxCopWarnings)."
Condition="$(FxCopRuleViolations) &gt; 0" />
  </Target>

  <ItemGroup>
    <DllsAndPdbs Include="..\..\..\ThirdParty\lib\*.dll;bin\debug\*.dll;bin\debug\*.pdb;"/>
  </ItemGroup>

  <PropertyGroup>
    <FxCopWorkDirectory>FxCop</FxCopWorkDirectory>
    <FxCopProject>ProjectName.FxCop</FxCopProject>
    <FxCopOutput>$(FxCopWorkDirectory)\ProjectName.FxCop.output.xml</FxCopOutput>
  </PropertyGroup>

  <ItemGroup>
    <OutputFiles Include="FxCop\*.dll;FxCop\*.pdb" />
  </ItemGroup>

  <PropertyGroup>
    <FxCopCriticalErrors>0</FxCopCriticalErrors>
    <FxCopErrors>0</FxCopErrors>
    <FxCopCriticalWarnings>0</FxCopCriticalWarnings>
    <FxCopWarnings>0</FxCopWarnings>
  </PropertyGroup>

  <PropertyGroup>
    <ExpectedFxCopCmdPath>C:\Program Files\Microsoft FxCop 1.35\FxCopCmd.exe</ExpectedFxCopCmdPath>
  </PropertyGroup>

  <Choose>
    <When Condition="Exists($(ExpectedFxCopCmdPath))">
      <!-- Hope that the expected version of FxCop is installed -->
      <PropertyGroup>
        <FxCopCmdExe>$(ExpectedFxCopCmdPath)</FxCopCmdExe>
      </PropertyGroup>
    </When>
    <Otherwise>
      <!-- Otherwise hope that FxCop is in the path. -->
      <PropertyGroup>
        <FxCopCmdExe>fxcopcmd.exe</FxCopCmdExe>
      </PropertyGroup>
    </Otherwise>
  </Choose>
</Project>

To get the output of FxCop to appear on the CC.NET dashboard, I needed to tell FxCop to write its output to a file.  Use the "/out:<filename>" switch for that.  The "/forceoutput" switch is also nice because it causes an output file to be written even if no rules are violated.  Then I needed to merge that into the CC.NET build log.  The CC.NET merge task is intended for that.  The gotcha I discovered is that I needed to put the <merge> task under the <publishers> tag, not the <tasks> tag.  If it's under <tasks>, it's not executed if the build fails, which foils my goal of getting the rule violations onto the CC.NET dashboard.

That leaves only the question of how to cause the FxCop CC.NET project to run after the main project completes successfully.  CC.NET includes a <projectTrigger>, which is perfect for this task.  Not only is the project trigger able to run the dependent project only when the parent project completes successfully, but it also is smart enough not to run the dependent project multiple times if the parent project completes while the child is still running.  Here's my ccnet.config:

<cruisecontrol>
  <project name="FxCop">
    <publishExceptions>true</publishExceptions>
    <triggers>
      <projectTrigger project="ParentProject">
        <triggerStatus>Success</triggerStatus>
      </projectTrigger>
    </triggers>
    <tasks>
      <msbuild>
        <timeout>1800</timeout>
        <executable>C:\Windows\Microsoft.NET\Framework\v2.0.50727\msbuild.exe</executable>
        <projectFile>ProjectFile.Fxcop.msbuild.xml</projectFile>
        <buildArgs>/noconsolelogger /v:diag</buildArgs>
        <logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,ThoughtWorks.CruiseControl.MsBuild.dll</logger>
      </msbuild>
    </tasks>
    <publishers>
      <merge>
        <files> <file>FxCop\ProjectName.FxCop.output.xml</file> </files>
      </merge>
      <xmllogger />
    </publishers>
  </project>
</cruisecontrol>
My biggest disappointment with the result is that I couldn't get the detailed FxCop results to appear on the CC.NET web dashboard page for each build; rather they appear on the "FxCop Report" page, which I decided was not worth the effort to change.  However, I really didn't like the look of the standard report, so I edited my CruiseControl\webdashboard\dashboard.config file to use Brian Likes's XSL.

Tuesday, October 10, 2006

 

Respectful Protest

If you're going to burn the neighboring country's flag, you can at least do it in a nice shirt and tie, as modeled by this protesting Korean.

Image swiped from cnn.com.

Monday, October 02, 2006

 

Random Coolness


Sunday, October 01, 2006

 

Quote o' the Day

NPR's Bob Mondello reviewed The Queen on Saturday's ATC. His synopsis included the following brilliant exchange betwen Elizabeth II and the newly elected Prime Minister Blair.
HM QE II: Have we shown you how to start a nuclear war, yet?
Tony Blair: Ah, no.
HM QE II: Oh, first thing we do appearantly...
Tony Blair: You obviously know my job better than I do.
HM QE II: Yes. Well, you are my tenth Prime Minister, Mr. Blair. My first, of course, was Winston Churchill.

Mondello: How's that for putting a man in his place?


Saturday, September 30, 2006

 

Onion Worthy

A number of times in this election cycle, I've heard news commentators saying that Republican candidates will be focusing on local issues because things aren't going so well at the national level between an unpopular foreign policy and a slowing economy. Apparently, that memo didn't make it Montana, where a seemingly-satirical, Onion-worthy letter to the editor appeared in the Billings Gazette, ranting that:
If [Sen. Burns] and a very few others are defeated, the Democrats will, of course, control the Senate... This will put great power in the hands of people who will, judging from past performance, use their positions to do all they can to destroy what remains of our constitutional republic.

Could this be our last chance to save our freedoms? The guns, for example, will come under heavy assault; and if the guns go, so will our remaining freedoms.

We had better re-elect Conrad Burns and, at least, help delay the disaster that would be inevitable otherwise. We could, at least, hope in the meantime for a God-given miracle, giving us a reprieve from the downfall of our once great and wonderful nation.

With tongue firmly in cheek I say, "It's America-haters like him who think we're no longer a 'great and wonderful nation.'"

Thursday, September 28, 2006

 

Quote o' the Day

Senate races in Montana are particularly fun because my piddly little vote counts the same as roughly 33 Californians' votes on federal government. On Saturday, the candidates for Montana's open seat debated in Butte.
Burns: [Tester] wants to weaken the Patriot Act.

Tester: I don't want to weaken the Patriot Act; I want to repeal it... It takes away your freedom... and when you take away our freedoms, the terrorists have won.

Tester has received some attention for this statement:

Tuesday, September 26, 2006

 

Quote o' the Day

This post is far overdue. All the way back at the end of August, Candorville ran the following marvelous episode. (That link will be dead in a few days.)
Nararator: In an alterate universe, the events of 1774 happen instead in 2004...

Ted Koppel: The British Parliament passed the Coercive Acts today. The acts streamline government and give the king's troops the tools they need to root out terrorists. Benjamin Franklin said that those who surrender their liberties to gain a little safety deserve neither. Tories in Parliament responded by asking why "Liberals like Franklin hate the Americas."

On the other hand, waiting to post this has serendipitously allowed the news to demonstrate that Franklin was correct; despite Americans allowing their government to take away their liberties, the threat of terrorism has increased.

Thursday, September 21, 2006

 

Quote o' the Day

I used to be skeptical of global warming, but now I'm absolutely convinced that the world is spiraling out of control. CO2 is like a bushfire that gets bigger and bigger every year.
Sir Richard Branson recently pledged $3,000,000,000 to fighting global warming.

Thursday, September 14, 2006

 

Nothing new under the lamp shade

You know all those work at home scams? Yeah, there's nothing new there. This ad from 70 years ago slayed me. Notice how emphatic it is that the book is free.

Wednesday, August 09, 2006

 

Loading a color cursor in .NET 2.0

The MSDN documentation on the Cursor class says
The Cursor class does not support animated cursors (.ani files) or cursors with colors other than black and white.
Consequently, if you try to display a color cursor, it appears as a black outline of the original. So, supposing that you already have a .cur file containing a color cursor, follow these steps to display it. If you don't already have a color .cur file, you can use Visual Studio 2005 to create such a file.
  1. Add the .cur to the project's resources using the Visual Studio 2005 resource designer by using the the "Add existing file" toolbar item. I'm going to assume that you named the resource "hand2."
  2. Add a P/Invoke declaration for LoadCursorFromFile.
    [DllImport("user32.dll")]
    static extern IntPtr LoadCursorFromFile(string lpFileName);
    
  3. At runtime, copy the cursor resource to a temporary file, ask the Win32 API to load that file as a cursor, and create .NET Cursor object from the Win32 handle.
    private Cursor LoadColorHandCursor()
    {
        string path = Path.GetTempFileName();
        File.WriteAllBytes(path, Properties.Resources.hand2);
        Cursor hand = new Cursor(LoadCursorFromFile(path));
        File.Delete(path);
        return hand;
    }
    
The same technique will work in .NET 1.x, but it'll take a little more work to write the cursor to a temporary file.

Here's a working code example.

kick it on DotNetKicks.com


Friday, August 04, 2006

 

Cramer says oil will be more expensive

Jim Cramer of Real Money, Real Money, and Mad Money, who claims to have made some pretty good money in his day by correctly betting on rising energy prices, thinks the price of oil isn't getting any cheaper. He gave a number of reasons for this. Cramer is by no means condemning oil usage; he's merely identifying an opportunity to invest. However, it nearly gives me and my Prius a horrible smug problem and pushes me further toward wanting to find a non-petroleum way to power my commute to save money in anticipation of continued rising oil prices.

Friday, July 28, 2006

 

Proof that spam is from the devil

...and that Gmail's spam filtering is from above. Since June 26, I've received 666 spams, none of which Gmail incorrectly classified as spam, to my knowledge. Gosh, I love Gmail.

Saturday, July 22, 2006

 

There's another woman in my life

She found a big soft spot in my heart I didn't know was there.

Saturday, July 15, 2006

 

Hot Bicentenial

Two hundred years ago yesterday, the first white guy walked into the valley I live in. Two hundred years ago today, William Clark and his company followed old buffalo roads out of my valley, over the Bozeman pass, and into the Yellowstone valley at the direction of the invaluable Sacagawea.

Upon arriving near present day, Livingston, Montana, Clark remarked on

I'm guessing the snowy, high points he mentions are the Crazy Mountains, Livingston Peak, the Absaroka Mountains, and some point in the Bridgers. It's been at least a month seen there's been a significant amount of snow on the peaks around here, as has been the case in recent years past. I feel like that leaves two reasonable conclusions:
  1. 1806 was an unusually cold and snowy year.
  2. 2003-2006 have been notably warmer and/or drier than 1806.

My guess is for the latter.


Monday, July 10, 2006

 

A Convenient Truth

If you're interested in seeing Al Gore's An Inconvenient Truth, but it's not showing in your area or you're too cheap to shell out big bucks to go to a documentary, the Conversations Network is running a podcast of Gore giving the spiel on which the movie is based.

Monday, July 03, 2006

 

Quote o' the Day

Your caboose is looking really good!
My third-hand account of a pastor's compliment to one of the female members of the church. Yes, she had been restoring a railroad car.

 

Irony

Sunday's Writer's Almanac mentioned that the common wedding vow, "I take thee...from this day forward...till death do us part," was written by Thomas Cranmar, officiant of Henry VII's divorce.

Saturday, June 17, 2006

 

Quote o' the Day

According to CNN, David Letterman recently said:
You know, ...you've got to give him credit because earlier in the week, President Bush quietly sneaked into Iraq. Well, here's an idea: why don't we quietly sneak out of Iraq?"

Thursday, June 01, 2006

 

Quote o' the Day

From the Bozeman Daily Chronicle classified ads:
Free Llama Wool

You shear


Thursday, May 25, 2006

 

Quote o' the Day

From Paul Graham's How to Be Silicon Valley:
What nerds like is the kind of town where people walk around smiling. This excludes LA, where no one walks at all, and also New York, where people walk, but not smiling. When I was in grad school in Boston, a friend came to visit from New York. On the subway back from the airport she asked "Why is everyone smiling?" I looked and they weren't smiling. They just looked like they were compared to the facial expressions she was used to.

Thursday, May 11, 2006

 

Letter to my Congresscritters on Internet Neutrality

I'm often in favor of market driven solutions rather than regulation. However, I think that the Internet needs to be neutral in order to remain "The Internet". The very purpose of the Internet was to connect disparate networks. Allowing network providers to charge either side of the connection for access to a specific outside network breaks the spirit and nature of the Internet. Allowing a network provider to intentionally degrade or "not favor" a connection between two end points puts ISPs in the position of censor. Please vote for enforceable network neutrality. Montana needs network neutrality more than most places because of our low population density. Many Montanans do not and will not have a choice of multiple providers; consequently, many of us will not have the option of using another service provider if ours degrades or blocks access to a much used site or service.
Write your congresscritters.

Sunday, May 07, 2006

 

Quote o' the Day

From A Look at the Economics Behind the World's Oldest Profession:
Developing the consequences of their mathematical model, Edlund and Korn argue that the primary reason for the income differential is not the risk sometimes associated with the practice of prostitution but rather that prostitutes greatly diminish their chances for marriage by virtue of their occupation.
The author was using virtue, defined as "chastity, especially in a woman," ironically, right? Please, tell me that was intentional and not a careless cliche.

Sunday, April 30, 2006

 

Science can be fun

Science Friday interviewed Nobel Laureate George Olah, who's recently written Beyond Oil and Gas which argues that methanol, not ethanol nor hydrogen, should be the energy curency of the future. While that's an interesting premise, the interview was pretty bad, as Dr. Olah cannot be forced to come to a timely point. However, the podcast is almost worth a listen for the breathy, gravely, Eastern European accented voice of the doctor, a hilarious combination of Darth Vadar meets Count Dracula, methodically rumbling things like "Soviet Russia" and "The question you ask pushes me toward the point I am trying to make."

Saturday, April 29, 2006

 

Oxymoron of the Day

Meteoric rise

Friday, April 28, 2006

 

Quickies


Saturday, April 15, 2006

 

Omega-3 Fatty Acids per Mercury in Common Seafood

Omega-3 fatty acids are generally recognized as healthy. Mercury is generally recognized as toxic. Seafood tends to contain both. Because I'm that kind of nerd, I figured out the optimal fish to eat to increase omega-3 intake while limiting mercury exposure. Here's a sorted list of the ratio of Omega-3 fatty acids to mercury in common seafood. A higher ratio is better.
Mean Mercury (ppm) Mean Omega-3 fatty acid (g) Omega-3/Hg (g/ppm)
Salmon (fresh,frozen) 0.01 0.68 68
Herring0.041.7644
Flounder or sole 0.05 0.43 8.6
Pollock 0.06 0.43 7.166666667
Crabs 0.06 0.37 6.166666667
Canned tuna (light) 0.12 0.495 4.125
Catfish 0.05 0.175 3.5
Scallops 0.05 0.17 3.4
Halibut 0.26 0.7 2.692307692
Fresh or frozen tuna 0.38 0.76 2
Cod 0.11 0.185 1.681818182
Shark 0.99 0.9 0.909090909
Lobster 0.31 0.235 0.758064516
Swordfish 0.97 0.7 0.721649485
Mahi mahi 0.19 0.12 0.631578947
Tilefish 1.45 0.8 0.551724138
King mackerel 0.73 0.34 0.465753425
Red snapper 0.6 0.27 0.45
Grouper 0.55 0.21 0.381818182
Orange roughy 0.54 0.002 0.003703704
Data is from the American Heart Association.

Wednesday, April 12, 2006

 

Why I think it's wrong

Tim links to a post describing the problems with third parties. I think it's wrong.
  1. It's wrong because it ignores that the Republicans began as a third party at a time when the two-party system was well entrenched. The rise of a third party simply required a powerful issue that was untenable for one of the existing parties.
  2. It's wrong because a fair portion of folks vote based on party labels regardless of the candidate. More importantly, most voters couldn't tell you how the incumbent in their district voted on specific issues. So if folks are voting based on the individual, they're doing so based on an individual's charisma, not on his stance on issues, or his party label.
  3. The two party system is dangerous because it puts so much power in the hands of the redistricters. Lines simply need to be drawn just so to give one party a slim advantage in some districts while giving the other party enormous advantage in other districts to diminish the effectiveness of the minority vote. In a multi-party system, electing representatives by party at-large in large states would better express minority opinions and would limit the meaningfulness of redistricting. Recall that DeLay's major accomplishment was to redistrict Texas in order to give Republicans a larger share of the state's seats, leading to a majority in the House.

Wednesday, April 05, 2006

 

Quote o' the Day

I've been listening to and really enjoying Cory Doctorow's podcasts recently. Therein, the author or an invited guest reads 7-20 minute segments of Doctorow's short stories. The quality of reading isn't up to audio book standards, but it really is quite good with solid underlying recording technology and infrequent corrections. In general, I recommend Cory's stuff with the caveat of a blanket PG-13 rating.

While listening to When Sysadmins Ruled the Earth, an apocalyptic tale in which primarily only those sheltered in data centers survive, I laughed out loud, a dangerous proposition when running on a treadmill as I was, upon hearing the following exchange between two star-crossed sysadmins.

I've got a 486 downstairs with over five years of uptime. It's going to break my heart to reboot it.

What the everlasting s--- do you use a 486 for?

Nothing. But who shuts down a machine with five years uptime? That's like euthanizing your grandmother.


Monday, March 13, 2006

 

In Summary

While I eagerly await the arrival of my new toy, here's a quick summary of an earlier post. The Toronto Star ran a glowing review of the Prius featuring some nice quotes.
  • That it manages to be more economical than most cars could simply be seen as icing on the cake, rather than its major selling point.
  • ...a really clever little car, and one you can derive a lot of joy from driving...
  • Thanks to the hatchback design, this hybrid is also more versatile than your average sedan...
  • And the ergonomics are at once very clever and refreshingly simple
  • ...the experience is totally Jetsons...
  • ...very few cars on the road are quite as neat to drive as the Prius
  • Indeed, in a lot of ways, even if you took the hybrid drivetrain out, it would still be a pretty innovative vehicle, with its distinctive aerodynamic styling, impressively roomy packaging, a versatile, nicely finished interior and some interesting ergonomic touches.
So, the Star liked the car. Better still is that Consumer Reports found that owning and operating a Prius is hundreds of dollars cheaper than a Corolla, which, while a competent car, is noticably inferior to the rightfully touted Prius.

Sunday, March 12, 2006

 

Don't Take Their Word for It

A chap recently put to test Chase Bank's claim that "If you receive financial solicitations that you’re not interested in, tear them up before throwing them away, so thieves can’t use them to assume your identity." After receiving a credit card offer from that bank, he tore up the application, taped it back together, filled it out with a new address and phone number, as any good identity theif would, and sent it off. A few weeks later, his alternate persona recieved a shiny new $5,000 credit limit.

Maybe I should buy a shredder.


Tuesday, March 07, 2006

 

Putting the 'Lows' in Fellowship

I don't think I can explain on how many levels I think a drive in church is wrong.

Monday, March 06, 2006

 

And Now for Something Completely Different

I don't often say nice things about the President's policies. However, I think his recently proposed line-item veto is a good idea. While the tool could be used for political reasons, such as only canceling appropriations to the district represented by an opposing congressman, hopefully it can also be used to allow the President to demonstrate fiscal conservatism to which he purportedly adheres, canceling undue budgetary earmarks as did the previous President until the proposal's predecessor was purloined by the Supreme Court.

Tuesday, February 28, 2006

 

Inscrutable Skiing Scruples

You may have noticed that the USA's alpine skiers didn't do so well in the recent Olympics. I've got a theory about that. A fair portion, nay a majority, of the worthwhile skiing areas in the States is not coastal, but significantly inland, sheltered behind coastal ranges. Consequently, they receive lighter, drier snow, not Cascade Concrete or the Atlantic equivalent. Kids who grow up skiing at these areas live for powder days, as evidenced by the local paper reporting that nearly 1 in 6 students were absent from the local high school following "the storm of the year." Their health was reportedly "going downhill." Contrast this ethic with the inscrutable scruples of ski racing where
Course workers pulled an all-nighter to prepare the Giant Slalom course for yesterday's race, trying to get rid of all the powder and scrape it down to that bulletproof ice that only a ski racer could love.
Not only are the majority of American ski areas blessed with conditions imperfect for ski racing, but also they are culturally skewed against conditions conducive for racing.

This page is powered by Blogger. Isn't yours?