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:

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}
%% #### WARNING: I need this hack because keyval-style options
%% mess up the parsing.

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}

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:

And now, we can define all sorts of specialized versions for every language we're insterested in. Again, here is one for Common Lisp.

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

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