Live data from Hacker News

The Configuration Complexity Clock (2012)

mikehadlow.blogspot.com

21–24 of 24 posts

Re: The Configuration Complexity Clock (2012)

#21

The driver here is needing to make changes to the behavior of the app in specified ways, faster than the release cycle. My advice is to go no further than key-value configuration settings, and keep a documented set of Postman requests in the repo to serve as your UI for developers to invoke. This way you get the immediacy of being able to change prod behavior outside of the release cycle, the safety of knowing only y…

Back pressure is an important concept in distributed computing. It's also an important concept in project management.

By and large, "We need changes faster than our release cycle" is a condemnation of your release cycle, your definition of "need", or both.

I've 'forced' a fast, low-stress build pipeline on several teams and nobody wants to go back to before. And much to management's surprise, people will defend it after I'm gone (I think they see it as me being control freak bossy, rather than personal trainer bossy).

They also participate in pushing back to a degree on these "emergencies" because we have a "fast enough" that is reliable enough that half the team is willing to be responsible for pushing the buttons. No, you can't have that before lunch. You can have it tomorrow morning, like we always do. Maybe you should think things through a bit more in the future?

My current project was so big and Balkanized that I haven't found enough cracks to operate this way. So things are better, but feel worse in some ways because it's gone from nonspecific pain to specific pain. This is going to be the first time in 15 years I haven't left a team with a good CI/CD pipeline.

But at least all the things you can change in between releases will be under version control.

Re: The Configuration Complexity Clock (2012)

#22
Here is the guidance I usually provide:

Problem Statement:

There are application features and behaviors that all users need, majority of them need, a minority need, some need. Users have personal preferences and individual information that the software needs to know.

We tend to handle some of the above using code, some using configurations.

Guidance #1

Configuration is not a solution across the board. Configurations are often a premature optimization towards saving future efforts.

Code _is_ configuration for the processor. Coding has development methodologies and tools designed by the industry over decades, most of which is not applicable to configurations. So don't make code run-time configurable. Change the code as and when needed. Refactor.

Exceptions:

- For personal preferences and individual information.

- If runtime behavior of the code must be changeable without rebuilding the code.

Guidance #2

If the software behavior can be changed with lesser number of lines of configuration than the number of lines of code, develop better abstractions in the code. (Do not invent DSLs, create better abstractions in the code itself.)

Keep code configurable via hard coded configurations at an appropriate place somewhere within the code. This encourages modularity. However, limit the flexibility to at most 30% development effort overall overheads above and beyond the currently known requirements. If development efforts overheads for the flexibility is much more, that flexibility is a premature optimization (keeping in mind, you aready have flexibility via ability to change the code). If you are not thinking above and beyond the currently best known requirements, you may find the requirements changing faster than what you can keep pace with.

Guidance #3

Instead of configurations, find a more specific alternative.

- Machine Learning models are technically code configurations, though we do not see it that way. ML comes with needed tooling to manage.

- Knowledge graphs.

- Data exchange file formats.

- Etc.

Guidance #4

Configurations are not for SDEs. Identify the owner who would be responsible for changing the configurations and see them as customers, in the current phase of development. Think of what help and tools are you providing them to manage the configurations.

Guidance #5

Do not let the space of configurations multiply. Configurations parameters must be modular (i.e., independent) just like code.

Just as functions having more than three parameters should be avoided, same applies to configurations impacting the behavior of a function. Avoid more than three of them taken together for any function.

Guidance #6

A configuration is also a contract. Pay no less attention to it than to function interface or API design.

Configurations need to be equivalently documented. Think of them as command line arguments. If the user needs to know the implementation internals to understand the command-line arguments, default against having them.

Guidance #7

Backward compatibility and blast radius reduction are not valid arguments to have distributed configurations. Depend on automated and manual testing instead. Reason correctly about how many of the users would need the variation in software behavior.

If a code change is to be made (i.e., it makes sense), try to apply it everywhere. (I presume when Microsoft went to fixed and mandatory Windows update cycles, it would have helped them a lot.)

Guidance #8

If different Product Managers serving different regions or types of users ask for different requirements and you as developers see no valid reason for it, make them talk to each other and document their collective reasoning before getting back to you.

Re: The Configuration Complexity Clock (2012)

#23
post #15
post #12

Earlier quoted context omitted.

There is a tension between delivery speed and operational safety. The faster you deploy new service code, the faster you can take down your service because of a bug that slipped past your automated tests. This is why one-box deployments and traffic shifting and feature flags exist (which are increasingly config-driven). And if you have multiple instances of your service running (e.g. regional endpoints), and you care…

> There is a tension between delivery speed and operational safety. The faster you deploy new service code, the faster you can take down your service because of a bug that slipped past your automated tests. 100% agreed - but people miss that this applies just as much to deploying a "config change" as it does to a code change. Particularly if you're talking about feature flags, a config change and a code change are ef…

[deleted]

Re: The Configuration Complexity Clock (2012)

#24
Good article, interesting topic. I think this clock represents the layers of abstractions an application or piece of code goes through during its lifetime. At first, no abstraction, just literal values. As you abstract the code you use the language as a tool to hide anything that repeats and expose only the essentials (a.k.a. abstracting). After DSL's at 9am in order to avoid getting back to hard coded values at 12pm, you HAVE to start abstracting at the conceptual/"business" level of the application. This would be the domain, however if the domain, when implemented, is causing a trip around the clock, this means the initial concepts are breaking the abstraction.
Post reply on HN