3 ms·
Since we sharing :) One "trick/lesson" I learned from working with a "big dist system" (think scraping-jobs) with lots of clients(read unique errors) and requi
by rawoke083600 5y ago
Since we sharing :)
One "trick/lesson" I learned from working with a "big dist system" (think scraping-jobs) with lots of clients(read unique errors) and requirements was:
Never-ever-ever do:
if(client->id=123){
//do special workaround,process,feature or magic-dance
}else{
//normal non-magic-dance,process,flow
}
The only "allowed method" for implementing such code was to add a "JobOption" to the client-config.
Thus you have:
if (client->joboptions->magic_dance){
//magic-dance-feature-workaround
}
You'd be surprised that over time how many clients have "similar requirements" but different combinations and just being able to do a checkbox-check on their job-config (enable magic-dance) was gold for maintenance and keeping out the spaghetti code!
It was the 'greatest of sin's in our org to write "if client->id=123"