3 ms·
Don't forget the most important step. "Think of the acronym CSV. Don't look up the definition of the format, just meditate on the idea of the format for a bit
by saalweachter 7y ago
Don't forget the most important step.
"Think of the acronym CSV. Don't look up the definition of the format, just meditate on the idea of the format for a bit. Then write your data in the format you have just imagined is CSV, making whatever choices you feel personally best or most elegant regarding character escapes. Pass this file on to your downstream readers, assuring them it is a CSV file, without elaborating on how you have redefined that."
- remus 7y ago"Comma separated values? But my data has commas in it! Ah, I know, I'll use tabs instead, I've never seen a user put a tab so that'll work perfectly forever and definitely won't cause a huge fucking mess for the poor bastard who has to try and decipher this steaming pile."
- adrianN 7y agoJust use ASCII 1E and 1F.
- wanderer2323 7y agoThis is awesome, where does it come from? Google does not give me anything.
- deleted 7y ago[deleted]
- saalweachter 7y agoThe quotation marks are stylistic rather than for attribution. My personal experience comes from ingesting product feeds from online stores. Misapplication of \ from other encodings was the most common sin, but I'm pretty sure I saw about three dozen others, from double-comma to null-terminated strings to re-encoding offending characters as hex escapes. (And, of course, TSV files called CSV files, with the same suite of problems.)
- SSLy 7y ago(Source: I work in a software company) On-hand work experience.