> Programming using text editors with no knowledge of the code base was a big mistake, because it leads to other mistakes like trivial typos and trying to do refactoring using regular expressions.
Hear me out, but could it be that your mistake is actually using dynamically typed languages?