title: At what point does a config file become a programming language?
body: <p>I have been mulling over config files and their relationship to code for a while now and depending on the day and direction of the wind my opinions seem to change.  More and more though I keep coming back to the realization I first had while learning Lisp: there is little difference between data and code.  This seems doubly true for config files.  When looked at in the right light a Perl script is little more than a config file for perl.  This tends to have fairly heavy consequences for tasks such as QA and divisions of labor like who should be responsible for changing config files.</p>
  
  <p>The creep from config file to full fledged language is generally slow and seems to be driven by the desire to have a generic system.  Most projects seem to start out small with a few config items like where to write logs, where to look for data, user names and passwords, etc.  But then they start to grow: features start to be able to be turned on or off, the timings and order of operations start to be controlled, and, inevitably, someone wants to start adding logic to it (e.g. use 10 if the machine is X and 15 if the machine is Y).  At a certain point the config file becomes a domain specific language, and a poorly written one at that.</p>
  
  <p>Now that I have rambled on to set the stage, here are my questions:</p>
  
  <ol>
  <li>What is the true purpose of a config
  file?</li>
  <li>Should an attempt be made to keep
  config files simple?</li>
  <li>Who should be responsible for making
  changes to them (developers, users,
  admins, etc.)?</li>
  <li>Should they be source controlled
  (see question 3)?</li>
  </ol>
  
  <p>As I said earlier my answers to these questions shift constantly, but right now I am thinking:</p>
  
  <ol>
  <li>to allow a non-programmers to change
  large chunks of behaviour quickly</li>
  <li>yes, anything that is not coarsely
  grained should be in code</li>
  <li>users should be responsible for
  config files and programmers should
  be responsible for a configuration
  layer between config files and code
  that gives more fine grained control
  of the application</li>
  <li>no, but the finer grained middle layer should be</li>
  </ol>