Watch: why no program can ever tell you if another program will finish
A walkthrough of Alan Turing's halting problem: the proof that no algorithm can look at an arbitrary program and its input and always correctly say whether it will finish running or loop forever.
— Computerphile, Turing & The Halting Problem - Computerphile — YouTube video