Leanpub Header

Skip to main content

Topics

Programming

From a first language, types, objects and functions to code review, design patterns, logic, building a database from scratch, the command line and a working life in software, programming as told through the free samples of the Leanpub books about it.

Created from the free samples of 12 Leanpub books and the descriptions and tables of contents of 15 more, with every source cited.

Programming is the writing of instructions that a computer can carry out, and, as the books here insist, a good deal besides: choosing a language and learning to think in it, reading and reviewing other people's code, designing programs that can be changed, using the tools that surround the code, and making a working life of it. This article surveys that ground from above. The narrower subjects it passes through, among them the individual languages from Python and JavaScript to Kotlin, R and PHP, algorithms and data structures, functional programming, software testing, software architecture and version control, have fuller articles of their own, and what is said here is meant as a map of how they fit together.

The most widely read books on this shelf are of two kinds. Some teach a language to people who need it for something else, and the largest of them teaches a language of statistics to people beginning to analyse data.[13] Others are collections of what experienced programmers wish they had been told. One gathers sixty-eight short essays by many hands, on matters from the meaning of a type to the duty to admit a failure early,[1] and another is a set of tips on what to look for when reading a colleague's code.[14]

The article moves from the learning of a language to the ideas that languages share, then to the craft of writing code, design, learning by building, tools and automation, and working life. Its sources are the free samples of twelve books and the descriptions and tables of contents of fifteen more, listed at the end, and every claim that rests on a source is cited to it.

Where to start

A first language is best chosen by purpose. Python 101 (2021) teaches Python to readers who have programmed a little in something else or taken a class,[2] R Programming for Data Science (2022) teaches R for the analysis of data,[13] and The Node Beginner Book (2018) gets a JavaScript programmer writing for the server in under sixty pages.[19] Someone with no experience of a computer beyond its windows should begin a step earlier, at the command line, with the adjacent The Unix Workbench (2017).[21] The adjacent Your First Year in Code (2022) is a collection of advice for people in their first year, of the kind that neither a course nor an employer supplies.[24]

Programmers who know a language and want to use it well have PHP: The "Right" Way (2025) for PHP,[17] JavaScript Allongé, the "Six" Edition (2019) and The Node Craftsman Book (2017) for JavaScript,[18][5] and Effective Kotlin for Kotlin.[7]

For the craft that does not depend on a language there are the essays of 97 Things Every Programmer Should Know - Extended (2014),[1] What to Look for in a Code Review (2016),[14] The easiest way to learn design patterns (2024)[3] and Logic for Programmers, which teaches working programmers the logic they use without having been taught it.[6] Readers who learn best by making something can build a database with Build Your Own Database in Go From Scratch.[4]

History

The first programs were written in the numeric codes of particular machines. Languages that a compiler could translate appeared at the end of the 1950s, one for scientific calculation, one for business records and one, Lisp, for the manipulation of symbols, and each began a lineage that persists. The 1970s brought structured programming and the language in which operating systems came to be written; the 1980s and 1990s brought object orientation, and with the web a group of interpreted languages, among them Python, PHP and JavaScript, designed for convenience more than for speed. Since then open-source libraries have come to supply most of any program, methods of working have shortened the cycle between writing code and releasing it, and languages have borrowed steadily from the functional tradition.

The shelf touches this history at several points. Lisp Hackers (2013) is a set of interviews with fifteen programmers in the oldest of those lineages still in general use.[16] The easiest way to learn design patterns dates the classification of design patterns to a book of 1994 by four authors, though the patterns themselves had been in use for some time.[3] JavaScript Allongé, the "Six" Edition takes its subtitle from the 2015 revision that added classes to JavaScript,[18] and PHP: The "Right" Way exists because, as its description says, the web is full of outdated advice that leads new users of an old language into bad and insecure habits.[17] Code Is for Humans belongs to the present, in which the limits of the programmer's attention are studied as carefully as those of the machine.[15]

Learning a language

