Foi talvez Webmage de Kelly McCullough ?
(Eu não li o livro, lembre-se, apenas fiz uma pesquisa rápida no Google. :))
Ravirn is not your average computer geek. A child of the Fates—literally—he’s a hacker extraordinaire who can zero in on the fatal flaw in any program. Now that twenty-first-century magic has gone digital that makes him a very talented sorcerer. But a world of problems is about to be downloaded on Ravirn—who’s just trying to pass his college midterms. Great Aunt Atropos, one of the three Fates, decides that humans having free will is really overrated and plans to rid herself of the annoyance—by coding a spell into the Fate Core, the server that rules destiny. As a hacker, Ravirn is a big believer in free will, and when he not only refuses to debug her spell but actively opposes her, all hell breaks loose.
Um trecho do livro sobre o troll:
"Here, Boss. Drink this. The troll says it'll help with the pain."
"The troll?" I sat bolt upright, adrenaline overriding pain.
"Calm down," Melchior said. "Ahllan's not that kind of troll. She's a vegetarian."
Incidentalmente, Melchior é seu goblin / laptop.