How can i share codes on my blog?

I’d suggest using Syntax Highlighter Evolved. It’s by Viper007Bond. You can use it like this:

[sourcecode lang="php"]
<?php
echo 'Hello World!';
?>
[/sourcecode]

Or even like this:

[php]
<?php
echo 'Hello World!';
?>
[/php]

A screenshot:

enter image description here

EDIT

An example of how you could do the backticks method that SE uses:

function wpse13653_content( $content ){
  return preg_replace( '@`([^`]+)`@', '<code>$1</code>', $content );
}

foreach( array( 'the_content', 'comment_text' ) as $hook )
  add_filter( $hook, 'wpse13653_content', 1 );

function wpse13653_excerpt( $content ){
  $content = preg_replace( '@`([^`]+)`@', '<code>$1</code>', $content );
  return str_replace( '`', '', $content );
}

add_filter( 'the_excerpt', 'wpse13653_excerpt', 1 );

This would let you use backticks in comments and post text, but would also prevent the backticks from showing up in excerpts after the code’s been stripped in automatic excerpts.