From: James Edward Gray II Date: 2006-12-01T04:49:02+09:00 Subject: Re: Splitting a CSV file into 40,000 line chunks On Nov 30, 2006, at 12:36 PM, Paul Lutus wrote: > Your own code ... er, excuse me, your own library ... will meet your > requirements exactly, it won't cover cases that are not relevant to > the > problem at hand, it will be much faster overall than existing > solutions, > and you will learn things about Ruby that you would not if you used > someone > else's library. Now you're guilty of a new sin: encouraging people to reinvent the wheel. You just can't win, can you? ;) Different problems require different levels of paranoia. Sometimes a little code will get you over the hump, but you may be making some trade-offs when you don't use a robust library. Sometimes those are even good trade-offs, like sacrificing edge case handling to gain some speed. Sometimes it's even part of the goal to avoid the library, like when I built FasterCSV to address some needs CSV wasn't meeting. As soon as things start getting serious though, *I* usually feel safer reaching for the library. The people reading this list have seen us debate the issue now and be able to make well informed decisions about what they think is best. > On the other hand, if your data does not exploit this CSV trait (few > real-world CSV databases embed linefeeds)... Really? How do they handle data with newlines in it? Which "CSV databases" are you referring to here? James Edward Gray II