Rule3: Know and use the libraries
Knowing and using standardlibraries saves us from missing out some minor intricacies of programming which may be ignored . the libraries are written by experts ,beta tested and used by billions of people over trillions of times.
Don’t reinvent the wheel. If you need to do something that seems like it should be reasonably common, there may already be a facility in the libraries that does what you want. If there is, use it; if you don’t know, check. Generally speaking, library code is likely to be better than code that you’d write yourself and is likely to improve over time. This is no reflection on your abilities as a programmer. Economies of scale dictate that library code receives far more attention than most developers could afford to devote to the same functionality.