When I program I spend a lot of time using Google and reading through documentation. The fact of the matter is it's impractical for modern programmers to write code from basic principles. We have to interface numerous libraries together in a fashion which fits our application. This saves us time (usually) as we don't have to write special-purpose code every time we want to do some common task X (or even some not-so-common task Y). Reading documentation and looking at examples is the best way to learn how to use these libraries as they can have wildly different design choices and resources.
Learning about data structures and algorithms are also an extremely important part of programming. The difference between a good algorithm and a bad algorithm can be the difference between a task which can execute in milliseconds vs. one which won't finish before the sun expands and engulfs the earth (yes, there are algorithms which perform so poorly).
At the very least, a good programmer understands when a particular data structure or algorithm fits well. That doesn't mean you must be able to implement the best possible hash table to be able to use hash tables effectively. Understanding hash tables are very good for checking if an element exists in a set and are very bad for sorting a list, and why this is the case is usually good enough for most programmers.