Live data from Hacker News

Write plain text files

sive.rs

341–350 of 425 posts

Re: Write plain text files

#341
post #35

Another advantage to plain text files: source control. You can check your writing into git and get a history of all your edits. It’s something programmers take for granted, but it would be amazing if this got more widely adopted outside of tech. The number of files with names like “Report Final Final draft v3.docx” is truly staggering. “Git for everything“ would be a multi-billion dollar startup easily.

Yup, that's basically the same argument I'm making with this diagram -- with text, you can get useful operations "for free"

http://www.oilshell.org/blog/2022/02/diagrams.html#text-narr...

https://news.ycombinator.com/item?id=30483914

It's generally not something you want to reimplement ...

Re: Write plain text files

#342
post #274

Earlier quoted context omitted.

So when you need to remember a user/password combo for a new device, offline doorbell maybe, or a parcel number, or the address of a friend, then you record a 4K video instead of writing it in a text file? Plain text just works, everywhere, all the time.

> Plain text just works, everywhere, all the time. No it doesn't. Try a plain text description of an electronic circuit vs a circuit diagram. Try a a plain text instruction sheet vs an illustrated one. Try plain text sheet music vs actual sheet music. Try a mathematical plot vs plain text tables. Try concept drawings of product vs text descriptions. Try construction drawing vs plain text descriptions. I could go on a…

Plain text can be used to generate those. Anything other than plain text is merely a visualization.

Re: Write plain text files

#343
I came to this realization a few months ago as well. I had been using one note to keep notes and it got glitchy between devices, causing things to not appear. I’ve had multiple random losses of data like that.

Word documents and other special formats always break in different versions or operating systems. Or they get corrupted. Or they can’t do some basic feature like side by side comparison.

Apples note app deleted all my notes a couple years ago on some version update. It was apparently hidden somewhere in the terms of service. It’s impossible to get those back or rollback. Everyone on the internet says it’s my end user fault for not reading the apple TOS standard popup before pressing the default ok button one time.

There’s just an endless amount of problems. I put everything in text files in a set of folders now to sort it instead of tags that break, and nothing gets corrupted or loss. It also of course just syncs to google drive for version and backup.

Re: Write plain text files

#344
post #336

Earlier quoted context omitted.

I once thought git for humans would be a great idea but never got around to speccing it out. Later on, a lawyer friend showed me the software they used 'for backup' (that they paid thousands per month for) and it turned out everything about it was just exactly like SVN. The terminology was different, the UX was laser focused to the intended users, but at the end of the day it was commits, syncs, merging, pretty much…

I had a similar thought some time ago and concluded it's an impossible task. The problem is that it would need to understand every file format its users care about and be able to represent changes in a useful way. How do you merge destructive edits to image files?

LOL,sweet summer child, its all 0's and 1's

Re: Write plain text files

#345

Earlier quoted context omitted.

One of the big things I love about Dropbox is automatic version control of the file. Google docs has a similar feature built in too I think.

I switched from dropbox to mega years ago when the former removed Linux support. TIL mega have version support so I need to enable that and try it out. First thing I do on a new device is setup my mega shared drives - and there is a lot of plaintext files there!

Dropbox never removed linux-support at all, or sync specifically. They removed support for some esoteric filesystems which lacked certain features. For most people dropbox on linux did not stopped working.

Re: Write plain text files

#346
post #257
post #256

Earlier quoted context omitted.

I suppose the question is where you want the sorted version to appear. In the output of `ls`? You could write a wrapper to `ls`, maybe?

In the system's file explorer (Finder/Windows File Explorer). This would give me a visual outline and the ability to open any file with its corresponding app. Imagine writing a book and using folders as chapters. You could then write individual pages with different apps, say some plain text, some Word documents, a few spreadsheets, images, videos, etc.

Would it be better to have something like a plain text page to hold the outline, with links to individual files?

Re: Write plain text files

#347
post #340

Use Markdown. There are zero disadvantages when compared to pure text files as it's plain text but with syntax and extra features on some text editors. The main advantages of writing plain text files: - source control - view/edit anywhere - doesn't get deprecated (Lindy effect) - easy to share - small size There's no reason to use suites like MS Office and Google Drive unless your team is routinely using it or you ne…

One issue with Markdown is that there's many flavors with subtle differences in parsing/interpretation. If you're looking to be able to parse the file in the future, you have to be careful to pick a flavor with wide support or to stick to the most common features of Markdown.

Github Flavored Markdown (GFM) is almost a de facto standard nowadays.

Re: Write plain text files

#348
post #63

Earlier quoted context omitted.

> The number of files with names like “Report Final Final draft v3.docx” is truly staggering. iirc this was the original pitch for Dropbox > “Git for everything“ would be a multi-billion dollar startup easily. Dropbox is valued at 8.5 billion

The original pitch was "throw away your usb drive", I don't think file history came about until after 2010, but I'm not too sure and modern Google makes it impossible to find anything older than 2 years ago... https://news.ycombinator.com/item?id=8863

It's not that hard to search for old content on google. Just limit the year in the search filter. Anyway, I found mentions of this feature up to 2008 back. I guess it was there since mostly the beginning.

From Sep 15, 2008: https://www.maketecheasier.com/dropbox-backs-up-and-syncs-fi...

Re: Write plain text files

#349

I sometimes have to write things down in French. ascii is kind of clumsy for things like non breaking spaces. Anyone has a suggestion for this?

UTF-8, which I think a lot of developers considers "plain text" now a days. Out of pure curiosity: Why do you need non-breaking spaces? I don't think I've ever used one, and now I'm wondering if I am missing out :)

In French, there are various conventions around quotation marks ("guillemets") that may involve inserting non-breaking spaces (ideally, a NARROW NO-BREAK SPACE), depending on your workflow.

Re: Write plain text files

#350
post #35

Another advantage to plain text files: source control. You can check your writing into git and get a history of all your edits. It’s something programmers take for granted, but it would be amazing if this got more widely adopted outside of tech. The number of files with names like “Report Final Final draft v3.docx” is truly staggering. “Git for everything“ would be a multi-billion dollar startup easily.

The idea is pleasing, but when you specifically look at Git, its UX is rather disappointing. I'm not even talking about the CLI (after a while you can get used to it). I'm talking about resolving conflicts. If I have a sequence of changes A -> B -> C, then I change A and rebase B on top of A resolving any conflicts, then rebasing C on top of B will most of the time mean that Git will most likely ask me to resolve the…

The biggest UX sin of Git is that rebasing is featured so prominently. If you had just done a normal merge commit then Git could have realized the common history, done a three-way merge, and resolved the conflict automatically.

But no, people always seem to insist on that linear history is the only concern that matters, explicitly delete the history, and then wonder why Git is so annoying and easy to screw up.

Maybe Git should have locked rebase behind a feature flag of some kind. `git pull --rebase` should certainly never have been added.

Post reply on HN