September 13, 2006
@ 04:51 AM

I had to read this post by Secret Geek about a cool library called "File Helpers" - the title itself hits a sore point for me. I am guilty of rolling my own CSV Parser. I waffle between, "I should just use the Jet Text Driver - they worked through all the CSV issues long ago", and "Gee...the JET text driver doesn't even do [insert some special edge case] right? Well, I guess I'm not using that!"

The JET CSV driver shows it's age in other ways too. I can't imagine it will be supported much longer. Why doesn't .NET have better CSV support built in? It's disturbing the number of times I've had to deal with CSV files since moving to .NET. I'm getting creeped out just thinking about it.

The last time I had to deal with CSV files (2 months ago), I found a really nice regular expression that looked pretty bulletproof. I wrote about 40 or 50 unit tests for all the edge cases I could think of in about 2 hours, and felt pretty good about it.

Too bad I didn't know about File Helpers before. I now feel the urge to go and change a whole bunch of code. Thanks, secretGeek!

Source: Stop Rolling Your Own CSV Parser!
Originally published on Wed, 13 Sep 2006 01:16:35 GMT