For many of my lectures, I use the Listings package for typesetting code excerpts, and include them in Beamer blocks. Providing nice shortcuts for doing that is not trivial if you want to preserve control over Listings options, and add a new one for the block's title. Here is a way to nicely wrap a call to \lstinputlisting inside a Beamer block.

First, let's use the xkeyval package to create a "title" option:
\define@cmdkey[dvl]{lst}[@dvl@lst@]{title}{}

Next, a low-level listing input command. This macro takes 4 arguments: an overlay specification, a title for the block, a list of options passed to Listings, and a file name for input:
%% \dvlinputlisting{overlay}{title}{lstoption=,...}{file}\newcommand\dvlinputlisting[4]{%  \begin{block}#1{#2}    %% #### WARNING: I need this hack because keyval-style options    %% mess up the parsing.    \expandafter\lstinputlisting\expandafter[#3]{#4}  \end{block}}

And now, you can define all sorts of specialized versions for different languages. For example, here is one for Common Lisp code. The block title is "Lisp" by default, and a "lisp" extension is automatically added to the file name:
%% Language-specific shortcuts:%% The title option is used for the beamer block's title.%% All other options are passed to listings.%% \XXXinputlisting<overlay>[title=,lstoption=,...]{file}\newcommand<>\clinputlisting[2][]{%  \def\@dvl@lst@title{Lisp}%  \setkeys*[dvl]{lst}{#1}%  \edef\@dvl@lst@options{language=lisp,\XKV@rm}%  \dvlinputlisting{#3}{\@dvl@lst@title}{\@dvl@lst@options}{#2.lisp}}

Which you could call like this:
\clinputlisting<2->[title={Example 1}, gobble=2]{ex1}

As you can see, "title" is an option for the Beamer block, and all the others are dispatched to Listings. Cool.

Now, things are getting more complicated when you want nice shortcuts for inline environments, because nesting Beamer blocks with listings doesn't work. Fortunately, I figured out a trick based on the Verbatim package to simulate that. The idea is to store the contents of the listing environment in a temporary file, and use \lstinputlisting as before to include it. Clever right ?
:-)
Here is a generic environment for doing that. In the opening, we read the environment's contents and store it in the file \jobname.dvl. In the ending, we call our previous macro \dvlinputlisting on that file (actually, on a dynamically created argument list called \@dvl@args:
\usepackage{verbatim}\newwrite\lstvrb@out\def\@dvllisting{%  \begingroup  \@bsphack  \immediate\openout\lstvrb@out\jobname.dvl  \let\do\@makeother\dospecials\catcode\^^M\active  \def\verbatim@processline{%    \immediate\write\lstvrb@out{\the\verbatim@line}}%  \verbatim@start}\def\@enddvllisting{%  \immediate\closeout\lstvrb@out  \@esphack  \endgroup  \expandafter\dvlinputlisting\@dvl@args}

And now, we can define all sorts of specialized versions for every language we're insterested in. Again, here is one for Common Lisp.
\newenvironment<>{cllisting}[1][]{%  \def\@dvl@lst@title{Lisp}%  \setkeys*[dvl]{lst}{#1}%  \edef\@dvl@lst@options{language=lisp,\XKV@rm}%  \xdef\@dvl@args{{#2}{\@dvl@lst@title}{\@dvl@lst@options}{%    \jobname.dvl}}  \@dvllisting}{%  \@enddvllisting}

Which you can use like this:
\begin{cllinsting}<2->[title={Example 1},gobble=2]  (defun foo (x) (* 2 x))\end{cllisting}`

Don't forget that frames containing code excerpts like this are fragile!