How to make an unambigous grammar of a programming language
Grammars of real programming languages are often more restricted than CFG in order to enable efficient parsing. You may have heard of LL(k) and LR(k) grammars, for instance. All these grammars are, by definition, unambiguous; the corresponding language classes are (strict) subsets of DCFL.

You would realize a grammar is ambiguous (or otherwise not in the grammar class at hand) when the algorithm constructing a parser from it fails. Speaking in computability terms, membership for these grammar classes is decidable.