Reinventing the wheel was never a good idea. Even reserchers start from where other resarchers left after delving a bit into their work to check the intuitive correctness of their works. But software development is different, if you are developing software then once a problem has been cracked there is no use breaking your head over the same problem as your brain can be more effectively utilised in solving other more compelling and challenging problems. The hacked code of a problem is called a pattern. It is similar to the components of the COM ( Component Object Model) where you have components which are built and tested and can be used as building blocks to more complex functionality software.
Even EJB ( Enterprise Java Beans ) of J2EE framework utilises the same concept. That of software patterns and software reuse.