Re:Attitudes That Lead to Maintainable Code
by brians on Wednesday March 08, 2017 @11:32AM
(#13821323)
What does maintainable mean? I propose a definition: we can add features at a constant rate, but the rate of bugs per line of code drops off over time. Linux certainly doesn't meet that threshold: the rate of bad bugs is pretty constant. If we decompose it, we'll see a safe maintainable section with a monadic use of goto, and a less safe section that doesn't.
NASA's projects that do hit this standard tend to be written in CL with macros that do this.
I haven't read redis; anyone else?
Re:Attitudes That Lead to Maintainable Code
by taeric on Wednesday March 08, 2017 @11:48AM
(#13821443)
Any definition of maintainable that rules out the linux kernel, is... questionable. At best.
The sheer number of committers guarantees bugs. That is not a remarkable feature. The remarkable number of committers is.
Re:Attitudes That Lead to Maintainable Code
by emcq on Wednesday March 08, 2017 @12:01PM
(#13821546)
Thats an interesting model, but I cant think of many projects where the features are added at a constant rate. The deluge of pull requests going to Linux are not constant, and probably grows with the number of contributors perhaps relative to population growth of programmers (also not constant).
Perhaps another metric is how long after your code is released will you be able to support it? In which case Linux and NASA do quite well.
Re:Attitudes That Lead to Maintainable Code
by AstralStorm on Thursday March 09, 2017 @07:37AM
(#13828827)
Linux kernel is the opposite of boring old C, as in procedural code. It is nicely factored object-oriented C in most of the important places.
Re:Attitudes That Lead to Maintainable Code
by vkjv on Wednesday March 08, 2017 @11:31AM
(#13821318)
If you replace, "maintainable" with "easily maintained by a large group of people" the statement holds true.
Re:Attitudes That Lead to Maintainable Code
by emcq on Wednesday March 08, 2017 @11:57AM
(#13821514)
Can you give an example of a project maintained by a large group of people written with monads?
The only one that comes to mind is Spark, and while I haven't used it recently, was nightmarishly buggy with many subtle corner cases :/
Even jumping outside of C, Atom, Eclipse, Chrome, FireFox all are maintained by large groups of people and dont have a single monad!
Take the Linux kernel, NASA rovers, or redis - all written in boring old C with no monads and great results.