Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

(OT) Presentations Involving Code

by dorko (Prior)
on Mar 07, 2007 at 17:30 UTC ( [id://603645]=perlmeditation: print w/replies, xml ) Need Help??

Hello,

I've marked this post off topic because it doesn't really apply to just Perl, although in my specific instance it's all about Perl.

I put in a proposal to talk at a users' conference and was accepted for a 60 minute session. My topic is a Perl module I've written that acts a wrapper for the web based API of a commercial product.

I've presented before (stand up training, scripted educational sessions, and formal talks like this), and public speaking comes easy for me. My question is this: How best can a person present code? The presentation format will be a typical lecture format. (ie Me behind a lectern in an auditorium with a project.) Copying and pasting code into Powerpoint doesn't seem too friendly for a 60 minute talk.

I can't take a laptop*, and I doubt I'll have the ability to install software on the computer I'll be using. Presumably, I'll have access to MS Office, Acrobat, and perhaps other common software packages.

Thoughts? Suggestions? Comments?

Cheers,

Brent

-- Yeah, I'm a Delt.

* The presenation is in Vegas and the last person from my department that went to Vegas had their laptop stolen from their hotel room, so the edict is no laptops go to Vegas.

UPDATE: edited title per Consideration request: s/Presenations/Presentations/

Replies are listed 'Best First'.
Re: (OT) Presentations Involving Code
by Corion (Patriarch) on Mar 07, 2007 at 17:45 UTC

    Personally, I'm very fond of spod5, which takes plain pod and converts it into an S5 slideshow, which can easily be displayed through IE or FireFox (press F11 for full-screen/kiosk mode). There are some other S5 modules that also produce these slideshows.

    I hacked spod5 a bit to include line numbers, but I keep my presentations simple. The upside of pod/S5 is that you can edit it at the last minute and restyle it easily or run it through babelfish. The downside is that S5 doesn't support any fancy page transitions and that you have to do all the graphics stuff in an external program.

    Update: One more kickass thing that xdg's post here reminded me of is that you get font resizing for free with the browser. If the back row complains they can't read your code, just hit CTRL+ and the font will increase, rewrap and hopefully still fit on your slide...

      Personally, I'm very fond of spod5, which takes plain pod and converts it into an S5 slideshow, which can easily be displayed through IE or FireFox (press F11 for full-screen/kiosk mode). There are some other S5 modules that also produce these slideshows.

      One option that no one seems to have mentioned yet is LaTeX; as an aficionado I'll do: there are many packages to write talks. A very popular choice currently is beamer with pdf output. I made my own thesis presentation with it and it was easy and straightforward. I have temporarily uploaded an example. (Please note that this is a preliminary version of the talk, it even contains an actual error, and for some reason I don't have the definitive one on this machine nor can I currently access it otherwise so the link is not going to work long.) Just consider that I stayed KISS, but you can do more complex things if you wish. Anyway you produce a simple pdf file that can be displayed with quite about any common viewer. With Acrobat Reader, and I suspect others, if you open it standalone as opposed to in a browser's window, it will automatically go full screen.

      Now, my presentation didn't contain code, but for code listings the very popular choice is the listings package: I've not used it in connection with beamer nor any other presentation package and I am not aware of how they will interact, but I don't expect any particular problem. Anyway I know people do create presentations in LaTeX containing code, so some way or another it is certainly possible.

      Update: I just tested the link I posted above and for some reason it doesn't seem to work, well at least with Firefox: the file gets truncated at some time. I downloaded it with wget and I get the whole file. I suspect there are some problems with the perlmonk.org hosting a few fellow monks are kindly offering us.

Re: (OT) Presentations Involving Code
by xdg (Monsignor) on Mar 07, 2007 at 21:00 UTC
    My question is this: How best can a person present code?

    Personally, I'd think of great presentations you've seen and try to emulate them. As a fallback, look at how others have presented code in Perl. I'd recommend looking at slides from Perl conferences in the past. In searching for links to some, I also came across dominus' Conference Presentation Judo talk, which you may find useful.

    If I have to give one major tip, use big fonts. 3 - 5 lines of code on a presentation slide (and really, really big) is probably all that you can count on being legible to everyone in the audience.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      Yes, dominus' presentation judo is really great; even if it doesn't fit your need, at least it's hilarious :)
      3 - 5 lines of code on a presentation slide (and really, really big) is probably all that you can count on being legible to everyone in the audience.

      Since you're not given even twenty lines for each function but five lines for the whole program, the best way to get it all fit the slide is, of course, to golf!

      On a more serious note, I agree with this: put the key points on the slides, and very, very little cruft. No-one wants to read long slides. What this means with code depends on the case, but I would say removing error handling, reading input and output, and in general anything extra that is not strictly relevant (unless those listed are what you are talking about). The less you have stuff per slide, the better.

      One tip: if you use page numbers in slides, don't use the form "43/300". Instead, just put the current page number or leave it out altogether.

      --
      print "Just Another Perl Adept\n";

Re: (OT) Presenations Involving Code
by graff (Chancellor) on Mar 07, 2007 at 17:52 UTC
    You might want to find out whether the machine in the lecture room will have internet access, and if so, perhaps it wouldn't be too ambitious to set up some sort of demo web site that will display some canned perl script(s) with instructive inputs and outputs. I guess if you're lecturing about a module that provides a wrapper for a commercial web-based API, having internet access would be really nice.

    In the absence of that, I'm not sure where to go -- grab some screen shots and just present those as images?

      In my experience, never ever make internet access essential to any presentation. Ideally, the complete presentation is self-contained and doesn't need anything beyond the presentation program to be installed in the default manner. Relying on an internet connection or an (unknown) Perl installation is just asking for trouble if you can't test it beforehand.

      I always have a static backup when doing live demos, because live demos are prone to failure. Displaying screenshots that do the "walk through" through the live demo is almost as good, and is a safe-way fallback. If you can't do it with screenshots, consider doing it as a video but consider what kind of codec you use to encode the screencast video.

        In my experience, never ever make internet access essential to any presentation. Ideally, the complete presentation is self-contained and doesn't need anything beyond the presentation program to be installed in the default manner. Relying on an internet connection or an (unknown) Perl installation is just asking for trouble if you can't test it beforehand.

        In the past, when overhead projectors were available, I would also make overhead slides. My basic rule of thumb is to assume that anything under your control may fail and anything not under your control will fail. Ensure that you have fallbacks almost up to the rediculous. Only you can decide what the rediculous is :)

        --MidLifeXis

      Or even access for a USB keychain ... it's amazing what you can fit on those things these days.

      -derby

        Or burn your own Ubuntu (or knoppix, or insert your favourite OS here . . . ) distro onto a livecd and boot your whole demo environment off that on their equipment.

