Free Tech Support
For family and friends of mine who don’t work with computers, I often act as free tech support. To bring something a little different to this blog in 2009, there will be posts from time-to-time that share a question I’ve answered about technology for someone.
Free Test Data
If you find yourself in need of test data (and if you write software for a living, you’ve got that need pretty often), pay a visit to generatedata.com. You have your choice of five different result formats: HTML, Excel, CSV, XML, and SQL. If you’re using it for free, you’re limited to 200 rows of test data. Donate $20 or more and the limit increases to 5000 rows. If you don’t mind fiddling with PHP and MySQL, you can download the generator for free and set it up on your own server.
Another use for RSS feeds
Caphyon, the vendor of Advanced Installer, has a feed for updates of the software. A brief look at the feed shows a pretty regular schedule of updates. Each entry in the feed contains the release notes, with new features, enhancements, and bug fixes.
Quick thanks to my friend Dave, who sent me a tweet about this product. Now we’ll see how it stacks up against InstallShield.
Clever Twitter Client
Some googling for Mac OS X Twitter clients revealed this clever one. I wasn’t aware of Fluid, Hahlo, or site-specific browsers (SSBs) before checking out the little video.
Finally joined Twitter
Being part of The Borg Facebook wasn’t enough–I joined Twitter a couple of weeks ago. At least so far, it has succeeded in connecting me with the few friends of mine I haven’t found on Facebook yet. I don’t use it from my iPhone that much yet, but fring seems to be a good enough client.
Comparing XML Strings in Unit Tests
Comparing two XML strings is painful. So of course, my current project required me to come up with a way to do it in .NET. I could only use version 2.0 of the framework, and I didn’t want to add more dependencies to solution that already has plenty (which ruled out XML Diff and Patch). So far, I’ve come up with the following bit of code:
The validationXml contains a string representation of the XML being validated against. It also means I only have to create one instance of XmlDocument. After creating an XPathNavigator on the XmlDocument being compared, an XPathExpression for the subset of XmlDocument being validated, and an XPathIterator, it can be called.
The “params” keyword makes the last argument optional, so it can contain zero or more names of XML elements to ignore when deciding whether or not to call an Assert. I’m still figuring out how to optimize this, but I think it’s a good start.
Flu tracking, courtesy of Google
According to this story in the New York Times, Google can detect regional flu outbreaks up to 10 days ahead of the Centers for Disease Control and Prevention. Check out Google Flu Trends to see data for the U.S., and for individual states.
Converting File URIs to Paths
I spent most of this morning looking for a replacement to Application.ExecutablePath. The reason for this was because certain unit tests that depended on this code failed when a used any test runner other than the NUnit GUI. When using test runners like ReSharper and TestDriven.NET, Application.ExecutablePath returned the executable of the test runner, instead of the DLL being tested.
Assembly.GetExecutingAssembly().CodeBase returned a file URI with the DLL I wanted, but subsequent code which used the value threw an exception because it didn’t accept file URIs. This made it necessary to convert the file URI into a regular path. I haven’t found a .NET Framework method that does this yet, but the following code seems to do the trick:
private static string ConvertUriToPath(string fileName)
{
fileName = fileName.Replace("file:///", "");
fileName = fileName.Replace("/", "\");
return fileName;
}
It's morning again in America
The U.S. is certainly a different place today than it was yesterday. The commentary I’ve seen that sums up best just how different things are is this Tom Toles cartoon of Obama walking into the White House beneath these words:
We hold these truths to be self-evident, that all men are created equal.Yesterday, America proved that we really believe this.
Election Day
I got in line a little over 30 minutes after the polls opened. According to the poll worker who came out to see how everyone is doing, the line was out the door by 6 am (1 hour before the polls officially opened).
My first clue as to how long this would take was the amount of cars parked everywhere. Every spot that isn’t marked handicapped is full. Every curb is full. People are double-parked. The loading dock on the side of the school even has cars and SUVs in it.
Update: Around 90 minutes after I got in line, I finally got to vote. The line was still outside of the school when I left.
Mark Cuban, Keeping an Eye on the Bailout
If you’ve been listening to NPR’s Planet Money, you already know about BailoutSleuth.com. But in case you don’t, it’s a creation of Mark Cuban (owner of the Dallas Mavericks) to report on how the money allocated by the bailout bill is being used.
They’ve already discovered that we taxpayers won’t know how much the companies working on behalf of the Treasury Department are being paid because that information is redacted.
My Two Cents on Reinventing the Wheel
Yesterday, I came across a spirited defense of reinventing the wheel in a recent post from Jeff Atwood. Dare Obasanjo stands firmly in the “roll your own as last resort” camp. In this particular case, Atwood asserts the following:
[D]eeply understanding HTML sanitization is a critical part of my business.I'll take Atwood at his word on what's critical to his business (and what isn't), but it seems that there's a middle ground between his position and Obasanjo's. Particularly when there's an open source solution available (SgmlReader in this case, since it's written in C#), adopting and improving it has these benefits:
- Improved understanding of HTML sanitization for the adopter.
- Strengthening of the existing community.
My own experience with reinventing the wheel (in software development terms) has rarely, if ever, been positive. Therefore, I have a lot of sympathy for Obasanjo’s perspective. Because I’ve inherited a lot of software from predecessors at various employers, I’ve seen a lot of less-than-ideal (to put it kindly) custom implementations of validation, encryption, search and logging functionality.
There are probably plenty of reasons that development teams reinvent the wheel in these areas, but one highly likely (and unfortunate) reason seems to be insufficient awareness about the wide variety of high-quality open source solutions available for a variety of problems. I don’t know whether this is actually more true in internal IT shops than other environments or not, but it seems that way. Encryption and logging in particular are two areas where it seems like custom code would be a bad idea for virtually everyone (except those actually in the encryption and logging library businesses). With libraries like log4j, log4net, the Enterprise Library, and Bouncy Castle available, developers can spend their time focusing on what’s really important to their application. Code for authentication and authorization seems like one of those areas as well. It seems like there are a lot of solutions to this problem (like OpenID on the public web, and Active Directory in the enterprise) that time spent hand-rolling login/password anything is time not spent working in areas where more innovation is possible (and needed).
When I asked the question of “what should always be third-party” to Stack Overflow, I got some interesting answers. Most answers seemed to agree that encryption should be third-party, except in rare cases, but there was surprising little consensus beyond that. Beyond the scarce resources argument against custom logging (or other areas with widely available open source alternatives), there’s a diminishing returns argument as well. I’ve only used Log4Net and the logging in the Enterprise Library, but they’re really good frameworks. Even if I had the resources to implement custom logging well, the odds that the result would be a significant improvement over the existing third-party options are slim to none. I’d like to see the quality argument made more often in buy vs. build decisions.
Why Performance Reviews Don't Work
This morning, I came across this interesting post about why performance reviews don’t work. The alternative that stood out was weekly one-on-one meetings with direct reports. It’s a recommendation I first heard nearly two years ago on the Manager Tools podcast. I’ve managed employees in the past, and when I followed the advice about weekly one-on-one meetings, virtually every relationship improved. It is more meetings, but the results are worth it.
While I don’t have a manager title in my current job, I’m still in fairly regular touch with the employees I used to manage. Were it not for those regular meetings, I doubt I’d have the same relationship with my former co-workers that I do today.
More Financial Crisis Info
I heard about this site on the financial crisis during an episode of the Planet Money Podcast. They interviewed Simon Johnson (one of the co-founders) during “A Very Scary Cut–In The Interest Rate”. The Financial Crisis for Beginners may be the best place to start. Right near the top of that page, you’ll see links to both shows from This American Life I blogged about October 8 and May 28.
Understanding collateralized debt obligations
The best explanation of collateralized debt obligations (CDOs) I’ve heard so far comes from the latest episode of the Planet Money podcast. I was driving to work at the time, so I don’t have the exact time index of it, but I think it starts at the 16 minute mark. The whole episode is worth hearing too.
Wikipedia has something to say about CDOs too, but I prefer the Planet Money explanation because it does a great job of showing how just one CDO can connect widely disparate parts of the economy.
Bailout Price Tag Continues Rising
According to this story in the Wall Street Journal (it’s subscriber-only, sorry), AIG just got another $37.8 billion from the Federal Reserve. That puts the price tag for just bailing them out at $123 billion. This may be a sign that the $700 billion $850 billion may not be enough.
In other news, the national debt is now so high that the US debt clock has run out of digits. I don’t know if the figure includes the spending on wars in Iraq and Afghanistan.
More Financial Crisis Education
The reporters who did the Giant Pool of Money story have followed up with Another Frightening Show About the Economy. Like the first show, this one is well worth setting aside an hour to listen to–much more worthwhile than the same amount of time spent watching network or cable news on the same subject. The explanations of precisely what frightened the U.S. Treasury and the Federal Reserve into begging for new legislation are especially worthwhile.
Other worthwhile stories on this topic include:
- Was 'Adult Supervision' Needed On Wall Street?, from the Fresh Air podcast
- The Wall Street Bailout: A Conflict of Interest, also from Fresh Air
Planet Money Podcast
The “Giant Pool of Money” episode of This American Life I blogged about in May has apparently spun off an entirely new podcast called Planet Money. If that first story is any indication, the new podcast will definitely be worth listening to.
Grand Canyon, North Rim
After the Antelope Canyon tour, we pushed on to the north rim of the Grand Canyon. The north rim doesn’t get the kind of attention that the south rim does, but it was well worth the visit. The views from the overlooks we visited were amazing.
Antelope Canyon
This morning, we rode into Navajo Nation land to see Antelope Canyon. It’s one of a number of slot canyons in the area. Unlike other canyons, this one had very narrow openings at the top. This meant it was pretty dark (and cool, thankfully) even at midday.
Nate, our guide, grew up in the area and told us a lot about how the canyon formed (mostly water, a little wind). He also played some flute for us, and pointed out the best places to take photos from. Hopefully, my shots will turn out well.
One other interesting bit of trivia Nate shared was that Britney Spears shot a music video in the canyon.
