Obooksy

Listen to programming books, not every bracket.

Text to speech for code books: code blocks stay on the page for you to look at. Obooksy reads the text around them, so a technical book still makes sense by ear.

Chapter 4 · Working with files112

Reading a file line by line

Loading a whole file into memory is fine for small files. For large ones, it is better to read one line at a time, so memory use stays flat however big the file gets.

Shown, not read
with open(path) as f:
    for line in f:
        handle(line.rstrip())

The file is closed automatically when the block ends, even if an error is raised [3].

³ See the language reference, section 8.5.

112

  • The explanation is read.

  • Code blocks are shown, not read.

  • Citations, footnotes and page numbers are skipped.

What matters most for technical books

Chapter 347

Memories fade quickly at first [12], and then more slowly. A review that comes just in time does more than one that comes too soon.¹

¹ First measured in 1885.

Code stays on the page

Code blocks are left out of the audio, so you don't hear symbols read one by one.

Sidebars and notes in order

Tips, warnings and sidebars are read where they belong.

Forgetting is not a flaw in memory. It is what makes the next review worth something, and the reason spacing works at all.

Highlight what to try

Mark the passages you want to try out later.

Back to reading

Back to reading

Scrolled to study the code? One tap brings you back to where it's reading.

Questions

Can I still see the code?

Yes. You always see the original page, with the code where it is in the book.

Also good for

Hear the difference on your own book.

Upload a book or a document and start listening in under a minute.