4 ms·
I think the idea of humans sharing a language with computers is problematic at a fundamental level. (the whole $dataformat "easy to read for humans") It becom
by borplk 8y ago
I think the idea of humans sharing a language with computers is problematic at a fundamental level.
(the whole $dataformat "easy to read for humans")
It becomes a source of never ending lose-lose compromises where the more points you give to human convenience the more points you take away from machine convenience and vice versa.
Then you end up having to "settle" for something in between that is just ambiguous and problematic for machines to be able to deal with it and just noisy enough for humans to be able to cope looking at it and edit it. That's basically what JSON is.
If we accept to use a transformation step and better tooling we can free the representation from this tension of "friendly for computers vs friendly for humans".
It's also a bit odd that we apply this readability obsession only to these data formats.
I don't hear people wanting a human readable text representation of their audio, video or images.
- ajross 8y agoNothing in your argument seems relevant to whether your mythical format is "readable" or not. The industry has had extensive experience dealing with interchange of commonly-used binary formats (.xls comes to mind as one that still seems some use) and if anything that experience was even worse. You're just saying that if we stopped trying to adhere to "our" aesthetic and replaced it with "your" aesthetic when we created an all-new format, that it would be better. I think there's an XKCD to cite about that...
- borplk 8y agoYou have misunderstood the point I was trying to make. I'm saying the idea that we as humans should view/consume the exact same thing raw and byte-by-byte without any transformations in between as computers do creates a problematic trade-off because that representation now has two very different masters, humans and machines. If you want to make that representation pretty and friendly for humans it becomes hard to parse and consume for machines. If you try to make it friendly for machines it becomes inaccessible, noisy and annoying for humans. So you have to settle somewhere in between that is tolerable for both masters but not perfect for either one. With some exaggeration, it's as if we required the binary representation of an image to be "raw viewable/consumable" by humans in a text editor.
- ajross 8y agoNo, I'm pretty sure I took that point. It's just that... that isn't the problem. All formats get messy for the same reason that all software designs get messy. It's just that messy software is amenable to replacement, while messy formats leave their garbage in public to scream about on HN. And like I said, we've been where you want to be: .xls, in particular, is actually a very simple format at its core and easily inspectable with a hex dump or whatnot. Likewise Wordperfect's binary format back in the day was straightforward for humans to use, yet still binary. It didn't help. They still sucked. To wit: you can't solve this problem your way. All you'll do is create another messy format, c.f. XKCD 927.
- peoplewindow 8y agoYou're using a file format designed three decades ago to make arguments about what we should be doing today. XLS as a format sucks because: a) It was undocumented for most of its life b) Undocumented even inside Microsoft because it consisted partly of memory dumps from the app c) Was heavily optimised for fast loading and saving on very slow machines 100% of uses of JSON, translated to binary, would not suffer those issues. They'd have documented schemas, at least internally, they wouldn't be created by memcpy to disk, and they wouldn't be stuffed with app-specific loading optimisations.
- rainbowmverse 8y ago>> I don't hear people wanting a human readable text representation of their audio, video or images. This is, in fact, a huge concern for people who think about accessibility.
- bastawhiz 8y agoIndeed! Facebook spends a ridiculous amount of resources creating text summaries of what's in user-provided images. Check out the alt="" tags next time you're scrolling through your feed. Every single image has one.
- saagarjha 8y agoOf course, their methodology for doing so is nonstandard, since there are obvious incentives for Facebook to use it and keep it to themselves. Unfortunately this keeps these transformations out of reach for most applications.
- delecti 8y agoI just checked what you're talking about. Creepiness aside, that's kinda awesome.
- kalleboo 8y agoiOS also does the same thing - if you turn on VoiceOver and go into your photo library it will read out what's in the photos
- borplk 8y agoOk but what I'm talking about is a little more specific. Talking about "human readability" of JSON and XML is a little bit like talking about human readability of JPEG or MP3. Chasing after it creates a lot of problems. Formats like JSON and XML often carry lots of textual information so it's tempting to want them to be like "just like text but with some extra stuff" but that creates its own problems. So it would be interesting to have something like JSON but philosophically treat it like MP3. Meaning, don't assume that humans must fiddle with the bytes in a text editor with great ease so that the representation can be designed without the influence of "would the raw bytes look pretty to people?".
- __david__ 8y agoYou mean like XBM, XPM, SVG, and EPS?
- amyjess 8y agoI remember being horrified to discover that XPM is actually a form of C. That just screams injection risk.
- nuclx 8y agoI would argue, that YAML (which actually is a superset of JSON) comes closer to JSON in being friendly for humans.