I always make a trip to the Dolphin coffeeshop whenever I go to the Dam. They had some nice Northern Lights in there last time I was over, and are always up there for best coffeeshop, due to it's under the sea theme.
There are so many coffeeshops though, get a guide that'll point out all the big names like Barney's etc. Barney's is nice, but it's geared towards fleecing tourists, I just buy buds in there. There's a couple of nice ones in and around the Dam square too, you'll spot the Paradise sign in any case, it ain't bad in there either. If you have time and money, I'd reccomend just walking around and checking out the sidestreets and back roads off the canals etc. I found an amazing place that did delicious smoothies and tasty bud brownies, and that was just by exploring the place. Take it off the beaten track a bit, there's more to Amsterdam than what High Times reccomends.