Salta al contenuto principale


If your program constructs a configuration from one or more configuration files and maybe also built-in defaults, command line options, environment variables, or anything else, it is a good idea for the program to have a way to dump the actual, combined, configuration so that the user can see what it actually is.

This beats reading documentation and deducing what things should be. It helps with debugging configuration mistakes of all kinds.

Trust, but verify, sort of.

reshared this

in reply to Lars Wirzenius

A good example of the more general "state should be visible" UI principle.
in reply to Lars Wirzenius

Yeah, and the same applies to libraries. Also, sometines it'd be nice to see where the configuration came from.

Completely unrelated, I'm trying to change the User-Agent a Java program sends out when making HTTP queries. (Of course it also has two different ways of doing that for Reasons.)

in reply to Lars Wirzenius

@Lars Wirzenius this is very fine advice. that I should follow. And I don't think my projects currently do. uooops.
in reply to Lars Wirzenius

#PostgreSQL's pg_settings view is an excellent example of this.

Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l'utilizzo di questi cookie.

⇧