liveBook · Manning

Imperative programming

Also called imperative approach, imperative style, imperative model, imperative paradigm

Imperative programming is a programming paradigm that expresses computation as ordered commands or instructions that direct execution or change state.

How 16 Manning books explain it

The Art of Code

Imperative style structures computation as explicit commands and control-flow statements that change or inspect state.

How it is used
Contrasts explicit step-by-step control with functional transformations when choosing a coding style.
How deep it goes
Defines control flow and mutable state, then compares implementations and discusses readability, side effects, and performance.
Examples
Uses word filtering and uppercase conversion, plus a people-analysis loop compared with stream operations.
What you can do after
Evaluate imperative and functional approaches for clarity, necessary effects, mutation, and workload-sensitive performance.

Read how The Art of Code explains imperative programming →

Acing the Frontend Interview

Imperative programming specifies the step-by-step operations required to produce a result, including direct interface mutations.

How it is used
Frames manual DOM manipulation as the contrasting approach when evaluating understanding of React’s declarative UI model.
How deep it goes
Defines step-by-step DOM updates and compares their trade-offs, but stops short of detailed imperative implementation.
Examples
Uses document.createElement(), appendChild(), JSX list rendering, and a declarative-versus-imperative comparison table.
What you can do after
Evaluate and explain imperative versus declarative UI approaches in React-focused technical interviews.

Read how Acing the Frontend Interview explains imperative programming →

Functional Programming in JavaScript

A programming paradigm that specifies computation as a sequence of statements that change program state over time.

How it is used
Uses explicit statements, control flow, and state changes to describe how a computation proceeds.
How deep it goes
Defines the execution model and examines mutation, shared state, decomposition, side effects, and testing consequences.
Examples
Demonstrates array squaring, DOM output, a global counter, and the monolithic `showStudent` function.
What you can do after
Evaluate/understand how mutation, shared state, and execution order affect modularity and test reliability.

Read how Functional Programming in JavaScript explains imperative programming →

The Joy of JavaScript

A programming paradigm that describes computation as a sequence of commands that change program state.

How it is used
Organizes business logic as explicit commands that advance application or object state toward a desired outcome.
How deep it goes
Explains loops, conditionals, assignments, nesting, and refactoring tradeoffs, then stops short of deeper implementation internals.
Examples
Uses a blockchain wallet balance with ledger traversal, genesis-block filtering, transaction branching, and a mutable running total.
What you can do after
Evaluate/understand explicit control flow and compare its maintainability with composable functional alternatives.

Read how The Joy of JavaScript explains imperative programming →

Kubernetes for Developers

An imperative command directly instructs a system to perform an operational action rather than declaring the desired resulting state.

How it is used
Uses one-off kubectl commands to create, expose, update, scale, or directly mutate Kubernetes resources.
How deep it goes
Explains command examples and operational trade-offs, but stops short of detailing Kubernetes controller internals.
Examples
Demonstrates timeserver deployment, LoadBalancer exposure, image replacement, replica scaling, and Secret generation.
What you can do after
Operate/configure Kubernetes resources directly with kubectl commands and export resulting cluster configuration as YAML.

Read how Kubernetes for Developers explains imperative programming →

Quarkus in Action

Imperative code is code that expresses computation as an ordered sequence of commands that directly change program state.

How it is used
Uses ordered statements to implement application behavior and provides a familiar model within Quarkus applications.
How deep it goes
Defines sequential execution and explains blocking I/O consequences, but stops short of detailed imperative implementation syntax.
Examples
Uses Java entry-point execution and sequential database, filesystem, network, or message-broker I/O as concrete examples.
What you can do after
Apply it via Quarkus by writing sequential code, then combine it with reactive code or virtual threads when requirements change.

Read how Quarkus in Action explains imperative programming →

Kubernetes in Action, Second Edition

An imperative command directly instructs a system to perform a specified operation.

How it is used
Deploys an application quickly when avoiding manifest authoring is more useful than declaring every object structure.
How deep it goes
Explains command usage, desired state, status inspection, and startup events, but stops short of detailed manifest structure.
Examples
Uses kubectl create deployment with the Kiada application and inspects Deployment, Pod, and event output.
What you can do after
Apply it via kubectl to create a Deployment and inspect whether its application becomes running.

Read how Kubernetes in Action, Second Edition explains imperative programming →

Spring in Action, Sixth Edition

Imperative programming is a programming approach in which computation is expressed as an ordered sequence of commands that directly update state or perform actions.

How it is used
Contrasts sequential imperative execution with reactive pipelines to motivate when each programming model fits.
How deep it goes
Defines sequential execution and blocking, then stops short of explaining imperative implementation internals.
Examples
Uses a Java greeting that uppercases a name, constructs a message, and prints it through sequential statements.
What you can do after
Evaluate/understand how sequential tasks, complete data, and blocking distinguish imperative code from reactive pipelines.

Read how Spring in Action, Sixth Edition explains imperative programming →

Functional Design and Architecture: Examples in Haskell

A programming paradigm in which programs specify ordered operations that change data or produce side effects.

How it is used
Organizes programs as ordered instructions that change data or produce side effects, including in system-level code.
How deep it goes
Defines stepwise control and surveys loops, mutable data, pointers, procedures, eager computation, modularity, and opaque data types.
Examples
Uses a thermometer scenario with conditional alarms and database writes, then contrasts it with stream-based reasoning.
What you can do after
Evaluate whether sensor logic follows an imperative sequence and compare it with a stream-based alternative.

