De-bouncing a button has been a challenge for any embedded engineer. Well not to say "challenging:, it is always a nagging stuff.
Some time you trade with time, code space or some other resource. Hack-A-Day organized an event to collect all the great De-bouncing code. Nice collection of code snippets to refer.