Re: (OT) Presenations Involving Code
by perrin (Chancellor) on Mar 07, 2007 at 21:46 UTC
    It sounds to me like any one of those applications would be fine for presenting code. Probably Acrobat is the easiest one to dump the code into. Or use perltidy's HTML generation to make pretty color-coded HTML pages out of your code and bring them on a disk. You can be sure there will be a web browser on the machine.
      That's exactly the nudge I was looking for. Turns out Komodo (my editor of preference) has a nice "Print to HTML file..." function that prints the code exactly as I'm used to seeing it with the syntax highlighting from Komodo and line numbers too boot.

      Cheers,

      Brent

      -- Yeah, I'm a Delt.
        Eclipse with the Epic plugin can do the same.
        Menu: Source->Export->HTML
        Not implemented in perl, but i've discovered that pygments is a very good syntax highlighter, I like to install it along with my trac installations so i get highlighting on the browse source pages. Not sure how to use it outside trac honestly, but I bet you can find a command that will print an html-highlighted version of any input file.

        It's not what you look like, when you're doin' what you’re doin'.
        It's what you’re doin' when you’re doin' what you look like you’re doin'!
             - Charles Wright & the Watts 103rd Street Rhythm Band, Express yourself
Re: (OT) Presentations Involving Code
by zentara (Archbishop) on Mar 08, 2007 at 13:33 UTC
    The command
    # to test, will open in gv a2ps -P display --pretty-print=perl --prolog=color script.pl # to print a2ps -P lp0 --pretty-print=perl --prolog=color script.pl
    will make nice booklet style code printouts. There is an -r setting for how many pages per sheet. I havn't done it in awhile, but I seem to remember there is a way to print 2 sides, so you can fold the sheets into a booklet. Maybe google will reveal the technique. Or maybe OpenOffice does booklets.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re: (OT) Presenations Involving Code
by dws (Chancellor) on Mar 08, 2007 at 01:26 UTC

    Use a font size that's at least 60% larger than normal, so that people can read the code even if they're several rows back. You might have to wrap to a smaller line width.

Re: (OT) Presentations Involving Code
by rvosa (Curate) on Mar 12, 2007 at 01:14 UTC
    I'd be curious to hear if the audience is at all Perl savvy? And even if they are, whether they can process any code beamed onto a screen?

    On a number of occasions, I've listened to, and given, presentations to a mixed crowd of programmers (java/python/perl/ruby/etc), and regardless of the language, people just can't handle staring at code. Even python.

    I second that, at most, you'll want to have three lines of code per slide (I'd go with pdf files, by the way - from latex, or html or whatever, but it just seems the most portable).

    Perhaps fill your slides with flowcharts (UML), inheritance trees (doxyperl) and stuff like that instead? It's easy to assume people can pick up all the stuff that you have inside your head and jump right into parsing code that applies to your problem domain, but that just never quite happens.
Re: (OT) Presentations Involving Code
by brusimm (Pilgrim) on Mar 11, 2007 at 06:58 UTC
    Screen shots of your code can be pasted into PowerPoint.
    Multiple versions of your presentation in multiple formats.
    On multiple CD's.
Re: (OT) Presentations Involving Code
by radiantmatrix (Parson) on Mar 14, 2007 at 14:26 UTC

    I've been presented with this problem before. I have two solutions, both of which use my favorite "quick-n-dirty" editor, SciTE (free and open-source).

    First, SciTE is available as (among other things) a statically-linked, single-file executable for Windows. It's possible you'd be allowed to run that (and thus get a syntax-highlighting editor to display your code) off a USB flash drive, since it requires no installation.

    Failing that, your second option using SciTE is to use its capability to export highlighted source code to RTF, HTML, PDF, etc. for display in the appropriate viewer.

    Personally, I like to export to RTF, paginate by hand (for presentations, I don't like subs spanning pages, and I like to use landscape orientation), then convert to PDF for presentation. However, if you're confident you'll have Word available, I've found it quite instructive to save the RTF as a DOC and annotate it in the margins.

    <radiant.matrix>
    Ramblings and references
    The Code that can be seen is not the true Code
    I haven't found a problem yet that can't be solved by a well-placed trebuchet

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://603645]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found