Many of you who have used the latest release candidate, 1.18.4(0) have probably noticed that the tooltip popup on the map that shows you the number of people in a sim/region.. well, doesn't actually show you the number. Instead it relentlessly reports zero for every sim except the one you are in, where it reports one (that's you).
How did this happen? Well, when you modify or refactor code, there's two important requirements. First, you have to know how to code. Second, you have to understand what is going on. Lacking the first is less dangerous. You can go safely stick pencils up your nose. Lacking the second, however, means you risk sticking pencils up everyone else's nose. This bug was relatively harmless, if irritating.
Jacek Antonelli, who heroically dived in and fixed this bug up for me said that one of the causes was, "editing the code without understanding everything it does."
"It looks like they refactored the rendering code into its own function (good for them), but missed this crazy side-effect that was going on."
That side effect was, basically, that as it looped through each agent to draw them, it also incremented a counter, amassing a running total of agents in the sim. At the end of processing that sim, the resulting was stored.
In 1.18.4(0), the dot-rendering process in the loop was pulled into it's own function, and the running total was simply left at zero. Worse, when that zero is stored - it actually overwrites an existing correct number that is calculated elsewhere, presumably after this piece of code was originally written. So doing the counting and storing the result is just plain unnecessary.
Someone may have half figured that out that that counting everything up again was a waste of time and precious CPU cycles - the counting was removed - but apparently forgot to also remove the code that stored the running total, allowing it to essentially overwrite good data with bad.
All of this seems to result from a lack of knowledge of what each section of the code is responsible for, and how it (and it's intentional side-effects) mesh with other sections.
Some number of errors are, of course, inevitable. However without a map, how can you not get lost?