[HN Gopher] The Configuration Complexity Clock (2012)
       ___________________________________________________________________
        
       The Configuration Complexity Clock (2012)
        
       Author : yamrzou
       Score  : 21 points
       Date   : 2023-10-31 18:12 UTC (4 hours ago)
        
 (HTM) web link (mikehadlow.blogspot.com)
 (TXT) w3m dump (mikehadlow.blogspot.com)
        
       | yukkuri wrote:
       | A very nice way to illustrate it!
        
       | IshKebab wrote:
       | This is good advice. Part of the difficulty is that you don't
       | really want to write your configuration in C++ or Rust and have
       | to recompile your whole program to change something... but it is
       | nice to be able to use a "real" language, otherwise eventually
       | you'll have to resort to a real language anyway to generate your
       | configuration.
       | 
       | The issue is - which language?
       | 
       | Ideally you want something embeddable, sandboxed, with good tool
       | support, static types/hints and "normal" (not aggressively
       | functional, 0 based indices etc.).
       | 
       | The only language that remotely ticks those boxes is Starlark.
       | That's probably what I would use in future if I had this issue.
       | 
       | I've looked into many other options (Jsonnet, Dhall, Cue, Python,
       | Deno, Lua, Rhai, etc.) but they all fall down in some way.
        
         | lainga wrote:
         | What do you dislike about Lua? (having used it I have several
         | answers already in mind)
        
           | IshKebab wrote:
           | Been a while since I used it in anger but IIRC no real array
           | type, classes are weird, 1-based indices, kind of crummy
           | syntax (does anyone really like `end`?), no static types
           | (when I used it anyway), the stupid split between Lua and
           | LuaJIT.
           | 
           | It's definitely not the worst. It's just a little too weird
           | to be able to write it without actually learning it, which is
           | what you want in a config language. And 1-based indices just
           | shows poor taste.
        
       | karmakaze wrote:
       | Whenever this comes up I think of Greenspun tenth rule[0]:
       | Any sufficiently complicated C or Fortran program contains an ad
       | hoc,       informally-specified, bug-ridden, slow implementation
       | of half of Common Lisp.
       | 
       | I find it specifically applicable to evolving configuration
       | systems.
       | 
       | > It can also be interpreted as a satiric critique of systems
       | that include complex, highly configurable sub-systems.
       | 
       | [0] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
        
       | bob1029 wrote:
       | We are doing this trip right now.
       | 
       | Hard code -> configurable/scriptable/DSL -> Hard code.
       | 
       | The nuance I have discovered is you can do the "hard code" in a
       | wide variety of ways, some much more amenable to non-developers
       | than others.
       | 
       | Our latest stack goes back to hardcoding because someone can edit
       | the source directly in GitHub and have an updated app deployed
       | automatically for evaluation within 2-3 minutes. Another simple
       | compare/merge operation in the web UI to move between
       | environments. No visual studio, no git CLI, nothing. Simply make
       | desired edits in browser, click the green button & check the URL
       | again when the bell dings.
       | 
       | Devops wasnt quite this way in 2012. GitHub+Azure have replaced
       | an entire section of my org chart in 2023. The key for us this
       | time around the dial is to separate "nerd" code from "business"
       | code. Not going to be perfect ever but we can get it very close
       | with intent and all of the experience we built up so far.
       | 
       | The configurable/scriptable/DSL stuff definitely does work, but
       | once you get to a certain magic # of configuration points, hard
       | code begins to emerge as superior again. Configurable wins in the
       | middle of complexity. Hard code wins at the extremes.
        
       | js8 wrote:
       | A related thing is an Application Dependencies Clock, which has
       | dependency injection at 6.
        
       | projektfu wrote:
       | I can only imagine that the bespoke database with custom GUI
       | thing represents Windows Installer (given the reference to
       | resharper). In that case, the clock swung backwards to using XML
       | config to generate the database.
        
       | spawarotti wrote:
       | At a first glance this looks to me to be the same concept as "The
       | Heptagon of Configuration":
       | 
       | https://matt-rickard.com/heptagon-of-configuration
        
       | mrkeen wrote:
       | I'm hitting this right now with my predecessors' setup/factory
       | classes for Kafka in our codebase.
       | 
       | There's different kinds of factories stacked atop one another.
       | There's Guide dependency injection so that the factories are able
       | to reach into config classes and copy custom properties into the
       | actual Kafka constructors right before instantiation.
       | 
       | It's just an extra Rube Goldberg machine in front of Kafka
       | instantiation which doesn't prevent the caller from needing to
       | know the implementation details.
        
       ___________________________________________________________________
       (page generated 2023-10-31 23:01 UTC)