Maybe he could add a 'context' flag on the search. Instead of the engine trying to discern what you are looking for from your history, maybe there could be a way you could tell it. #programming, #cooking, etc. Not sure what the UI should be.
I've long given up searching for trendily-named JavaScript libraries without adding "js" to the search term.
(Edit- clarification re: ads)
Or, even better: "!rubygems devise".