I really liked the magic system of the Eragon trilogy, which was based on being able to say a phrase in some ancient language that didn't allow for lying. Ok, so that is more natural language, but if you take programming as more speaking in an artificial language than doing math (as I do), then its a more apt analogy.