Thx. Let's start by making clear that I am very happy that the original coders started this great project
and all other coders after that spend time and energy on creating all the functionality that there is now. As said: happy and very thankful! I've been using it for years and years, and sailed half the world with it, (the other half will follow).
And I am perfectly aware of how such a coding project starts and what it leads to, if there are no guidelines or checks on that. I've analysed quite some of these codebases and OpenCPN ain't that special. Standards regarding maintainability on the other hand exist for over a decade already, and one doesn't have to be a professional to adhere to some basic guidelines.
But please, I do hope you're not referring to my question with 'berating'. I am trying to contribute to the code (first pull request is out), and I do notice that maintainability of the codebase is low. That is a fact, not an opinion. What I did was sharing the facts and the outcome of the measurements.
IMHO we could do ourselves a favour and define some coding guidelines, and get some appropriate tooling in place and make sure maintainability doesn't drop any further. I can see we tried to do some work
on quality, with Codacy. That particular tooling however, does not even (yet) calculate cyclomatic complexity. So, for true code quality measurements here it ain't useful (enough).
We can't just keep on glueing if-then-elses in modules that are way too long to test automatically already.... By continuing to do so, it will become harder and harder to maintain the code, and to get developers that are new to the codebase up to speed. That's a pity that hinders us all.
I am not a huge fan either of completely rewriting , and spending 30 - 50 person years on it. Taking measurements to prevent maintainability to drop maintainability any further would be very wise to do. By applying the boy-scout rule
(leave the campground better than you found it), we should b be able to gradually improve maintainability. That is, ... if we want that.
More than willing to discuss that any further and to contribute to that. Looking forward to more response.