Partager via


Presentation tip: Showing code

Since MEDC 2005, I have been tapped to present sessions many times.  Over the past three years, I have learned a lot and have grown as a presenter.

When I was first getting started, I attended my first speaker training course.  Speaker training is a one-on-one class where you meet with your coach and he/she observes your presentation technique.  I found the experience extremely valuable and make a point to re-take training every year.

One of the most valuable pieces of advice I was given is in how to best configure Visual Studio for code readability in a presentation hall.  This advice applies to all audience and room sizes: from 16 person conference rooms to lecture halls that seat 400 or more.

Whenever I am preparing for a presentation (or am helping a new presenter prepare), I set Visual Studio's Font and Color settings as follows:

Font: Lucida Console
Font size: 16-24 (depending on room size and projector resolution)

Text color: Black
Background color: White

Highlighted text color: Black
Highlighted text background color: Yellow

It is amazing the difference these settings can make in code readability for your audience.

One note on code layout.  When using large fonts (20) and small resolutions (1024x768), it is very important to format your code to avoid scrolling as much as possible.  Placing each argument on its own line is perhaps the best advise I can give here.  This way, the amount of side-to-side scrolling is minimized (there will still be some when enum / variable names are long).  The example below shows my typical demo code formatting (it is very similar to what I use on this site).

public DemoMethod(String arg1,                    Int32 arg2,                    Boolean arg3) {     // local variables     try     {         String result = DemoHelperClass.AStaticMethodWithManyArgs(                              arg1,                              arg2,                              arg3,                             var1,                             var2,                             var3);         // additional code     }     catch(Exception e)     {         // handler code     } }

Ad you can see, the method the demo is calling has a pretty long name.  For this reason, all of the arguments are on their own lines.  Depending on the resolution of the screen, you may wish to further limit the horizontal scrolling by reformatting as below.

String result =      DemoHelperClass.AStaticMethodWithManyArgs(         arg1,         arg2,          arg3,         var1,         var2,         var3);
It may look a bit odd when you are developing the demo, however it will be much easier to read for the audience.  And it has a nice side-effect: it's also better for reviewing printed copies of the code.

Take care and Happy Holidays!
-- DK

Disclaimer(s):
This posting is provided "AS IS" with no warranties, and confers no rights.

Comments