I had the same problem at $work when the team grew from "just me" to "we now have multiple people and start selling the stuff to customers". Our solution is, in simple term, to set some environment variables to tell the software what configuration files to load.

It's easy enough to externalize some configuration files to a source code repo that only a few people have read access and even fewer have write access. If the ENV is not set, load the default config (using the development environment), otherwise load the config from the path given in the ENV variable.

This not only makes it possible to distinguish between development and production, it's also easy for developers to switch between multiple test setups. This comes especially into play when you have multiple ways your software runs.

In my case, it's a POS system(*), which can run on servers, workstations and embedded systems (so long as they run Linux, naturally) and in Docker (oh god, the pain!). And i alone have like a dozen different databases over multiple systems, just so i can test the various possible customer setups.($)


(*) No, not "piece-of-sh**"(**) but "point of sale", e.g. a cash register.

(**) That being said, the cheapest variant of the hardware this runs on, has, let's just say "the cheapest thermal printer ever made, talking the weirdest dialect of ESC/POS an unpaid chinese intern could come up with". This goes so far that the only software that can print a receipt on this contraption is my own. Neither the OEM windows driver nor their Linux driver actually work correctly. I made it work by reverse engineering both drivers, second-guessing the most likely screw-ups and misunderstandings resulting from the original Epson specifications and learning a lot of new curses(***)

(***)Development happened over a number of weeks on Fridays. On Fridays, i have the office mostly to myself. This tactical decission hugely reduced the number of complaints about my political correctness regarding those unpaid chinese interns.

($) You know, those types of customers who want to have the latest and greatest software (for next to nothing, of course, money doesn't grow on trees...), and then want to run the sales process the same way that their great-great-great-grandfather used to run before Napoleon invaded Austria...

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

In reply to Re: Holding site variables by cavac
in thread Holding site variables by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.