← Back to context

Comment by immibis

7 hours ago

The configuration complexity clock: https://mikehadlow.blogspot.com/2012/05/configuration-comple...

I wish people would realize that moving back to code is possible, though.

It rarely happens because at this point the codebase is so littered with problems that things start requiring long QA, code freezes and once-a-month deployments, and it's impossible to get anything done.

  • Better never stray from code.

    My faviourite configuration pattern for SaaS code: all the configuration for all targets, from local development setup, to unit tests, to CI throwaway deployments, to production is in a single Go package. The current environment is selected by a single environment variable.

    Need something else configured beyond your code? Write Go code to emit configs for the current environment, in "gen-config some-tool && some-tool" stanza.

Config values and a configurable plugins system completely solve the problem, dominating over the entire clock.

Iterating further from config values is a great predictor that a project will become a disaster to use, and probably fail completely.