3 ms·
This post, on a different subject, captures my feelings: https://news.ycombinator.com/item?id=13260082 https://news.ycombinator.com/item?id=13260082 > I hones
by emodendroket 9y ago
This post, on a different subject, captures my feelings:
https://news.ycombinator.com/item?id=13260082 https://news.ycombinator.com/item?id=13260082
> I honestly think this genre is horrible and counterproductive, even though the writer's intentions are good. It gives no examples, no explanations, no guidelines for proper implementations - just a list of condescending gotchas, showing off the superior intellect and perception of the author.
Like, OK, I shouldn't use sep. Good to know. What should I use instead? Why tell people that \ isn't the escape delimiter without explaining the way the quoting system works?
And frankly, the stuff about Excel is divorced from reality. More than 90% of the time, the reason you're making a CSV is because somebody wants to look at the data in Excel and you don't want to deal with xlsx. If your concern is something else CSV is probably the wrong choice. Thus, for most programmers, Excel is the reference implementation of CSV.
- megaman22 9y agoIf only creating xlsx files programmatically wasn't such a clusterfuck
- emodendroket 9y agoHey, man, it's just XML.
- tomp 9y agoI think an `.csv` is very useful for any kind of one- or two-dimensional numerical data, and even a lot of non-numerical data. It's very simple, human-readable. E.g. if you have an API, a `.csv` backend in addition to other (e.g. `.json` or `.mat` or similar) makes it much easier for a human to inspect the data.
- emodendroket 9y agoAh, but this very article informs us that the idea that CSVs are necessarily human-readable is a falsehood programmers believe. Besides that, anybody who is troubled by working with something like JSON is not going to look at raw CSV. They're going to use Excel.
- ubermonkey 9y agoI think there's more going on than condescending gotchas here. I see the whole genre as fairly tongue-in-cheek enumerations of pitfalls that, all too often, are baked into projects as unexamined assumptions. When we read them, we have the opportunity to check our own assumptions -- about the subject at hand (today, CSVs) and also (hopefully!) about other subjects we may encounter later.
- emodendroket 9y agoI just don't know what thought process I'm supposed to go through when someone tells me writing `sep=,` in a CSV is horrible but doesn't offer any alternative way of fixing the problem that solves.
- ubermonkey 9y agoMaybe the title scheme is throwing you off. I read these as "a list of things people have assumed about X that, on the surface, seem true but absolutely won't be 100% of the time." IOW, examine your assumptions, and protect yourself from your unexamined biases and assumptions. No?
- emodendroket 9y agoAt best, I'm now aware that there's some situation where I should avoid it, but I have no idea why, what the situation is, or what options I have.
- ryandrake 9y agoI like this genre because many developers (and non-developers who are imagining features) tend to trivialize things that are inherently complex. “Just add N seconds and you’ll have the target date!” “Just parse the user’s address and return the street name” “Just add a radio button for the user’s gender!” Resulting in underestimates and blown schedules, database designs that are not future proof, and at the end of the day demonstrably wrong software. Sure, good examples of how to handle each edge case would be ideal, but merely pointing out all the bad assumptions to someone is a valuable first step.