Google's claim on this subject is that they not only use PR or popularity of pages that link to you but also their authority (or domain relevance). So a link from Stack Overflow would count more for a search term like "learn to code" than say, a link from Howcast.