News for hackers. Stuff that matters.
Re:The Configuration Complexity Clock (2012) by hinkley on Tuesday July 09, 2019 @02:23PM (#20395039)
The best thing you can do here is that if you use "8080" in a bunch of places in your code, replace all the ones that mean the same thing with a constant (eg, what port I'm running on), and the ones that mean something else (eg, what port the auth token engine is running on) with a different constant. Better still, use the URL library from your ecosystem to do this, and pester your 3rd party library authors to stop parting out URLs. If I had a dollar for every URL interpolation bug I've had to fix...

That way when you have a customer whose antivirus is running on 8080, you can finally pull it out into config files, and you 'just' have to change the people who consume the constant to pull from config. Because you've already telegraphed the intent to do this.

A few jobs back I saw another side benefit to this: you can entice people to participate in improving the code. When code is really wrong people will ignore it. They can't be bothered to get invested in it. But when it's almost right they are often motivated to fix it the rest of the way. Either they see the potential and are inspired (new blood, trying to make their mark), or the unfulfilled potential grates on their sensibilities (crotchety veterans).

There are no comments on this comment yet.