How can recognize post’s category?

is_single() is intend to work with post types, not categories.

To check for category you should use is_category('programming').

Note that is_category works on category archives, not on single view.

So, if you want to check in the current is a single view and has the category ‘programming’ you need the has_term tag:

if( is_single() && has_term('programming', 'category', get_queried_object()) ) {
  include_once ('TEMPLATEPATH/get-messages.php');
  exit();
}

See is_single, is_category and has_term on Codex.

Also have a look on how conditional tags works in WP.