Tuesday, July 01, 2008

.Net Web.config attributes case-sensitive

One little tidbit I learned this morning:
In the Web.config file for web applications the attribute values are case sensitive.
To aid remote debugging I turned "off" the friendly messages to get meaningful error messages from remote machines. I tried the following line, but it didn't work:

<customErrors mode="off"/>

It turns out the attribute values are case-sensitive. The line should be:

<customErrors mode="Off"/>

Saturday, June 28, 2008

Why the CAFE Fuel Standards Don't Matter Anymore

By Phi Guy, Flickr

The US government passed the "Energy Policy Conservation Act" in 1975 which mandated a Corporate Average Fuel Economy (CAFE) for all a car makers products. The intent was to raise the fuel efficiency of cars.
Many electrons have been spilled in the blogosphere about how to reduce our dependency on foreign oil. The Republicans typically say, "Let's drill off-shore and in that big cold state up North." The Democrats say, "Let's just raise the CAFE standards." The current energy bill proposes a target of 35 mpg by 2020.
Well, the CAFE standards don't matter anymore. Here's two reasons why:
1. With gasoline at $4.00 a gallon, SUV sales are tanking already - down 50% this year. It doesn't matter what the CAFE standards are, people are buying more fuel efficient cars. In the last year the fuel efficiency of US cars has gone from 20.2 mpg to 24.4 mpg.
2. The plugin electric cars are coming. By 2020 the concept of miles per gallon will be moot. We will have gone electric. The pace of battery technology is accelerating and will provide a huge economic advantage to electrical cars. With new Lithium-Ion batteries and EEStor's super-capacitor, the trend will be towards electric cars. Chevy's over-hyped Volt and the Japanese plugins will get here in 2010. They will probably have the bugs worked out of them and be practical by 2015. By 2020 most passenger cars will be electric, trucks may take another decade.
So congress should quit wasting time about whether the CAFE standards should be 35 or 37 mpg in 2020, it won't matter.
What's the mpg of an all electric plugin car anyway?

Wednesday, June 25, 2008

Where does the US get foreign oil?

chart
You may not know this but according to the US government figures we import more oil from our friends up north, Canada, than from any other country.
Some other tidbits of petroleum stats:
The United States produces 10% of the world’s oil and consumes 24%.
In 2006 the United States consumed 20.7 million barrels a day (MMdb) of crude oil and produced 5.1 MMdb of that leaving 13.7 MMdb to be imported.

Tuesday, June 24, 2008

Falling

planets in orbit NASA/JPL
As a programmer do you feel like you are falling behind in the current technology? If you don't, you aren't paying attention.
Isaac Newton came to the revelation that gravity held the heavenly bodies in orbit by theorizing a cannon ball being shot fast enough that it was always just falling over the horizon thereby putting it in orbit. That's what software development is today - we are always falling over a body of knowledge but never quite resting on it.

Creating software is changing rapidly:
  • new Agile techniques for organizing and managing projects
  • new Model-View-Controller frameworks for Java, C#, and python
  • new language features, especially C# 3.0 has some wonderful new toys
  • new rebirth of functional programming
  • new ActiveRecord type object-relational mapping tools
  • new AJAX toolkits
  • oh, yeah, that new handset stuff for the iPhone and Android.

How do you keep up? Here are a few thoughts:
  • Read technical blogs. My list is here.
  • Do code reviews or paired programming. At our company we do biweekly code reviews for 30 minutes. I've learned so much from seeing how my compatriots code. Do the new CodingDojo thing with friends.
  • Be involved with your local user groups. Austin is fortunate in having many fine groups such as a great Java User's Group, Dot Net User's Group and an Agile group. See a more complete listing at my del.icio.us austin+tech bookmarks.
  • Get together with friends from companies you used to work at and see what their company is doing. How do they do builds? Unit and integration testing? What are the problems they have?
  • Buy a domain name and play around.
  • Learn a new language every two years.
  • Read good classic books. Some of my favorites are here.

If you aren't learning everyday, you're falling behind.

Thursday, May 22, 2008

Public Domain Classical MP3s and Sheetmusic at www.musopen.com




I stumbled into a wonderful site, MusOpen.com, that is gathering recordings of classical music and associated sheet music to put in the public domain. What a great idea.
We can now have classy background music for those wacky YouTube videos we make.
An interesting twist on the site is that you can "bid" to have your favorite pieces performed by a professional musician. When enough bids have been collected, MusOpen hires the musicians and adds the music.
To speed up the process I would like to see is the ability for any assemble to upload their version of a classical piece. Any local high school or civic orchestra could upload their version. This would lead to a lot of mediocre music, but if we added voting, the cream would rise to the top. Check them out at MusOpen.com.

Monday, May 19, 2008

Austin Code Camp 2008

Austin Code Camp was very informative.
I went to the afternoon sessions (Swim meet in the morning).



Chad Myers led an interesting "Fishbowl" session on adapting TDD in your team.

Jimmy Bogard gave a good presentation on mocks and stubbing. I really liked the new testing syntax made possible by extension methods:

bool result = foo(a,b,c)
result.shouldBeTrue();

This seems more natural than using the "Assert.IsTrue(result);"


Ben Scheirman showed all the cool features of ReSharper that he uses. I liked one of his side comments about keyboard shortcuts: "If I'm using the mouse, I've failed."

Other miscellaneous items:

  • Recommended Books: Lean Thinking / The Machine That Changed the World / Toyota Way
  • Rhino Commons is a helper class for NHibernate
  • Demo tools: Jedi show keyboard strokes, Zoomit magnifies areas on screen
  • C# has new ReadOnlyCollection




Austin Code Camp was well attended. Join us next year.
(Going to the camp reminded me as software developers we have to be constantly learning - reminds me of the urban myth about sharks having to swim or they die.)

Friday, May 02, 2008

Scrap H-1B Visa Lottery - Use Ebay

163,000 applications were filed for 85,000 H-1B Visas. With our current lottery system for allocating the coveted visas, employers have a 50-50 chance of getting an employee into the country.
Many workers in the US don't like the system because many think the guest workers depress wages. Employers don't like it because they cannot be guaranteed the desperately needed talent for hot projects.
Here's an idea - let's put the visas up on Ebay. Employers can almost be guaranteed a visa is they really, really need someone. Downward pressure on wages would be slowed since the cost of the visas would be higher. The extra income to the US treasury could be put to some good use. It's a win-win-win situation.