I am reminded of an old post (from HN I think) in similar vein that stuck on with me https://stackoverflow.com/questions/153234/how-deep-are-your...
I do take time to understand the code I am using, but for most part spend finding the code (and libraries) I want to use even in the simplest cases. I've developed a habit to give credit in my code ... in fact I have an expansion ';c' on my mac for giving credit! :-)
I see a lot of very experienced programmers spend time writing and debugging even simple lines of code which are perhaps completely obvious to them. I think it is just that way coding is. It is perhaps very difficult to get it "First Time Right".
I guess its a balance between getting things to work vs. self-gratification.