Very true, even the worst Pratchett is certainly better than a lot of authors. And yeah, Hogfather is pretty damn good, the reason I mention Death as my favorite sub-series is probably like 60 percent thanks to that particular book.
Sure, there are obviously lots of works with undefined magic without a trace of Deus Ex Machina as well as the opposite (for example, the bending in the Avatarverse is fairly well defined, but that didn't stop the Deus Ex Turtle which I hate with the power of a thousand exploding firebenders...), but I'm still convinced that "magic does whatever" leaves more room for lazy resolution by authors than "magic does X, Y and Z".