Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
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.
rant
just throw shit at the wall
oh buddy
were you in a time crunch