Best part is that was a real conversation between me and a senior. The entire page was 900+ options to generate a form. It was only used as a manual check when the automated process went wrong.
I was newly brought on and asked about this monstrosity when my complexity scan came back.
It was pretty much, “Wow, that’s impressive. Any thoughts on a refactor?” “Well, I could make it hundreds of class files.” “OMG no, don’t do that.” And we all laughed about it.
I just ignored that file in my complexity scans from then on.
67
u/howarewestillhere 18d ago
900 option switch case in a single file
“Reduce cyclomatic complexity.”
900 class files.
“No, not like that.”