[josm-dev] Spaghetti code
frederik at remote.org
Wed Feb 4 23:22:55 GMT 2009
Igor Shubovych wrote:
> I really do not want to abuse anybody, but ... this is spaghetti code.
We don't have GOTOs though.
I suggest you read, and try to understand, the discussion that begins
with this message:
The essence of that is:
1. JOSM is not a classic, by-the-book Java application;
2. We're happy to improve JOSM but we try not to raise the bar too high
for newcomers without Java experience;
3. If you want clean design, contribute to JOSM-NG instead.
You are preaching basic OO design rules to us; there's no need to, we
know them. We are disregarding them on purpose, which has a price (your
slightly overexaggerated "55 places to edit", which by the way modern
UIs will often do for you) and also has a benefit (simplicity, and no
need to bloat the code with hundreds of accessors).
JOSM differs from what you have learned or read about OO design not
because its makers were stupid BASIC programmers but because its makers
made a conscious decision to do things differently.
That being said, there are definitely cases where JOSM would benefit
from using a classic OO approach, like the bit about the status message
you quoted. We're very open to changing these things on a case-by-case
basis; we just don't want wholesale refactoring "just because this is
how OO is taught at school".
If you're willing to work with JOSM as it is today, slowly improving it
where there is a need, then you're welcome to help. If you think JOSM is
a pile of crap that needs to be rewritten completely because its
programmers are obviously idiots, then you are definitely not alone, but
there will be little you can do to help JOSM; you might think about
helping the JOSM-NG effort which is like JOSM, but leaner, meaner,
faster, and with a clean architecture. It doesn't have the rich feature
set yet but if enough people make the switch, it will.
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the josm-dev