On his site Jeff Key has a list of utilities he wrote. Some of them have source code that I believe is a good learning aid.