Tech
Your `if` statements are a database nobody can query
Somewhere in your codebase there is a line that looks like this:
if ( user . plan === ' enterprise ' || user . tenantId === ' acme-corp ' ) {
// ...
}
Nobody remembers who wrote the second half of that condition. It has been there for two years. It is almost certainly still load-bearing.
Here is the thing I want to convince you of: that line isn't code. It's data, and it's stored in the worst possible place.
Every conditional that encodes...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to