That was the advice I got from my advisor as a grad student. 15 years later, I disagree strongly. I wasted a lot of time writing code that I couldn't read later, that took forever to get right, and that couldn't be reused. I've made a significant investment in programming tools and it has been worth it. Git alone has probably made me twice as productive.
The logic you state (which is dominant) is wrong. Optimizing the speed of writing the first version of a particular piece of code is a bad idea.