Hacker News new | ask | show | jobs
by jfkebwjsbx 2273 days ago
At 20 words per line, that is 20k lines... why are you editing everything in a single file?
1 comments

Edited with the corrected math. It's ~3.5k lines, ~70k words, ~400k characters.

Still, why wouldn't I want to edit it as a single file?

> why wouldn't I want to edit it as a single file?

> ...without slowing down to a crawl (i.e. a 5-10 second lag between a keypress and a change)?

I think you answered your own question. :P

Also, you can edit chapter 53 without having to scroll down to line 130,465. Basically, the same reasons bills are split up

> I think you answered your own question. :P

I disagree! We're having the following conversation:

Me: "I want to edit this as a single file, but I can't, because it's slow due to inefficient data structures"

You: "Why would you want to edit it as a single file?"

Me: "Why wouldn't I?"

You: "Because it's slow due to inefficient data structures!"

My point is, I want to edit it as a single text file for creative / process reasons, and there are algorithms and data structures that make this possible, as evidenced by the editors that do let me do it in real time, so there's no real reason not to.

When doing largescale editing changes, I much prefer the single file approach.

Things like:

+ Changing the age of a character

+ Changing the argument order for a particular function

Those aren't simple find/replace solutions that you can run across files.

You can do the same thing with multiple files, but it's slower and can be harder to hold a context in your head.