Free books for software engineers.

Browse programming, mathematics, systems, and AI. Get PDFs or follow the links to book pages and companion materials.

Programming

Start here if you’re learning to write and debug programs.

  • Think Python

    Allen B. Downey2nd edition

    A first programming book. Work through functions, recursion, and objects in Python 3, with exercises that build on each chapter.

  • Eloquent JavaScript

    Marijn Haverbeke4th edition

    Learn modern JavaScript by building projects, from a robot that delivers mail to a browser game and a Node.js application.

Algorithms & data structures

Get better at choosing an approach and explaining why it works.

  • Open Data Structures

    Pat MorinJava edition

    Implement lists, hash tables, trees, and heaps in Java. Read this when you want to understand the trade-offs behind a standard library collection.

  • Algorithms

    Jeff Erickson1st edition

    Work through dynamic programming, greedy algorithms, and graph problems. A good next step once you’re comfortable with recursion and basic data structures.

  • Algorithmic Toolbox Notes

    Algorithmic Toolbox course team

    Practice implementing greedy algorithms, divide and conquer, and dynamic programming with the course’s programming exercises.

  • Algorithms Unlocked

    Thomas H. Cormen

    An introduction to the ideas behind everyday algorithms, including searching, sorting, and finding paths through graphs.

  • Introduction to Algorithms

    Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein4th edition

    Use this reference to work through algorithm analysis, correctness proofs, graph problems, and advanced data structures.

Systems, networking & security

Follow what happens when a program runs or sends data.

  • Think OS

    Allen B. DowneyAuthor’s draft

    Use small C programs to explore memory, processes, files, and threads. Start here if you want to understand what your operating system does for your code.

  • Beej’s Guide to Network Programming

    Brian “Beej” HallUsing Internet Sockets

    Build TCP and UDP clients and servers in C. The examples help make addresses, ports, and sockets concrete.

  • The Web Application Hacker’s Handbook

    Dafydd Stuttard and Marcus Pinto2nd edition

    A reference on the security assumptions behind web applications, including authentication, sessions, and access control.

Further reading

Go deeper into system design interviews, distributed data, and AI engineering with samples and companion resources.

  • System Design Interview

    Alex XuVolume 1

    Practice breaking down open-ended design problems. The book works through systems such as rate limiters, URL shorteners, and chat applications.

  • Designing Data-Intensive Applications

    Martin Kleppmann1st edition

    Use replication, partitioning, transactions, and stream processing to reason about trade-offs in data systems.

  • AI Engineering

    Chip Huyen2025

    Build applications with foundation models and learn how to evaluate them, improve their reliability, and manage latency and cost.

Mathematics

Work through calculus, linear algebra, and the mathematics behind machine learning.

  • Calculus

    Gilbert Strang

    Develop intuition for differentiation and integration, then use those ideas to study differential equations and functions of several variables.

  • Calculus, Volume 1

    Gilbert Strang and Edwin “Jed” Herman

    Build a foundation in limits, derivatives, and single-variable integration.

  • Calculus, Volume 2

    Gilbert Strang and Edwin “Jed” Herman

    Continue with techniques of integration, sequences and series, and parametric and polar curves.

  • Calculus, Volume 3

    Gilbert Strang and Edwin “Jed” Herman

    Study vectors, multivariable differentiation, multiple integrals, and vector calculus.

  • Linear Algebra for Everyone

    Gilbert Strang

    Start with column spaces and matrix factorizations, then connect them to least squares and the singular value decomposition.

  • Mathematics for Machine Learning

    Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong

    Review linear algebra, probability, and optimization before applying them to regression, PCA, and other models.

  • The Mathematics of Artificial Intelligence

    Gabriel PeyréSurvey paper

    A survey of the mathematical tools used to study neural networks, their training, and their behavior.

Data science & statistics

Build a foundation in probability, experiments, and practical analysis.

  • Data Science from Scratch

    Joel Grus2nd edition

    Implement statistics and machine learning methods in Python to see how they work before reaching for a library.

  • Practical Statistics for Data Scientists

    Peter Bruce and Andrew Bruce1st edition

    Use sampling, experiments, and regression to make better decisions with data.

  • Probability for Statistics and Machine Learning

    Anirban DasGupta

    An advanced reference on probability distributions, limit theorems, and probabilistic tools for statistical inference.

AI & machine learning

Start with general AI and machine learning, or go deeper into how neural networks work.

  • Artificial Intelligence: A Modern Approach

    Stuart Russell and Peter Norvig4th US edition

    A broad textbook on search, knowledge, planning, uncertainty, and learning in AI.

  • Foundations of Machine Learning

    Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar2nd edition

    Study generalization, complexity, and the guarantees behind common machine learning algorithms.

  • Hands-On Machine Learning

    Aurélien Géron

    Build end-to-end machine learning projects and use the author’s notebooks to practice training and evaluating models.

  • Deep Learning

    Ian Goodfellow, Yoshua Bengio, and Aaron Courville

    A reference on neural network fundamentals, optimization, regularization, and deep generative models.

NLP & language models

Follow the path from text processing to transformers and large language models.

  • Deep Learning for Natural Language Processing

    Mihai Surdeanu and Marco Antonio Valenzuela-Escárcega

    Follow worked examples of using neural networks for natural language processing.

  • Natural Language Processing with Transformers

    Lewis Tunstall, Leandro von Werra, and Thomas Wolf

    Work through practical transformer applications such as classification, summarization, and question answering.

  • Hands-On Large Language Models

    Jay Alammar and Maarten Grootendorst

    Use visual explanations and notebooks to study embeddings, text generation, and language model applications.

Probabilistic & reinforcement learning

Study uncertainty, inference, and decisions that unfold over time.

  • Probabilistic Machine Learning: An Introduction

    Kevin Patrick MurphyAuthor’s draft

    Connect probability and decision theory to regression, classification, neural networks, and unsupervised learning.

  • Probabilistic Machine Learning: Advanced Topics

    Kevin Patrick MurphyAuthor’s draft

    Go deeper into graphical models, approximate inference, generative models, and decision-making.

  • Reinforcement Learning: An Introduction

    Richard S. Sutton and Andrew G. Barto2nd edition

    Learn how agents use rewards to make decisions, from multi-armed bandits to temporal-difference learning and policy gradients.

  • Reinforcement Learning and Stochastic Optimization

    Warren B. Powell

    Compare approaches to sequential decisions under uncertainty, including policy search and lookahead methods.

Machine learning in finance

See how machine learning methods are adapted to financial data.

  • Advances in Financial Machine Learning

    Marcos López de Prado

    Study financial data labeling, leakage-aware validation, and the pitfalls of backtesting market models.

  • Machine Learning in Finance

    Matthew F. Dixon, Igor Halperin, and Paul Bilokon

    Explore statistical learning, deep learning, and reinforcement learning in quantitative finance.

Intelligence & causality

Explore how theories of the brain and of cause and effect inform AI.

  • A Thousand Brains

    Jeff Hawkins

    An accessible account of Hawkins’s theory of how the neocortex builds models of the world, and his suggestions for AI.

  • On Intelligence

    Jeff Hawkins with Sandra Blakeslee

    Explore Hawkins’s memory-prediction theory and the links he draws between neuroscience and artificial intelligence.

  • The Book of Why

    Judea Pearl and Dana Mackenzie

    Learn how causal reasoning turns questions about interventions and counterfactuals into something data can help answer.