3 ms·
Rewrites aside, (it may or may not improve or work) but the thing I have noticed/learn about HUGE codebases which are 'bad' is to implement "feature-options"
by rawoke083600 4y ago
Rewrites aside, (it may or may not improve or work) but the thing I have noticed/learn about HUGE codebases which are 'bad' is to implement "feature-options" and have an "unbreakable rule" about coding to a client/actor/instance.
Nice thing is you can start with the current codebase, and add in these, it will make the rewrite a lot easier since your capabilities/feature-configs are already extracted.
Example:
If your product/code serves multiple customers, you should never have:
if (customer-id==123 || customer-id==999) {
//do things this way
}else {
//do things the other way
}
instead always aim for feature-options (config?)
if (config-feature-a == true){
//do things this way
}else {
//do things the other way
}
If this seems not related to your codebase or product, you just need to dig deeper, it's usually there in some form or another.
PS. If you think the above is 'obvious', you have probably not seen an old enough (or bad enough ?) codebase, few coders start out with the bad case, the bad-case (coding to a instance/customer) are those 'quick-fixes' that accumulate over the years.