At the heart of the book is the Deitel signature “live-code approach.” Concepts are presented in the context of complete working programs, rather than in code snippets

What's the meaning of "live-code approach" in the context?

  • 3
    I think this is probably too localized of a question but FYI I'll answer it anyway: Programming books are known for showing only a tiny bit of example code (a "code snippet"), often created artificially for the sake of illustrating the example. The "live-code" approach is the name that Paul Deitel coined (or at least took over) for his way of showing more complete "real life" examples that use snippets from more realistic working programs.
    – Lynn
    Commented Dec 10, 2011 at 2:27

4 Answers 4


The answer is already in your question.

Concepts are presented in the context of complete working programs, rather than in code snippets.

It says that the examples presented in the book are complete working programs = live programs, compared to code snippets, which are just chunks of code which doesn't work by itself and therefore is dead.

Live-code approach: complete working program, whole code. Be aware that this is neither a coined phrase, nor a specific coding term. That's why the author had to explain themselves in the second sentence.


From this Deitel page:

Small Java How to Program, 6/e, is loaded with Live-Code examples—each new concept is presented in the context of a complete, working Java application that is immediately followed by one or more sample executions showing the program’s inputs and outputs.... The book contains 72 complete Live-Code examples consisting of 4917 lines of code

I have not read either the Java or the C++ texts, which seem to be aimed toward Computer Science 101 classes. I am inferring that Live-Code gives complete programs that provide more context and utility to the learner.

The opposite of their coined term, live-code, would be a code snippet. Since the snippet lacks context, it may be more difficult to know how to apply the concept being presented.

  • It's not clear to me whether the opposite of "live code" here would be "pseudocode" or "code snippets." Probably both. Commented Dec 10, 2011 at 16:26

Live here is used to mean:

2e. being in operation (a live microphone) [M-W]

So the sense of the quoted phrase "live-code approach" is exactly as described by the second sentence in the passage. This is not, to my knowledge, a standard phrase, and the quote marks indicate that the phrase has been invented for this specific purpose.


Live code is a complete program. If you create a project and paste the live code there, it works. But, the code snippets is a part of the whole code. You need to write the rest of the code in order to run the snippet code.

  • Your answer would be greatly improved by references.
    – Laurel
    Commented Sep 4, 2016 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.