Of course, as I have said many times and will say again: there's nothing wrong with reinventing wheels for the sake of learning, but a lot with subsequently using them in production unless you actually intend to spend the time and effort to invent a rounder wheel than what's already there. That means knowing how existing wheels solve the problem, understanding what issues they have, getting your code out to as many people as possible for testing, and sticking around fixing bugs as they come up. Only then can you be confident that your code is correct and robust enough to withstand abuse from many different users with lots of different needs and scenarios.
Of course, it is quite enlightening to invent your own wheel, then read an existing one for comparison. There'll be checks and code for all these strange conditions and edge cases you never even thought of. I learned a number of valuable lessons that way.
And if you do that three or four times, you'll cease trying to invent your own wheels in the first place and start giving advice such as what I have ended up giving. :-)
Makeshifts last the longest.
|