"Resist the urge to duplicate the work of others" should be the first rule of programming if its not already (although it's the hardest rule to follow).
On the other hand, programming an implementation of something is a good way to make sure that you really understand it - even if you end up using another program.
Pete