4 ms·
More developers tends to make duplicated code more likely, not less, as people tend to work on percentage wise smaller subsets of the whole and fewer developers
by vidarh 3y ago
More developers tends to make duplicated code more likely, not less, as people tend to work on percentage wise smaller subsets of the whole and fewer developers will have a semblance of an overview of the whole. Sometimes also even makes duplication sensible for a while if it allows shortcircuiting communications paths.
The vast majority of kernel code is drivers. That's another reason why the Linux kernel code would be far bigger even if optimal. But it's also why it won't be optimal - the effort to figure out all the shared elements of every device out there is 1) not worth it, 2) going to take someone a lot of time to actually figure out commonalities that may not always be obvious.
I've worked on a driver for the Linux kernel. We didn't even start to look at deduping it because the hardware in question would only ever have our device, and nobody else would have our device. But would there be duplication? Sure. The chip we used was common. For others it might be worth figuring out commonalities with other devices and eventually pare down the code. Or not.