Free Software Engineering Book providing principles and best practices of SWE in a world of AI
Python
6
85 commits
updated Jul 27, 2026
First Edition, 1.0b16.
📖 Read the book online at www.swebook.org.
This book is freely available and openly licensed, providing instruction in the principles and best practices of modern software engineering: how software is built in industry using agile methods, how to discover and analyze requirements, how to design and architect modular systems, how to check and test code, and how to measure quality with metrics.
The book is structured into fifteen chapters and a team project appendix, following the topic progression of the ACM/IEEE software‑engineering curriculum guidelines (SE2014/SEEK).1 Each chapter contains original explanatory prose rather than material copied from other textbooks and is accompanied by a curated map of free or openly accessible resources — MOOCs, university courseware, primary specifications, and papers — with licenses noted where known. The material is designed to support a complete software‑engineering course.
An independent open educational resource. This is a complete, standalone book. Except for clearly attributed quotations and linked external resources, its explanatory prose, examples, diagrams, and exercises are original, and the book is released under Creative Commons. See
curriculum/open-resources-map.mdfor the mapping from each chapter to complementary open materials. The prose was drafted with AI assistance under the author's direction, review, and fact-checking — see How this book was made below.
This book is intended for upper-division undergraduate students who have completed at
least two programming courses and are comfortable reading modular or object-oriented
code, using a command line, and working with basic data structures. Prior experience with
Git, automated testing, statistics, or cloud deployment is helpful but not required —
each is taught from first principles in its chapter. Instructors will find ready-made
course plans in curriculum/course-plan.md; self-learners
can follow the suggested paths below.
Most significant software is developed by teams, under evolving requirements, and with inevitable defects, at a scale that exceeds the capacity of any individual to fully comprehend. A typical programming course teaches students to write individual functions, whereas a software engineering course instructs students in building and evolving complete systems collaboratively. The discipline emphasizes enduring principles over proficiency in any single programming language:
These four foundational concepts are integrated throughout every chapter.
The chapters are organized into thematic arcs:
| Arc | Chapters | Question it answers |
|---|---|---|
| Getting started | 1–2 | What is software engineering, and what process do we use? |
| What to build | 3–5 | How do we discover, analyze, and specify requirements? |
| Design & architecture | 6–7 | How do we structure a system to tame complexity? |
| Version control | 8 | How do teams manage, review, and collaborate on a shared codebase? |
| Software quality | 9–10 | How do we check and test that the system works? |
| Security | 11 | How do we build software that resists attack, from the code to the supply chain? |
| Metrics | 12 | How do we measure quality and track progress? |
| The AI shift | 13 | How is AI reshaping every stage — and what stays the same? |
| Delivery | 14 | How does code get from a merged branch to running safely in production? |
| Evolution | 15 | How does code stay changeable through years of maintenance and growth? |
| Practice | Appendix A | How do we run a real team project alongside the concepts? |
curriculum/course-plan.md.Every code example in the book is provided in Python, Java, JavaScript, Go, Ruby,
and TypeScript, plus a language-agnostic Generic tab written in pseudocode, behind
language tabs — pick your language once and the whole site follows
(or open any page with ?lang=go to pre-select one). Each snippet also lives in
code/ as a runnable file with a test, executed by continuous integration on
every change.
The book is also available as an EPUB and a PDF, one edition per language plus a Generic (pseudocode) edition — identical prose, published with each tagged release:
EPUB: Generic · Python · Java · JavaScript · Go · Ruby · TypeScript PDF: Generic · Python · Java · JavaScript · Go · Ruby · TypeScript
All editions, including past versions, are on the releases page.
The sidebar provides a complete, linked table of contents, including chapters and sections. Alternatively, readers may begin with any chapter of interest:
curriculum/course-plan.md. Run the team project from
Appendix A on a parallel track. Reusable document templates (idea pitch, proposal,
sprint and status reports, team review, final report, individual write-up) are linked
from Appendix A.CONTRIBUTING.md. This resource is intended to be a
living, community‑improved resource..claude/skills/repo-scorecard/
— instructions an AI coding agent follows, with two modes. Adopt writes the book's
practices into your project's AGENTS.md (TDD, BDD, requirements, design, commits,
security, CI/CD, stewardship, and a definition of done), tailored to your stack and
working on a new or existing project. Score then audits the repository against the
nine parts of the book that cover the software lifecycle, returning a letter grade per
area and findings that cite the chapter teaching each fix. Copy the folder into your
project and ask your agent to set it up or score it; setup is in
AGENTS.md
and the classroom workflow is in
Appendix A §A.6. Students can track progress across
sprints; practitioners can switch scoring to a practitioner profile that weights
quality, security, and delivery more heavily. It is plain Python, runs offline, and
uploads nothing.The chapters are plain Markdown and render on GitHub as‑is. To build a browsable
website with mdBook (for a PDF, print the
site's built-in print page from your browser):
cargo install mdbook mdbook-mermaid # one-time
mdbook serve # live preview at http://localhost:3000
mdbook build # outputs static site to ./book-output
SUMMARY.md is the mdBook table of contents; book.toml holds configuration.
This book was written in collaboration with an AI assistant (Anthropic's Claude) under the author's direction. The author set the scope, chapter progression, and course alignment; supplied source material and corrections; fact-checked claims against the primary sources cited in each chapter's Open Resources page; and edited the prose throughout. The author has reviewed, and stands behind, every chapter. If you find an error, please open an issue, regardless of how it was introduced.
Chapter 13 teaches that professional AI use means disclosing the assistance, verifying the output, and owning the result. This note applies that standard to the book itself.
Thomas Hastings teaches software engineering at the University of Colorado Colorado Springs. This book started as part of his combined undergraduate and graduate course, CS 4300/5300. He also serves as an assistant professor (reservist) at the United States Air Force Academy, where he teaches in the Department of Computer and Cyber Sciences. He earned his Ph.D. in Engineering and M.Eng. in Software Engineering from UCCS, and his B.S. from Colorado Christian University. His research focuses on open-source software security and software supply chains, including the continuous verification of components.
The focus on testing, delivery, and running code in this book comes from real-world experience. Thomas has worked as a software engineer for over twenty years and is currently at Amazon Web Services. He keeps this book as an open, ongoing project. The views in this book are his own and do not reflect those of his employers.
Links: Google Scholar · tom.hastings.dev · GitHub
If it helped you learn a topic, teach a course, or build something, the most useful thing you can do in return is star the repository on GitHub — it takes a second, and a star is how I get to see who the book is reaching: students, instructors, teams, and self‑learners. Knowing where it lands is what tells me the work is worth continuing, and it shapes what I write and fix next. If you have a moment for more than a click, I would genuinely love to hear how you are using it — a quick note in an issue naming your course, team, or project makes my week.
If you use this book in a course or reference it in your writing, please cite it.
GitHub's "Cite this repository" button (from CITATION.cff) gives
APA and BibTeX directly, or copy the BibTeX below.
Whole book:
@book{hastings2026swe,
author = {Hastings, Thomas},
title = {Software Engineering: Standing on the Shoulders of Giants},
year = {2026},
publisher = {Self-published},
url = {https://www.swebook.org/},
note = {Open textbook, licensed CC BY-SA 4.0. Source:
\url{https://github.com/tghastings/open-swe-book}}
}
A single chapter (adjust title, chapter, and url):
@inbook{hastings2026swe-ch14,
author = {Hastings, Thomas},
title = {Delivery: CI/CD, DevOps, and Operations},
booktitle = {Software Engineering: Standing on the Shoulders of Giants},
chapter = {14},
year = {2026},
publisher = {Self-published},
url = {https://www.swebook.org/chapters/14-delivery/}
}
The \url in note needs \usepackage{url} (or hyperref) in your LaTeX preamble;
with biblatex you can move it to a urldate/addendum field instead. If you use a
classic BibTeX style (plain, plainnat), swap @inbook for @incollection — those
styles ignore booktitle inside @inbook.
Copyright © 2026 Thomas Hastings. Unless otherwise noted, the text and figures are
licensed CC BY‑SA 4.0; code examples are licensed MIT. You are free to
share and adapt with attribution. All trademarks, product names, and company names are the
property of their respective owners and are used for identification and educational
purposes only. See also the LICENSE file.
ACM/IEEE‑CS Joint Task Force on Computing Curricula, Software Engineering 2014: Curriculum Guidelines for Undergraduate Degree Programs in Software Engineering (SE2014), which defines the SEEK body of knowledge. acm.org/education/curricula-recommendations. ↩
64 commits
21 commits
Python
31.2%
TeX
11.1%
JavaScript
10.9%
Java
8.7%
Go
8.0%
TypeScript
7.4%
Ruby
6.7%
HTML
6.0%
Shell
5.5%
CSS
3.8%
Free Software Engineering Book providing principles and best practices of SWE in a world of AI
Python
6
85 commits
updated Jul 27, 2026
First Edition, 1.0b16.
📖 Read the book online at www.swebook.org.
This book is freely available and openly licensed, providing instruction in the principles and best practices of modern software engineering: how software is built in industry using agile methods, how to discover and analyze requirements, how to design and architect modular systems, how to check and test code, and how to measure quality with metrics.
The book is structured into fifteen chapters and a team project appendix, following the topic progression of the ACM/IEEE software‑engineering curriculum guidelines (SE2014/SEEK).1 Each chapter contains original explanatory prose rather than material copied from other textbooks and is accompanied by a curated map of free or openly accessible resources — MOOCs, university courseware, primary specifications, and papers — with licenses noted where known. The material is designed to support a complete software‑engineering course.
An independent open educational resource. This is a complete, standalone book. Except for clearly attributed quotations and linked external resources, its explanatory prose, examples, diagrams, and exercises are original, and the book is released under Creative Commons. See
curriculum/open-resources-map.mdfor the mapping from each chapter to complementary open materials. The prose was drafted with AI assistance under the author's direction, review, and fact-checking — see How this book was made below.
This book is intended for upper-division undergraduate students who have completed at
least two programming courses and are comfortable reading modular or object-oriented
code, using a command line, and working with basic data structures. Prior experience with
Git, automated testing, statistics, or cloud deployment is helpful but not required —
each is taught from first principles in its chapter. Instructors will find ready-made
course plans in curriculum/course-plan.md; self-learners
can follow the suggested paths below.
Most significant software is developed by teams, under evolving requirements, and with inevitable defects, at a scale that exceeds the capacity of any individual to fully comprehend. A typical programming course teaches students to write individual functions, whereas a software engineering course instructs students in building and evolving complete systems collaboratively. The discipline emphasizes enduring principles over proficiency in any single programming language:
These four foundational concepts are integrated throughout every chapter.
The chapters are organized into thematic arcs:
| Arc | Chapters | Question it answers |
|---|---|---|
| Getting started | 1–2 | What is software engineering, and what process do we use? |
| What to build | 3–5 | How do we discover, analyze, and specify requirements? |
| Design & architecture | 6–7 | How do we structure a system to tame complexity? |
| Version control | 8 | How do teams manage, review, and collaborate on a shared codebase? |
| Software quality | 9–10 | How do we check and test that the system works? |
| Security | 11 | How do we build software that resists attack, from the code to the supply chain? |
| Metrics | 12 | How do we measure quality and track progress? |
| The AI shift | 13 | How is AI reshaping every stage — and what stays the same? |
| Delivery | 14 | How does code get from a merged branch to running safely in production? |
| Evolution | 15 | How does code stay changeable through years of maintenance and growth? |
| Practice | Appendix A | How do we run a real team project alongside the concepts? |
curriculum/course-plan.md.Every code example in the book is provided in Python, Java, JavaScript, Go, Ruby,
and TypeScript, plus a language-agnostic Generic tab written in pseudocode, behind
language tabs — pick your language once and the whole site follows
(or open any page with ?lang=go to pre-select one). Each snippet also lives in
code/ as a runnable file with a test, executed by continuous integration on
every change.
The book is also available as an EPUB and a PDF, one edition per language plus a Generic (pseudocode) edition — identical prose, published with each tagged release:
EPUB: Generic · Python · Java · JavaScript · Go · Ruby · TypeScript PDF: Generic · Python · Java · JavaScript · Go · Ruby · TypeScript
All editions, including past versions, are on the releases page.
The sidebar provides a complete, linked table of contents, including chapters and sections. Alternatively, readers may begin with any chapter of interest:
curriculum/course-plan.md. Run the team project from
Appendix A on a parallel track. Reusable document templates (idea pitch, proposal,
sprint and status reports, team review, final report, individual write-up) are linked
from Appendix A.CONTRIBUTING.md. This resource is intended to be a
living, community‑improved resource..claude/skills/repo-scorecard/
— instructions an AI coding agent follows, with two modes. Adopt writes the book's
practices into your project's AGENTS.md (TDD, BDD, requirements, design, commits,
security, CI/CD, stewardship, and a definition of done), tailored to your stack and
working on a new or existing project. Score then audits the repository against the
nine parts of the book that cover the software lifecycle, returning a letter grade per
area and findings that cite the chapter teaching each fix. Copy the folder into your
project and ask your agent to set it up or score it; setup is in
AGENTS.md
and the classroom workflow is in
Appendix A §A.6. Students can track progress across
sprints; practitioners can switch scoring to a practitioner profile that weights
quality, security, and delivery more heavily. It is plain Python, runs offline, and
uploads nothing.The chapters are plain Markdown and render on GitHub as‑is. To build a browsable
website with mdBook (for a PDF, print the
site's built-in print page from your browser):
cargo install mdbook mdbook-mermaid # one-time
mdbook serve # live preview at http://localhost:3000
mdbook build # outputs static site to ./book-output
SUMMARY.md is the mdBook table of contents; book.toml holds configuration.
This book was written in collaboration with an AI assistant (Anthropic's Claude) under the author's direction. The author set the scope, chapter progression, and course alignment; supplied source material and corrections; fact-checked claims against the primary sources cited in each chapter's Open Resources page; and edited the prose throughout. The author has reviewed, and stands behind, every chapter. If you find an error, please open an issue, regardless of how it was introduced.
Chapter 13 teaches that professional AI use means disclosing the assistance, verifying the output, and owning the result. This note applies that standard to the book itself.
Thomas Hastings teaches software engineering at the University of Colorado Colorado Springs. This book started as part of his combined undergraduate and graduate course, CS 4300/5300. He also serves as an assistant professor (reservist) at the United States Air Force Academy, where he teaches in the Department of Computer and Cyber Sciences. He earned his Ph.D. in Engineering and M.Eng. in Software Engineering from UCCS, and his B.S. from Colorado Christian University. His research focuses on open-source software security and software supply chains, including the continuous verification of components.
The focus on testing, delivery, and running code in this book comes from real-world experience. Thomas has worked as a software engineer for over twenty years and is currently at Amazon Web Services. He keeps this book as an open, ongoing project. The views in this book are his own and do not reflect those of his employers.
Links: Google Scholar · tom.hastings.dev · GitHub
If it helped you learn a topic, teach a course, or build something, the most useful thing you can do in return is star the repository on GitHub — it takes a second, and a star is how I get to see who the book is reaching: students, instructors, teams, and self‑learners. Knowing where it lands is what tells me the work is worth continuing, and it shapes what I write and fix next. If you have a moment for more than a click, I would genuinely love to hear how you are using it — a quick note in an issue naming your course, team, or project makes my week.
If you use this book in a course or reference it in your writing, please cite it.
GitHub's "Cite this repository" button (from CITATION.cff) gives
APA and BibTeX directly, or copy the BibTeX below.
Whole book:
@book{hastings2026swe,
author = {Hastings, Thomas},
title = {Software Engineering: Standing on the Shoulders of Giants},
year = {2026},
publisher = {Self-published},
url = {https://www.swebook.org/},
note = {Open textbook, licensed CC BY-SA 4.0. Source:
\url{https://github.com/tghastings/open-swe-book}}
}
A single chapter (adjust title, chapter, and url):
@inbook{hastings2026swe-ch14,
author = {Hastings, Thomas},
title = {Delivery: CI/CD, DevOps, and Operations},
booktitle = {Software Engineering: Standing on the Shoulders of Giants},
chapter = {14},
year = {2026},
publisher = {Self-published},
url = {https://www.swebook.org/chapters/14-delivery/}
}
The \url in note needs \usepackage{url} (or hyperref) in your LaTeX preamble;
with biblatex you can move it to a urldate/addendum field instead. If you use a
classic BibTeX style (plain, plainnat), swap @inbook for @incollection — those
styles ignore booktitle inside @inbook.
Copyright © 2026 Thomas Hastings. Unless otherwise noted, the text and figures are
licensed CC BY‑SA 4.0; code examples are licensed MIT. You are free to
share and adapt with attribution. All trademarks, product names, and company names are the
property of their respective owners and are used for identification and educational
purposes only. See also the LICENSE file.
ACM/IEEE‑CS Joint Task Force on Computing Curricula, Software Engineering 2014: Curriculum Guidelines for Undergraduate Degree Programs in Software Engineering (SE2014), which defines the SEEK body of knowledge. acm.org/education/curricula-recommendations. ↩
64 commits
21 commits
Python
31.2%
TeX
11.1%
JavaScript
10.9%
Java
8.7%
Go
8.0%
TypeScript
7.4%
Ruby
6.7%
HTML
6.0%
Shell
5.5%
CSS
3.8%