I am doing a technical presentation on Minimizing Real-Time Data Stream Latency: Node.js and Asynchronous Operations. I've done some thorough research on the topic and I want to add some code blocks to a few slides to visually show Asynch Programming in Node.js as well as to visually show pros and cons.

The presentation is for 30–40 minutes. I want to keep it to about 10–12 slides.


  • Is it appropriate to add code blocks to some slides?
  • If it is appropriate, how many slides is too much?
  • 1
    I use the pseudo-code (LaTeX style) which goes into my papers. I felt that the audience finds it easier to grasp.
    – pnp
    Mar 2, 2015 at 5:09
  • 4
    This was cross-posted in Workplace... please don't do that, users frequent both areas. Thanks!
    – eykanal
    Mar 2, 2015 at 14:30

5 Answers 5


If it is a technical talk on a particular library then yes, code is appropriate, and in some cases - even recommended (as opposed to hand waving).


  • keep it readable (big font, syntax highlighting, reasonable variable names),
  • keep it short (examples as minimal as possible),
  • give enough time to read and understand it.

Some examples how it is being done: this slide or for async JS: this presentation.


It may or may not be appropriate, depending on your audience (I also feel this way about equations). A couple things to keep in mind:

  1. If you have non-technical people in your audience, you'll likely lose them for these slides, and there's a risk you'll lose them entirely.
  2. Even if people are technically-inclined, they now need to read your code block, interpret it in their mind, and think about it long enough to see your point. And they'll have the distraction of you talking to them at the time. That's a pretty steep thing to ask your audience to do.

Generally, I think you'll likely be better served talking about these issues conceptually, rather than with code, which will require people to wade through it. If you must include code blocks, make sure they are clear, in a very recognizable style (no personal quirks or idioms, clear variable names, etc.) and clearly annotated as you walk through it.

But honestly, I don't think I've ever seen a talk with code-as-content (beyond "These 2 lines instead of these 15!") that I thought was aided by having it there.

  • 1
    This audience is extremely technical...The majority are engineering doctors I believe if that makes a difference. The job interview is for an entry position software applications developer at a very reputable organization if that makes a diff.
    – J.S.Orris
    Mar 2, 2015 at 2:52

I suggest testing your slide, using colleagues with similar skills to the target audience. As Fomite pointed out in a prior answer, listening to a speaker and reading code can be difficult to do at the same time.

One option would be to allow time for the code reading: "Please examine this code block" followed by a pause. You can find out how long a pause is needed by observing your test audience. If you cannot afford to allow enough time to read and understand the code, get rid of it.


Complicated concepts are often best explained with a figures. Try representing synchronous & asynchronous data-stream packets as boxes traveling along a line. Coupling this with a few lines of pseudo-code, might allow you to explain your algorithm's superiority.



This demonstration of your knowledge / problem solving skills goes along way towards recommending you for a job. And remember, it is all about clear communication -- not about trying to impress (or confuse) anyone.


It is almost never appropriate to put code in your slides, psudo-code or not. This has nothing to do with the level of technical finesse of your slides, and everything to do with whether or not it is a good presentation that your audience can follow. Most of the time, you will want to represent your ideas graphically, not textually.

A slide-based presentation is a visual medium, supplemented by what you have to say about each slide. The content should largely be bold-print headers and visual representations of your concept - not large chunks of text that your audience is not likely to read in the time it is on the screen anyway.

One case in which you could justify the inclusion of code is if you plan to go over each step of the code line-by-line, or as a side-by-side comparison, and then only if you are willing to guide your audience through every single step, preferably with a laser pointer or other type of pointer to indicate how each part of the code is relevant.

Even then, I would not recommend including more than a few lines of code - text is very difficult to focus on during a presentation when the presenter is speaking, unless they are explaining the text to the viewer. The larger the block of text, the more explanation will be required, and the less interest your viewers will have.

As a technical presentation, if it is strictly necessary to include an example, then there is no question - you will have to include it, and find a way to explain it within your allotted presentation time. But if you have the option, a visual representation with a flowchart or some other graphic medium would be better suited to a slide-presentation style.

(Note: If it is not actually a 'presentation' and is meant to be a handout to others, disregard this and include some examples, but do not go over them too much during the actual presentation unless absolutely required.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .