in reply to Re^2: Directory Syncer
in thread Directory Syncer

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.

Replies are listed 'Best First'.
Re^4: Directory Syncer
by chanio (Priest) on Aug 19, 2004 at 04:57 UTC
    Valuable reasons for re-inventing wheels:
    • You apreciate what others have done before, and what is polishing the results. (4 x. doing it user friendly, or error proof).
    • You find yourself that 'you are not the only one' :) And you could measure the public success that your idea could have become if you had done it some time before.
    • By comparing the code (thanks to opensource), you can improve your syntax and the way of procesing the data.
    • Finally, you can clasify your chunks of code and re-use them in other projects. You need to improve your self-documenting style, in order to reuse it with just a glimpse at it and not having to inspect it in detail. Also, re-structuring it in clear chunks would help a lot!

    .{\('v')/}
    _`(___)' __________________________

      That all falls under the "inventing a rounder wheel than what's already there" clause in my post. :-) If you know how existing wheels work and understand how they are suboptimal in this way or that, and you have enough dedication to work out all the kinks in your own solution to make it really robust, then by all means go ahead and reinvent that wheel. Just don't do so off-hand, because that leads to hexagonal wheels, and they're not much fun for your passengers or the mechanic who later comes after you.

      Makeshifts last the longest.

        I share 100% your opinion!

        In my case, I need to 'reinvent wheels' and in that process understand what I didn't from the start.

        There might be more practical techniques but mine works with me. I know that I am going to have to face the same mistakes over and over again, until I finally understand where I was wrong.

        The practical way is just trusting the creator and studying by hard how to use that perfect thing. But perhaps, doing so, I might once stumble with some difficult times and might then question if that perfect thing was so perfect...(thanks Talking Heads). Because I didn't understand it well.

        Besides, what more fun than re-inventing 'existing wheels' in one's own way (I did it my way..., thanks Franky :) )?

        .{\('v')/}
        _`(___)' __________________________
        Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established.