Leanpub Header

Skip to main content

Zen of Zig

Volume 1: Learn Programming with Zig

Far from the madding crowd: vibecoding agents, big companies, and promises of a perfect programming language (that never arrives)... your thoughts spring from your fingers and, through the keyboard, code takes shape.

If you enjoy programming, you feel it tickle your brain cells. At times, you notice that something just "clicks." It's real - the satisfaction of learning. Not to get a job. Not to make apps in 5 minutes. Not to get rich reusing prompts. But for the pleasure of understanding, of digging deeper, and of building elegantly.

Zig is a young language, still evolving - and that doesn't really matter. All languages change sooner or later. Everything becomes obsolete eventually, except your mind and what you truly learn along the way. That journey begins today with the first step, and it will go as far as your time, your mind, and your imagination take you. That's the spirit of Zen of Zig.

$ zig zen

 * Communicate intent precisely.

 * Edge cases matter.

 * Favor reading code over writing code.

 * Only one obvious way to do things.

 * Runtime crashes are better than bugs.

 * Compile errors are better than runtime crashes.

 * Incremental improvements.

 * Avoid local maximums.

 * Reduce the amount one must remember.

 * Focus on code rather than style.

 * Resource allocation may fail; resource deallocation must succeed.

 * Memory is a resource.

 * Together we serve the users.

Minimum price

$19.90

$39.90

You pay

$39.90

Author earns

$31.92
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
265
Pages
About

About

About the Book

Zen of Zig is a book series that teaches the Zig programming language from scratch. It’s a personal journey by the author, who walks through the fundamentals and gradually into more advanced techniques, volume by volume.

Each chapter in the first volume includes playgrounds where you can experiment with the code directly in your browser: Zen of Zig - Zig programming book


You can read the first book for free at zenofzig.com/book. If you enjoy it, you can support my work by purchasing the PDF. I’ll keep it in mind and send you a personal discount coupon for the upcoming books in the series. Of course, I understand if you can’t afford it - that’s why it’s freely available on the website.

Share this book

Author

About the Author

Omer Ganovic

The author has been a software professional since the early 2000s, with experience training programmers and developing projects in startups.

Translations

Translations

Languages

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub