Just use something that exists—it's silly to reinvent the wheel.…
Why is reinventing the wheel so frowned upon? Because, more often than not, existing code is working code. It has already gone through some sort of quality control and rigorous testing, and is being used successfully.
Reinventing the wheel is not just an exercise in where to place code constructs: it is about how to get an intimate knowledge of the inner workings of various components that already exist.
Reinventing the wheel is as important to a developer's education and skill as weightlifting is to a body builder.