iSwimInTheC said Did you know the moon mission would have been a complete bust if one guy, the day before, hadn't looked at the error codes. The same error codes that were continually popping up on the console during the dissent onto the moon. If it weren't for him they would not have known what those error codes were for and would have aborted the mission.,So yeah... This guy just copied and pasted the same 5 lines over and over again. 5 lines that do the collection of values for variables, setup call, and then an API call for different CRMs based on name. Repeated 7 times for each of the CRMs that we support. On top of the insane switch statement which is actually only used once to check if it's not null and matches within the switch statement. See the following loose but true example of this shit show I'm dealing with.
```pseudo-code-example
switch(crm)
case crm1
case crm2
case crm3
// (keeps going like this)
var temp = true
default
var temp = false
if (temp)
if (crm="crm1")
crm1.setup()
crm1.values(foo, bar, baz,...)
...
if (crm="crm2")
crm2.setup()
crm2.values(foo, bar, baz,...)
...
// Yup still keeps going like this
```
This absolutely insane mess was finally refractored by me to be an actual factory and not this absolute senseless murder to my mind.```