The problem and the solution Among the several ways available to load a program in Stata, the one that I like the most is to add the directory of my ado-file to the search path used by Stata, which is stored in the global macro S_ADO. This procedure is easily done by using the command adopath ++. I like this method because after I have modified and saved my ado-file, I only need to type discard and then run my code.
Each time you start a new Stata session, Stata looks for two files, sysprofile.do and profile.do. If these finds are found, Stata executes their contents. This post is about how to modity profile.do, in which you can put anything you want Stata to do before you start working with it.
From time to time, I upload my profile.do into my GitHub repository (randrescastaneda/Stata_profile), so you can check it out and download it for your own purposes.