I recommend you to read the "Gødel, Escher, Bach" bookGödel, Escher, Bach. It's a very fun and illuminating book that, among other things, touches on Goedel'sGödel's incompleteness theorem and the halting problem.
To answer your question in a nutshell: the halting problem is decidable as long as your program does not contain a whilewhile loop (or any of its many possible manifestations).