Code or Config
How do I decide what parts of my service to specify in code? Should I support changing all of the settings in configuration?
The split between code and configuration comes from a difference in roles and responsibility for a service. If your job is to both write and take care of a service, then these different roles are probably not important to you. However, if there is a division of responsibility between multiple people, then these roles may become more important for deciding the right way to build the service.
Although there are many types of roles, two commonly talked about roles are the developer and the administrator. The developers are the ones responsible for assembling the logic of the service to create a program. That logic may come from other sources, such as domain experts or business analysts (more examples of roles), but the developers are responsible for performing the actual coding tasks. In contrast, the administrators are the ones responsible for deploying the service and keeping the service operational. There are also many examples of roles that fall within these categories of developer and administrator but I'll use those terms very broadly for this explanation.
A way to think about the difference between code and configuration is that things specified in code define the function or behavior of the service while things specified in configuration define the environment or operational characteristics of the service. A developer controls the function while an administrator controls the environment.
For example, you would generally specify in code, part of the program definition, whether two actions are transactionally associated because the coordination between actions is part of the functional semantics of the service. On the other hand, you would generally specify in configuration, part of the operational definition, a quota for how many copies of an action are allowed to run because the quota defines a capacity for the system rather than the function of the system.
As another way of thinking about this, if you were to install the service in a different environment, on another machine for instance, the capacity of the system may change while the function of the system does not. Therefore, you want these environmentally influenced factors to be controlled by an administrator while the factors that are not environmentally influenced to be controlled by a developer.