People often ask me (no one asks me), what is the biggest mistake inexperienced programmers make? Looking back at when I started writing code, my biggest inefficiency was not using modules properly and trying to implement everything on my own.
I often see others making this same mistake. Trying to reinvent the wheel when someone already spent time on solving the problem they have. I think the main reason is that it’s easier and more fun to write new code that you understand than it is to try to figure out an api or read someone else’s code. Another reason is underestimating how long it will take to implement it and the edge cases you might have to handle.
I also think it’s also the same reason why many like to write their own code instead of using legacy code that already works.