I disagree slightly about "don't reinvent the wheel". If you need to get a job done, and there's already a tool that does it, then I agree - use it. But I do think there is a place for taking a crack at a problem, even when there are good solutions available. It helps to know what's involved in solving the problem, which could help you better choose which solution would serve you best. It can open you up to new ideas about programming. If the solutions don't quite fit your needs, you can make changes. And, it can be fun.
Often, professional programmers simply don't have the luxury of doing this. The PHB doesn't want them dithering around *learning* things, when they could be doing useful work. But if you've got the time, it's not always a bad idea to reinvent the wheel, if only to appreciate how well someone else made one.