Re:Things I Learned from a Job Hunt for a Senior Engineering...
by cableshaft on Tuesday April 24, 2018 @06:31PM
(#16917229)
I recently couldn't use a built-in CSV parser and had to roll my own because one of our clients couldn't be arsed to send us consistently formatted CSV files so we had to include a bunch of edge cases in there to still correctly format the damn things. (sometimes pipe-delimited, other times comma delimited, sometimes fields surrounded by quotes, other times no quotes except one column (that has a LASTNAME, FIRSTNAME" in it), yet still other times has quotes in the data itself, fields usually have no commas, but sometimes this one field will have it in the middle of it, typos in header names, not including the end of file checksum that others include, etc). The built-in CSV reader you had to specify if the fields had surrounding quotes or not for the entire document, it didn't detect it on its own, for example.
And that was when I found out parsing something that should be as stupid simple as CSV file can actually be pretty complicated.
And that was when I found out parsing something that should be as stupid simple as CSV file can actually be pretty complicated.