3 ms·
For almost all uses, CSV is the wrong format for the job. Protobufs are usually almost a drop in replacement, and when you have them, you no longer have to wor
by londons_explore 9y ago
For almost all uses, CSV is the wrong format for the job.
Protobufs are usually almost a drop in replacement, and when you have them, you no longer have to worry about escaping, newline characters, adding columns, data types, nulls, or any of the other painful corner cases of csv's.
Some might say "but you can't open them in a text editor", but to those people I give this link: https://stackoverflow.com/questions/34952811 https://stackoverflow.com/questions/34952811
- jimktrains2 9y ago> Protobufs are usually almost a drop in replacement [for csv] I'm sorry, what? In what way is it a drop in replacement? Csvs are editable in a text editor and natively imported and exported by a wide variety of tools.
- Radim 9y agoCurious: How many levels of indirection from end users do you need to be, in order to consider installing an arcane linux tool and then launching `protoc --decode_raw < message.bin` from the command line an acceptable drop-in replacement for CSVs? I'll take the generous interpretation and assume OP meant some very specific developer use-cases :)
- jimktrains2 9y agoGgp said usually. Usually I would not expect users to have protocol installed. I'd wager that even most developers don't. Also, as an aside, sqlite would probably be a better container format for data, and one that would be easier to integrate into other applications.
- eXpl0it3r 9y agoThe reason CSV files are used everywhere is not because of lack of alternatives, but because business people understand what CSV files are and feel safe using them, plus you're not relying on any technology or more complex protocol, it's really just the "natural form" to handle table data. If you can successfully convince the business to first always use some command line tool to convert data before they can look at it in Excel, then you're in a very lucky position.
- dspillett 9y ago> business people understand what CSV files are I would very much argue against that supposition! In fact I think it should be the top item of a list of "falsehood users believe about CSV files"! I've had people submit an Excel file to a service expecting a CSV, and when being told to convert to CSV instead do so by just renaming the file... > feel safe using them This much is true, for certain definitions of "feel safe". > plus you're not relying on any technology or more complex protocol This is the key point: they usually have and regularly use software that can handle CSV files (however badly), usually Excel, so don't need to learn a new tool from scratch or, in controlled corporate environments, spend six months filing paperwork and chasing requests to get IT to install an appropriate version of a relevant tool to handle the format.
- Something1234 9y agoThat's crazy protobuf are a massive pain. I was doing a ctf recently using protobuf and it was incredibly anonying decoding or reversing it. You lose the schema you're shit out of luck.
- rootlocus 9y ago> Some might say "but you can't open them in a text editor", but to those people I give this link: https://stackoverflow.com/questions/34952811 https://stackoverflow.com/questions/34952811 That's read only, and only works if you have the proto declaration. Very different from being editable in a text file editor.