Yep, consider it your coding friend - literally anything you're doing that's repetitive and clearly defined should be coded up. In doing so, it'll help you narrow down what's discretionary or not, and if it really should be discretionary.
I knew zero coding to start with, and now a few months...