News for hackers. Stuff that matters.
Re:Important PostgreSQL 14 update to avoid silent corruption... by jvolkman on Thursday June 09, 2022 @08:22PM (#31688592)
I get the impression that long files are culturally acceptable in systems-level C code. E.g., just a cherry-picked file from Linux: kernel/sched/core.c is over 11k lines.

https://github.com/torvalds/linux/blob/master/kernel/sched/c...

Re:Important PostgreSQL 14 update to avoid silent corruption... by bombcar on Thursday June 09, 2022 @08:36PM (#31688672)
I feel the long file issue is mostly gone - that the problem isn’t the file length but spaghetti code. If it makes sense to be in one file it should be in one file. Breaking it up simply to reduce file length is counter productive.
Re:Important PostgreSQL 14 update to avoid silent corruption... by cperciva on Friday June 10, 2022 @02:29AM (#31690754)
There are 18609 .c files in my checked-out copy of the FreeBSD src tree. The median length is 258 lines; 90% are 1373 lines or shorter; 99% are 5241 lines or shorter.

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.

Re:Important PostgreSQL 14 update to avoid silent corruption... by jvolkman on Friday June 10, 2022 @12:56PM (#31696666)
I didn't run any stats when I found that file. Just clicked around in github a handful of times looking for something that seemed like it'd be complex.
Re:Important PostgreSQL 14 update to avoid silent corruption... by cozzyd on Thursday June 09, 2022 @11:16PM (#31689578)
yes are people using editors that don't let them have multiple views of the same file or something?
Re:Important PostgreSQL 14 update to avoid silent corruption... by colordrops on Friday June 10, 2022 @12:16AM (#31689971)
A filepath is an index and a hiearchy that adds information and structure. It can't be completely replaced by editor affordances.
Re:Important PostgreSQL 14 update to avoid silent corruption... by carlhjerpe on Friday June 10, 2022 @07:24AM (#31692545)
Depends on the language. C# somewhat replaces paths with namespaces, then you navigate classes and methods with editor tooling. I remember back when I was on Visual Studio writing C++ that they did something similar.