by msk20 · 4y ago · 0 comments
I have 100% confidence they exist. They just don't get uploaded to Github out of shame or embarrasment.
Not only they exist, they power massive machines that could crush a person in the blink of an eye.
You can definitely see many famous projects on GitHub, where even though the code is logical, you can't help feel it's a bit all over the place.
cpython isn't all sun and roses.
A broad generalization, but with C and C++ I'd say the standards for "good code" have dramatically risen in the last 10 years.
Variable names seem to have doubled in size.
libssl/openssl (before the rewrite/fixes especially)? Maybe doesn't qualify as huge?
See eg: https://www.youtube.com/watch?v=GnBbhXBDmwU "LibreSSL with Bob Beck" (the first 30 days)
What does number of lines have to do with anything?
https://github.com/torvalds/linux/blob/master/kernel/sched/c...
The statistics for the 6071 .c files in the FreeBSD kernel are somewhat higher -- median is 460 lines; 90th percentile is 2070 lines; 99th percentile is 7678 lines -- but your example of a 11133 line file is definitely at the extreme high end.
As an example, making several related changes in very different parts of a file, where you need to cross-reference between them. The changes themselves might be small, but it’s a huge cognitive burden to alternate/iterate through them. I’d love to have a view which temporarily projects those targets as if they’re isolated files without changing the actual structure on disk. I’d love it so much I actually do this manually for a lot of tasks, creating temp files to prepare edits for related areas of code. But then I lose a lot of the benefits of tools which understand what’s being referenced. It would be great to just type a quick command (or click or whatever) to say “don’t refactor this function to another file, but let’s pretend you did, for a while”.
This is exactly how vim buffers work (for instance in a split) work.