Interesting article by Karolina Alexiou. Regarding mistake #1, I disagree. I do it all the time, and it’s faster than finding, understanding, and fine-tuning a piece of code that will work for you, unless you are looking for something basic such as computing correlations for weighted observations. If you are good, your reinvented wheel will be better, implemented faster, more robust, and more customized than existing ones.