Python 101, in its rewritten second edition, shows what a general introduction now contains. The first of its four parts is the language itself, in chapters that build on one another. The second is intermediate material that is as much about the practice of development as about Python: isolated environments for a project's libraries, annotations of type, threads and processes, debugging, profiling and basic testing. The third is a set of small tutorials, a command-line program, the reading of common data formats, the scraping of a website, a small database, spreadsheets and documents, and the fourth is on packaging a program so that others can install it. The book describes the intermediate part as teaching the skills of a developer, how to debug, to add tests and to keep code under version control, and warns that it will not explain every term to a reader who has never programmed.[2]

Other introductions are shaped by what the language is for. R Programming for Data Science covers the fundamentals of R for people starting work in data science, and Mastering Software Development in R (2017) accompanies a sequence of courses on building tools for it, meaning software that a team or a community of developers can share and not only scripts for one analysis.[13][9] The Node Beginner Book builds one small web application and teaches the more advanced parts of JavaScript on the way, to the relief, according to a reader quoted in its description, of a programmer from another language who had always found JavaScript a black art,[19] and PHP: The "Right" Way is not a tutorial at all but a quick reference to current standards with links to authoritative teaching, which observes that there is no canonical way to use the language.[17] Effective Kotlin and Kotlin Coroutines represent a third kind, for people fluent in a language: numbered recommendations with their reasons, beginning with the limiting of mutable state, and a full treatment of one feature, the language's model of concurrency, which its author traces to an idea known in computer science since the 1960s and only lately made general in mainstream languages.[7][8]

Ideas that languages share

Several books are less about a language than about an idea seen through one. An essay in 97 Things Every Programmer Should Know - Extended takes the idea of a type. A type guarantees which operations make sense on a piece of data, so that adding a number to a word is refused, and it gives a compiler information; but it is also an abstraction, the set of operations allowed for an object. If two kinds of object both answer the same request, the caller need not know which it has, and one can be substituted for another provided the meaning of the behaviour is honoured and not merely the form. The essay extends the point to both styles of typing: static typing is best thought of as fixed constraints imposed by the name through which an object is used, while a dynamic language can settle the question at run time by whether the object accepts the operation. Types designed in this way give modularity, reveal the programmer's intention, the essay concludes, and are a documentation that never goes out of date.[1]

The Node Craftsman Book explains objects by contrast. In a language with classes an object is built from a blueprint, and when asked to do something it looks to its class for the code, which is how thirty cars can all drive and sound their horns without thirty copies of the methods. JavaScript, the book says, is a classless society: in place of the relation between object and class there is a relation between object and object, and an object asked to do something refers to another object, its prototype, which has the code.[5] JavaScript Allongé, the "Six" Edition builds the same language up from values and functions, and readers quoted in its description single out its account of functions that remember the context in which they were made.[18] PureScript by Example (2017) introduces a small, strictly typed functional language that compiles to JavaScript, on the argument that large applications need a more disciplined environment than JavaScript provides.[20]

Logic for Programmers goes beneath all languages. Books on logic, its author says, are written for philosophers, mathematicians and computer scientists, who need the theory more than the practice, and none for the programmer studying alone: it is as though nobody would teach how to ride a bicycle, only how to build one. The book teaches the basics in the notation of programming where it can, chooses accessibility over rigour, and applies them to the testing of code, the design of a database and the working out of what a customer requires. It is, the author says, a technical manual and not a textbook, and it settles small matters of convention openly, such as counting from zero, because neither programmers nor mathematicians agree on them.[6]

The craft

The essays of 97 Things Every Programmer Should Know - Extended were contributed to a public collection and did not appear in the printed selection made from it; a reader compiled them. One, on failure, is characteristic. A programmer will not get everything right or deliver everything on time, and the important thing is to say so early. Telling people what they wish to hear only defers the moment at which they learn that they will not get what they expected, and takes from them the chance to act on the news, for instance by reducing what is to be built. To fail to acknowledge a failure, the essay says, is itself a failure.[1]

What to Look for in a Code Review collects a series of articles, first published on the blog of a maker of development tools, on the reading of someone else's changes, with sections on tests, security and performance.[14] Code Is for Humans asks why code has faults, why products go unused and why projects go wrong, and finds the answers in the shortcomings of human cognition and the nature of complexity; its remedy is an approach to engineering that allows for the biases and limits of the people doing it.[15] Lisp Hackers offers the testimony of practitioners, fifteen of them, on how they came to their language and how they work.[16]

Design

The easiest way to learn design patterns explains what a pattern is by an analogy with a method of working: the method prescribes the meetings and the roles, and the problems solved within them are particular to each organisation. A design pattern likewise prescribes how the objects in a piece of code are structured and what role each plays, and leaves open what they actually do. The book's example is a pattern for code with complicated conditions, in which each branch becomes an object with a common interface and the condition merely chooses among them. Not every pattern involves several objects: some prescribe only the internal logic of one and what it exposes to others. The book begins with general principles of object-oriented design before the catalogue, and argues that the reasons for learning patterns go beyond their being better solutions than improvised ones.[3]

At a larger scale the subject becomes architecture. The adjacent Software Architecture for Developers (2022), among the most widely sold books in the extract, sets out lightweight practices for designing, for identifying technical risks and for communicating a design, which its author had assumed to be common sense and found, after teaching them to thousands of people, were not. It seeks a mid-point between the heavy planning of older methods and the absence of any architectural thought in teams new to agile ones, and holds that design in advance and design that evolves can coexist.[10] The adjacent Introducing EventStorming (2021) describes a workshop in which a business process is modelled with notes on a long roll of paper before any code is written.[23]

Learning by building

Build Your Own Database in Go From Scratch rests on the view that a real database is not the place to learn the principles of one, since the mature ones are very large, and has the reader write one in about three thousand lines of Go. It starts from what a database is for. The first requirement is durability, that data once accepted survives a crash, which is why a database is more than a file format: ordinary use of files gives no such guarantee, and making files durable, the book says, means implementing half a database. The second is the choice of data structure. Because even fast disks are about a thousand times slower than memory, only two structures are in practical use, and the book builds one of them. A database, in its phrase, is just a data structure on disk. It also distinguishes the two families of database, those built for analysis over large amounts of data and those built for small, immediate, indexed operations, and confines itself to the second, where the indexing structure is everything. A crash in the middle of a write may lose the most recent data, the book says, but must not leave it half written, and that property of all or nothing is where transactions begin. The chapters then add, in order, a store of keys and values that only appends, the reuse of freed space, tables, queries over ranges, secondary indexes, transactions that happen entirely or not at all, and the control of concurrent readers and writers.[4]

The same motive runs through two widely sold adjacent books that are their authors' own notes. Kolban's book on ESP32 (2018) is a programmer's collected notes on a microcontroller, written while learning it,[26] and D3 Tips and Tricks v3.x (2019) is a guide to a library for drawing data, by and for someone new to JavaScript.[27]

Tools and automation

Much of a programmer's day is spent outside the language. The Unix Workbench introduces the command line to complete beginners,[21] and two adjacent books of 2025 teach single tools by example, CLI text processing with GNU sed the editing of streams of text and CLI text processing with GNU grep and ripgrep the searching of it. The first tells its reader to type every example and to change the input to see what happens, because proficiency, as with driving, comes only from practice; it assumes familiarity with the command line, with redirection and with pipelines.[12][22]

Ansible for DevOps (2025), among the most widely sold books in the extract, is on the automation of servers. Its foreword describes the tool as having a low barrier to entry and as something a team can adopt by degrees, and gives a definition of the movement in the book's title: its purpose is to shorten the distance between the developers who write code and the operators who run it, which a tool usable by both serves better than a new team placed between them. The foreword adds that the tool's descriptions of a system can document themselves and comes close to a common language across teams, clouds and data centres.[11]

Working life

Your First Year in Code was written by developers for those a year or two behind them, a mixture of practical instruction, advice on careers and encouragement, for students, people in training courses and the self-taught.[24] How to Do What You Love & Earn What You’re Worth as a Programmer (2013) is a slim collection of essays on finding and building success as a professional developer, by a writer who has worked as one since 1986.[25]

Questions about Programming

Which programming language should I learn first?

A first language is best chosen by purpose. Python 101 (2021) teaches Python to readers who have programmed a little in something else or taken a class, and R Programming for Data Science (2022) teaches R for the analysis of data.[2][13] Someone with no experience of a computer beyond its windows should begin a step earlier, at the command line, with The Unix Workbench (2017).[21]

What is a type in programming?

An essay in 97 Things Every Programmer Should Know - Extended (2014) says that a type guarantees which operations make sense on a piece of data, so that adding a number to a word is refused, and that it is also an abstraction, the set of operations allowed for an object.[1] Static typing is best thought of as fixed constraints imposed by the name through which an object is used, while a dynamic language can settle the question at run time by whether the object accepts the operation.[1] Types designed in this way, the essay concludes, are a documentation that never goes out of date.[1]

What is a design pattern?

A design pattern prescribes how the objects in a piece of code are structured and what role each plays, and leaves open what they actually do.[3] The example in The easiest way to learn design patterns (2024) is a pattern for code with complicated conditions, in which each branch becomes an object with a common interface and the condition merely chooses among them.[3] The book dates the classification of design patterns to a book of 1994 by four authors, though the patterns themselves had been in use for some time.[3]

Why is a database more than a file?

The first requirement of a database is durability, that data once accepted survives a crash, and ordinary use of files gives no such guarantee.[4] Making files durable, Build Your Own Database in Go From Scratch says, means implementing half a database, and a database in its phrase is just a data structure on disk.[4] A crash in the middle of a write may lose the most recent data but must not leave it half written, and that property of all or nothing is where transactions begin.[4]

What should a programmer do when a deadline will be missed?

An essay in 97 Things Every Programmer Should Know - Extended (2014) holds that a programmer will not get everything right or deliver everything on time, and that the important thing is to say so early.[1] Telling people what they wish to hear only defers the moment at which they learn that they will not get what they expected, and takes from them the chance to act on the news, for instance by reducing what is to be built.[1] To fail to acknowledge a failure, the essay says, is itself a failure.[1]

Do programmers need to learn the command line?

Much of a programmer's day is spent outside the language. The Unix Workbench (2017) introduces the command line to complete beginners, and CLI text processing with GNU sed (2025) teaches one tool, the editing of streams of text, by example.[21][12] The second tells its reader to type every example and to change the input to see what happens, because proficiency, as with driving, comes only from practice.[12]

Sources

Every source is a Leanpub book. The note after each says which part of it was read; where no sample was available, only the public description and table of contents were used.

  1. 1.
    97 Things Every Programmer Should Know - Extended, Shirish Padalkar Free sample: the compiler's note and the first two essays. 2014. Free sample: PDF · EPUB
  2. 2.
    Python 101, Michael Driscoll: 2nd Edition Free sample: the introduction, on the four parts of the book and its audience. 2021. Free sample: PDF · EPUB
  3. 3.
    The easiest way to learn design patterns, Fiodar Sazanavets, Awal Kamin Salifu: With C# 12 code samples on .NET 8 Free sample: the introduction, on what design patterns are. 2024. Free sample: PDF · EPUB
  4. 4.
    Build Your Own Database in Go From Scratch, build-your-own.org: From B+tree to SQL in 3000 lines Free sample: the contents and the opening chapter, on what a database must do. 2026. Free sample: EPUB
  5. 5.
    The Node Craftsman Book, Manuel Kiessling: An advanced Node.js tutorial Free sample: one chapter, on objects in JavaScript. 2017. Free sample: PDF · EPUB
  6. 6.
    Logic for Programmers, Hillel Wayne Free sample: the introduction, on why the book exists and its conventions. 2026. Free sample: PDF
  7. 7.
    Effective Kotlin, Marcin Moskała: Best practices Free sample: the first item, on limiting mutability. 2026. Free sample: PDF · EPUB
  8. 8.
    Kotlin Coroutines, Marcin Moskała: Deep Dive Free sample: the introduction. 2026. Free sample: PDF · EPUB
  9. 9.
    Mastering Software Development in R, Roger D. Peng, Sean Kross, Brooke Anderson Free sample: the opening pages, on the book's aims and setup. 2017. Free sample: PDF · EPUB
  10. 10.
    Software Architecture for Developers, Simon Brown: Technical leadership and the balance with agility Free sample: the preface, on the book's approach. 2022. Free sample: PDF · EPUB
  11. 11.
    Ansible for DevOps, Jeff Geerling: Server and configuration management for humans Free sample: the foreword and the opening of the preface. 2025. Free sample: PDF · EPUB
  12. 12.
    CLI text processing with GNU sed, Sundeep Agarwal: awesome stream editor Free sample: the preface, on prerequisites and method. 2025. Free sample: PDF · EPUB
  13. 13.
    R Programming for Data Science, Roger D. Peng No sample: from the description and table of contents. 2022.
  14. 14.
    What to Look for in a Code Review, Trisha Gee: Effective tips for reviewing code No sample: from the description and table of contents. 2016.
  15. 15.
    Code Is for Humans, Zohar Jackson: A Guide to Human-Centric Software Engineering No sample: from the description. 2026.
  16. 16.
    Lisp Hackers, Vsevolod Domkin: Interviews with 100x More Productive Programmers No sample: from the table of contents. 2013.
  17. 17.
    PHP: The "Right" Way, Phil Sturgeon, Josh Lockhart: Your guide to PHP best practices, coding standards, and authoritative tutorials. No sample: from the description and table of contents. 2025.
  18. 18.
    JavaScript Allongé, the "Six" Edition, Reg “raganwald” Braithwaite: Programming from Functions to Classes in ECMAScript 2015 No sample: from the description and table of contents. 2019.
  19. 19.
    The Node Beginner Book, Manuel Kiessling: A comprehensive Node.js tutorial No sample: from the description and table of contents. 2018.
  20. 20.
    PureScript by Example, Phil Freeman: Functional Programming for the Web No sample: from the description and table of contents. 2017.
  21. 21.
    The Unix Workbench, Sean Kross No sample: from the description and table of contents. 2017.
  22. 22.
    CLI text processing with GNU grep and ripgrep, Sundeep Agarwal: The search is on The free sample was not used: from the description and table of contents. 2025. Free sample: PDF · EPUB
  23. 23.
    Introducing EventStorming, Alberto Brandolini: An act of Deliberate Collective Learning The free sample was not used: from the description and table of contents. 2021. Free sample: PDF · EPUB
  24. 24.
    Your First Year in Code, Isaac Lyman: A complete guide for new & aspiring developers No sample: from the description and table of contents. 2022.
  25. 25.
    How to Do What You Love & Earn What You’re Worth as a Programmer, Reg “raganwald” Braithwaite No sample: from the description and table of contents. 2013.
  26. 26.
    Kolban's book on ESP32, Neil Kolban No sample: from the description. 2018.
  27. 27.
    D3 Tips and Tricks v3.x, Malcolm Maclean: Interactive Data Visualization in a Web Browser No sample: from the description and table of contents. 2019.

Further reading

Other widely read books in the library on neighbouring ground, not cited above; most belong to the narrower subjects.

This is an article created from the free samples of 12 Leanpub books and the descriptions and tables of contents of 15 more. We're building these articles to provide you, the Leanpub reader, with a good jumping-off point to discover more Leanpub books that are interesting and relevant to you. We never use material which is paid-only when building these articles: we only use material which is already free on Leanpub. However, Leanpub authors can opt out from inclusion in articles from their book settings page.

Updated November 2026.

In the Leanpub store: 8,467 books · 112 courses in the Computers and Programming category · also filed under Software, Software Engineering, Programming Cookbooks

All topics