3 ms·
I worked at a large ecommerce company on their Android app. I was tasked with using the Sonar tool to analyze the source code of their app. A bad cyclomatic com
by xrd 5y ago
I worked at a large ecommerce company on their Android app. I was tasked with using the Sonar tool to analyze the source code of their app. A bad cyclomatic complexity is 30, at which point it is difficult for an experienced engineer to follow the code paths.
There was a file in that source that had over 900 cyclomatic complexity.
The reason was that at that point Android had a limit on their method count. Called the dex limit. You could only have 64k methods, before multidex was introduced.
The engineers couldn't add more methods, so they had to jam code into existing methods. No DRY. No refactoring.
It was fucking impossible to understand at the code level. You had to just use the app for years to understand it.
That analysis got a bunch of us targeted by the senior developers because it made them look bad. They fired multiple people, including me, who pointed this out. We said it made it impossible for new engineers on the project to succeed, and the incumbents didn't want that to be known, less they lose their bonuses.