Read how Functional Design and Architecture: Examples in Haskell explains imperative programming →

Acing the Certified Kubernetes Administrator Exam, Second Edition

An imperative approach prescribes the specific commands or sequence of actions needed to produce a result.

How it is used
Contrasts sequential command execution with declarative Kubernetes configuration.
How deep it goes
Defines sequencing and names tracking, failure-detection, and ordering problems, but gives no detailed command sequence.
Examples
Uses sequential commands and contrasts them with a YAML manifest submitted through kubectl.
What you can do after
Evaluate/understand when sequential commands differ from describing a desired Kubernetes end state.

Read how Acing the Certified Kubernetes Administrator Exam, Second Edition explains imperative programming →

Functional Programming in C#, Second Edition

An imperative program is organized around commands that describe operations and may update state.

How it is used
Contrasts explicit state mutation with functional techniques to explain why concurrency can make imperative code harder to reason about.
How deep it goes
Defines imperative style as explicit state mutation and illustrates concurrent consequences, while deferring deeper discussion of state mutation and concurrency.
Examples
Uses parallel tasks that sum and sort a shared array, then contrasts LINQ OrderBy’s nonmutating result.
What you can do after
Evaluate how in-place mutation can make concurrent reads unpredictable and compare it with a nonmutating LINQ alternative.

Read how Functional Programming in C#, Second Edition explains imperative programming →

Functional Programming in Scala, Second Edition

Imperative programming is a programming paradigm that expresses computation as an ordered sequence of statements that may modify program state.

How it is used
Frames imperative style as a readable way to sequence State actions while preserving functional, side-effect-free state management.
How deep it goes
Defines ordered state-modifying statements, explains pure state threading, and demonstrates sequencing while deferring broader equational reasoning.
Examples
Uses random-number sequencing, list generation, modulo transformation, and stateful candy-machine simulation.
What you can do after
Apply it via State actions and Scala for-comprehensions to sequence stateful computations without side effects.

Read how Functional Programming in Scala, Second Edition explains imperative programming →

BDD in Action, Second Edition

Imperative programming style expresses computation as ordered commands that change program state.

How it is used
Frames computation and interaction as ordered, low-level instructions that specify how a task should be performed.
How deep it goes
Demonstrates the style through an average calculation and Gherkin interactions, then contrasts it with declarative expression.
Examples
Uses a running-total average calculation and a hotel-search scenario built from field entries and button clicks.
What you can do after
Evaluate/understand when procedural detail clarifies implementation and when it obscures business intent or increases maintenance.

Read how BDD in Action, Second Edition explains imperative programming →

F# in Action: A Revised Edition of Get Programming with F#

Imperative programming is a programming paradigm that specifies computation as step-by-step commands that change program state.

How it is used
Frames computation as explicit step-by-step control flow for implementing filters and collection queries.
How deep it goes
Explains loops, intermediate collections, mutation, and side effects, but stops short of language-runtime internals.
Examples
Uses even-number filtering and an away-win aggregation query built from loops, conditionals, mutable summaries, and searches.
What you can do after
Apply it via explicit loops, conditionals, intermediate collections, and state updates when implementing collection-processing tasks.

Read how F# in Action: A Revised Edition of Get Programming with F# explains imperative programming →

Modern C

Imperative programming is a programming paradigm in which programs specify operations and commands that change computational state to complete tasks.

How it is used
Uses ordered commands and statements to make a computer complete specific tasks.
How deep it goes
Defines the paradigm through one complete C example, stopping short of broader paradigm comparisons or implementation internals.
Examples
Uses a C program that loops over an initialized array, squares each value, and prints formatted results.
What you can do after
Evaluate how explicit C statements, loops, and function calls produce observable terminal output.

Read how Modern C explains imperative programming →

Modern C, Third Edition

A programming paradigm in which programs specify computations as ordered commands that change program state or direct execution.

How it is used
Uses ordered commands to make a computer complete specific tasks.
How deep it goes
Explains declarations, statements, function calls, arguments, expressions, and loops through one executable C example.
Examples
Demonstrates an array loop that prints five elements and their squares to a terminal.
What you can do after
Evaluate how C statements and function calls issue ordered commands and produce terminal output.

Read how Modern C, Third Edition explains imperative programming →

Also covered in

What to know first

Related concepts

Questions about imperative programming

What is imperative programming?

Imperative programming is a programming paradigm that expresses computation as ordered commands or instructions that direct execution or change state.

Which Manning books explain imperative programming?

The Art of Code, Acing the Frontend Interview, Functional Programming in JavaScript, The Joy of JavaScript, Kubernetes for Developers, Quarkus in Action, Kubernetes in Action, Second Edition, Spring in Action, Sixth Edition and 8 more.

What should I know before learning imperative programming?

Manning books that teach imperative programming usually introduce Document Object Model, versioning, filtering and loop first.

What is the difference between imperative programming and declarative programming?

Imperative programming is a programming paradigm that expresses computation as ordered commands or instructions that direct execution or change state. Declarative programming is a programming paradigm that specifies desired results, states, or relationships without prescribing the step-by-step procedure to achieve them.

What kinds of imperative programming are there?

Kinds of imperative programming include C++.

What is imperative programming also called?

Imperative programming is also called imperative approach, imperative style, imperative model or imperative paradigm.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.