News for hackers. Stuff that matters.
Re:What If OpenDocument Used SQLite? by mschaef on Thursday November 02, 2017 @10:47AM (#15610858)
> Why do people believe that if something can be browsed with less/Notepad, it is somehow more "readable" than a binary representation? I've seen and worked with tons of XML, and most of it was utterly useless without accompanying documentation, just as a binary format would be.

Binary formats start out mostly unreadable by humans [1]. XML and other textual formats at least have the possibility of being made to where they can be read by laypersons.

1] I'll note that after enough immersion, I've seen people read binary core dumps, etc. but that takes much more time and practice than with XML.

Re:What If OpenDocument Used SQLite? by NMDaniel on Thursday November 02, 2017 @02:10PM (#15612754)
Some formats don't need to be read as plaintext by the average person.

Would the average person edit a .svg by hand? No, he'd use Adobe Illustrator or anything else.

Would he edit a .docx file by treating it as a zip archive and edit content.xml? No, he'd use MS Word/LibreOffice Writer...

Suppose Sqlite used XML/JSON instead of binary files, would you modify them with notepad? No, you'd probably use a SQLite browser software.(Or an application that is more tailored to the domain)

Re:What If OpenDocument Used SQLite? by mschaef on Thursday November 02, 2017 @03:28PM (#15613471)
> Some formats don't need to be read as plaintext by the average person.

Fair point, and in fact, I'd go further - most of the time most people, do not need to directly edit or view most files in most formats. Even if you took 'most' to mean 99% or higher, I'd be comfortable with that statement.

Where I differ is that I think the essence of the argument is really whether or not a binary file format offers enough value to be worth entirely eliminating the direct edit/view possibility for everybody all the time. Even if it's not a common case, it can be game-changingly useful when you need it.

Just to illustrate, you give three examples, and I have counter examples for each:

> Would the average person edit a .svg by hand? No, he'd use Adobe Illustrator or anything else.

I've modified bounding boxes by directly editing SVG, as well as read SVG directly to analyze some plots a library was generating for me.

> Would he edit a .docx file by treating it as a zip archive and edit content.xml? No, he'd use MS Word/LibreOffice Writer...

I've done this recently to extract out embedded documents on OSX (where the native versions of Office do not directly support this.)

> Suppose Sqlite used XML/JSON instead of binary files, would you modify them with notepad?

HSQLDB can use text based SQL scripts to store data, and I've modified and edited them directly for several reasons.