Muli Ben-Yehuda's journal

January 26, 2004

Filed under: Uncategorized — Muli Ben-Yehuda @ 11:09 AM

When writing slides for a talk that includes a lot of code, is it better to accompany each slide of code with a slide of explanation, or just intermingle the explanation with the code, in the form of copious comments? I’m leaning towards the comments form, but I’m open to persuasion either way. What do y’all think?

16 Comments »

  1. My suggestion: Just show the code. Any explanations you have to give, give orally while pointing at the code that is up on the screen.
    This way the slides make your life easier instead of more difficult.
    Warning: When I give lectures, slides barely contain text. Just pictures, charts, diagrams, code samples, particularly hairy equations and very important results. Whatever textual information I have to give, I just say it.
    I think this is the important difference between a lecture and an article – that you can actually show one thing and say another.

    Comment by shapirac — January 26, 2004 @ 2:35 AM | Reply

    • It depends on the audience. Experienced hackers or budding developers. If they are budding developers, I suggest you go for a more visual (code + explanation on the same slide, rather than code on one slide, explanation on another). This way, the audience will be able to comprehend better, and less people will fall asleep. Also, it depends whether you have an intention to publish your slides online for people to download *hint* *hint*. It makes more sense to be as “verbose” as possible.
      Chen – I would do the same as you if my lectures are not graded 🙂

      Comment by ideawerkz — January 26, 2004 @ 2:41 AM | Reply

      • slides are available, with much more explanations then usual, just for you 🙂

        Comment by mulix — January 26, 2004 @ 4:50 PM

      • I am so touched 🙂

        Comment by ideawerkz — January 26, 2004 @ 5:13 PM

    • I think Chen is write, just write the code and give the explenation orally.
      However it would be good if the code contain few short comments in it.
      I also think that slides should not contain the whole lecture just the topics of each section.
      If the slides contain to much text, listeners are either busy reading the text or busy listenning to you so either they don’t listen or not read…

      Comment by hary_i — January 26, 2004 @ 11:13 AM | Reply

    • That’s what I usually do, but I have a feeling that this time it won’t do, due to the audience and circumstances. I ended up with a compromise I don’t particularly like, slides with unmodified code (barely commented) and then a slide of explanations. I’ll probably just skip the slide of explanations during the presentation, explaining the code as I go along instead.

      Comment by mulix — January 26, 2004 @ 4:49 PM | Reply

  2. Perhaps put the code and explanation on the same slide, but distinguish them visually, e.g. put code on the left and explanations on the right, or stash explanations into speech bubbles emanating from code.

    Comment by bicoherent — January 26, 2004 @ 2:44 AM | Reply

    • That’s a good idea, I’ve seen it implemented to good effect a few times. Unfortunately, doing it with my prefer presentation authoring tool (LaTeX) is … non-trivial. Thanks!

      Comment by mulix — January 26, 2004 @ 4:51 PM | Reply

  3. steven on slide shows
    Do not, under any circumstances, ever put the code on a slide.
    Here’s the thing. The slides are NOT the presentation. The slides are meant to accompany the presentation, to illustrate your points, not to take the place of it. If they are there squinting and trying to follow the code, they’re not listening to what you have to say.
    I may have over-stated the case a bit. If there’s, say, half a dozen lines of code or less on a given slide that illustrate either a particularly tricky or interesting bit, that’s okay. More than that, you’re only hurting your presentation.

    Comment by stevenredux — January 26, 2004 @ 6:13 AM | Reply

    • Re: steven on slide shows
      Thanks for your comments! I understand completely what you’re saying, but after thinking about it today, I realized taht in this case, where the presentation is actually a lesson, not having the code on the slides would be counter productive, since I will need to show it anyway during the class. For the general case, I agree with you 100%.

      Comment by mulix — January 26, 2004 @ 4:59 PM | Reply

      • Re: steven on slide shows
        I’ve been thinking, while you’ve been writing about this talk you’re giving. It may be somewhat more technical than what we do over at LWM, but would you consider adopting your talk into an article? If yes, drop me an e-mail and we’ll see what we can do.

        Comment by stevenredux — January 26, 2004 @ 5:03 PM

  4. the lecture in the technion
    Hi, i was wondering, at what date/time/building/room will your lecture take place?

    Comment by Anonymous — January 26, 2004 @ 2:17 PM | Reply

    • Re: the lecture in the technion
      Wednesday, Jan 28, Churchill Hall, 1030 AM. See you there…

      Comment by mulix — January 26, 2004 @ 5:20 PM | Reply

  5. Depends
    It really depends on how big the code snippets are.
    If it’s a 3-4 line thing, I prefer to put it in the middle of the slide.
    If it’s a 10 line thing, I try hard to avoid it. If I can’t, I try hard to see if there’s a decent split. If I can’t, I’d put it on its own slide, and plan on plenty of jumping back and forth between the following commentary slide and the code slide.

    Comment by moshez — January 26, 2004 @ 11:36 PM | Reply

  6. I’d put the code on the slide by itself and just explain it while people are looking it. You could even use one of those red laser pointers.

    Comment by 77azkkr — January 28, 2004 @ 6:32 AM | Reply

    • That’s what I ended up doing, laser pointer included. Cheers!

      Comment by mulix — January 28, 2004 @ 3:58 PM | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: