# Distinction Between 'Books' and 'Courses' Sections in the Free Programming Books Repository

> Understand the difference between Books and Courses sections in the free-programming-books repository. Discover static e-books versus interactive video learning resources.

- Repository: [Free Ebook Foundation/free-programming-books](https://github.com/EbookFoundation/free-programming-books)
- Tags: faq
- Published: 2026-02-23

---

**The 'Books' section contains static, downloadable reading materials like PDFs and e-books stored in the `books/` directory, while the 'Courses' section lists interactive, video-based learning resources such as MOOCs and tutorials maintained in the `courses/` directory.**

The EbookFoundation/free-programming-books repository organizes thousands of learning resources into two primary categories to help users find appropriate materials quickly. Understanding the distinction between 'Books' and 'Courses' sections ensures contributors file resources correctly and enables learners to choose between offline reading materials and interactive online instruction.

## Key Distinctions Between 'Books' and 'Courses' Sections

### Content Type: Static Documents vs. Interactive Media

The **Books** section curates free e-books, PDFs, HTML documents, and other downloadable reading material that users can consume offline. These entries in [`books/free-programming-books-langs.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-langs.md) and [`books/free-programming-books-subjects.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-subjects.md) link to static documents designed for linear reading and reference.

The **Courses** section aggregates free online courses, tutorials, MOOCs, video series, and interactive learning platforms. According to the source code, these entries in files like [`courses/free-courses-en.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/courses/free-courses-en.md) point to dynamic, web-hosted content that typically includes video lectures, quizzes, or hands-on labs requiring active participation.

### Consumption Model: Offline vs. Online Access

Books support **offline consumption**—once downloaded, they require no internet connection to read. Courses typically demand **online connectivity** for video streaming or platform interaction, though some platforms offer offline download options.

## Repository Structure and Source Locations

The distinction is enforced through strict directory separation defined in the main [`README.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/README.md) file.

### The `books/` Directory

All book resources reside in the `books/` directory, organized by language and subject matter. The main [`README.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/README.md) references this section at lines 71–78, linking to language-specific files such as [`books/free-programming-books-en.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-en.md) for English resources and [`books/free-programming-books-zh.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-zh.md) for Chinese resources.

### The `courses/` Directory

All course resources live in the `courses/` directory, with the [`README.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/README.md) defining this section at lines 131–133. Each language maintains its own markdown file, such as [`courses/free-courses-en.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/courses/free-courses-en.md), containing links to video-based and interactive educational platforms.

## Programmatic Access to Each Section

Developers can parse these sections differently based on their directory locations. The following Python examples demonstrate how to extract resources from each section.

### Parsing the Books Section

```python
import pathlib
import re

def load_books(lang: str = "en"):
    """Parse `books/free-programming-books-<lang>.md` and return
    a list of (title, url) tuples."""
    path = pathlib.Path(__file__).parent / "books" / f"free-programming-books-{lang}.md"
    pattern = re.compile(r'\[([^\]]+)\]\((https?://[^\)]+)\)')
    books = []

    with path.open(encoding="utf-8") as f:
        for line in f:
            match = pattern.search(line)
            if match:
                books.append((match.group(1).strip(), match.group(2).strip()))
    return books

if __name__ == "__main__":
    for title, url in load_books("en")[:5]:
        print(f"{title} → {url}")

```

This script targets the `books/` directory, extracting static document links from files like [`books/free-programming-books-en.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-en.md).

### Parsing the Courses Section

```python
import pathlib
import re

def load_courses(lang: str = "en"):
    """Parse `courses/free-courses-<lang>.md` and return
    a list of (title, url) tuples."""
    path = pathlib.Path(__file__).parent / "courses" / f"free-courses-{lang}.md"
    pattern = re.compile(r'\[([^\]]+)\]\((https?://[^\)]+)\)')
    courses = []

    with path.open(encoding="utf-8") as f:
        for line in f:
            match = pattern.search(line)
            if match:
                courses.append((match.group(1).strip(), match.group(2).strip()))
    return courses

if __name__ == "__main__":
    for title, url in load_courses("en")[:5]:
        print(f"{title} → {url}")

```

This implementation mirrors the books parser but accesses the `courses/` directory (e.g., [`courses/free-courses-en.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/courses/free-courses-en.md)) to retrieve interactive learning platform URLs.

## Summary

- **Primary distinction**: Books are static, downloadable documents while Courses are interactive, video-based or web-hosted learning experiences.
- **Directory separation**: Books live in `books/` (referenced at [`README.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/README.md) lines 71–78) and Courses in `courses/` (referenced at lines 131–133).
- **Content format**: Books entries link to PDFs, e-books, and HTML files; Courses entries link to MOOCs, video playlists, and interactive platforms.
- **Organization**: Both sections use per-language markdown files, but Books splits further into language-specific ([`free-programming-books-langs.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/free-programming-books-langs.md)) and subject-specific ([`free-programming-books-subjects.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/free-programming-books-subjects.md)) lists.

## Frequently Asked Questions

### Can a resource be listed in both the Books and Courses sections?

Generally no. The EbookFoundation/free-programming-books repository maintains strict separation: if a resource is a static PDF or e-book, it belongs in `books/`; if it is a video course or interactive tutorial, it belongs in `courses/`. Hybrid resources should be categorized based on their primary consumption method.

### How do I add a new programming book to the repository?

Create a pull request that adds the entry to the appropriate file in the `books/` directory, such as [`books/free-programming-books-langs.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-langs.md) for language-specific texts or [`books/free-programming-books-subjects.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-subjects.md) for topic-based collections. Ensure the link points to a legally available, free static document.

### Why are Courses and Books separated instead of mixed by topic?

The distinction between 'Books' and 'Courses' sections prevents format confusion and supports different user workflows. Readers seeking offline-capable reference materials navigate to `books/`, while learners needing structured video instruction or interactive exercises browse `courses/`, eliminating the need to filter through incompatible resource types.

### Do the Courses files include video download links?

No. According to the repository structure, [`courses/free-courses-en.md`](https://github.com/EbookFoundation/free-programming-books/blob/main/courses/free-courses-en.md) and related files contain links to course homepages, playlists, or platform pages rather than direct video downloads. This respects content hosting platforms and ensures users access the most current version of interactive materials.