Looking for a book/textbook that teaches you a programming language through systems (or vice versa). For example, a book that teaches modern C++ by showing you how to program a compiler; a book that teaches operating systems and the language of choice in the book is Rust; a book that teaches database internals through Golang; etc. Basically, looking for a fun project-based book that I can walk through and spend my free time working through.<p>Any recommendations?
I'm publishing a book doing exactly this, rewriting one Unix utility per chapter from the BSD C version into Rust. The first two chapters for true/false and yes are published, with head, wc, cat, cut, rev, and uniq coming soon as I finish editing and typesetting each.<p><a href="https://rftgu.rs/" rel="nofollow">https://rftgu.rs/</a>
It's possible to work through Bob Nystrom's Crafting Interpreters[1] using any language you want. On GitHub just search for "crafting interpreters"[2] and add a filter for the programming language you're interested in, and you'll find at least a couple repos for the entire book. There are over a dozen complete repos in Rust. Since everyone breaks out each chapter in a separate folder, it's easy to follow along with the book, even though the book's first interpreter is written in Java and the second compiler was written in C. I did this, it's basically how I learned Rust.<p>[1] <a href="https://www.craftinginterpreters.com" rel="nofollow">https://www.craftinginterpreters.com</a>
[2] <a href="https://github.com/search?q=crafting+interpreters" rel="nofollow">https://github.com/search?q=crafting+interpreters</a>
I am obsessed with "The Linux Programming Interface" by Michael Kerrisk. I highly recommend this book if you want to level up your C programming skills and knowledge of Unix operating systems (specially portability and Linux). It might not exactly fit your description, but I still would recommend it. I feel like my C skills have gone from medium to pro, since reading most of the book. One really gets a good grasp of what syscalls exist, what they do and how to properly use them to produce secure and portable code.
It is not written following a single project, but there are many different "applications" in the different chapters, for example, at the end you will be able to program a stand-alone back end TCP server with the examples from the book.
The Ray Tracer Challenge[0] is super fun and language agnostic. It might be a good second project when learning a language. He also has a book about mazes that is great but ruby specific. Though you could adapt it to another language.<p>The thing I like about the books is the emphasis on having fun. My understanding is Jamis used these projects to overcome career burnout. They are also good for exploring the basics of a new language though.<p>I interviewed Jamis about this subject and burn out[1].<p>[0]: <a href="http://raytracerchallenge.com/" rel="nofollow">http://raytracerchallenge.com/</a><p>[1]: <a href="https://corecursive.com/025-burn-out-and-recreational-programming/" rel="nofollow">https://corecursive.com/025-burn-out-and-recreational-progra...</a>
From "Ask HN: What are some books where the reader learns by building projects?" <a href="https://news.ycombinator.com/item?id=26042447" rel="nofollow">https://news.ycombinator.com/item?id=26042447</a> :<p>> <i>"Agile Web Development with Rails [6]" (2020) teaches TDD and agile in conjunction with a DRY, CoC, RAD web application framework: <a href="https://g.co/kgs/GNqnWV" rel="nofollow">https://g.co/kgs/GNqnWV</a> </i><p>And:<p>> <i>"ugit – Learn Git Internals by Building Git in Python"
<a href="https://www.leshenko.net/p/ugit/" rel="nofollow">https://www.leshenko.net/p/ugit/</a> </i>
Rust in Action teaches Rust through systems programming<p><a href="https://www.manning.com/books/rust-in-action" rel="nofollow">https://www.manning.com/books/rust-in-action</a>
See "Write Yourself a Scheme in 48 Hours" <a href="https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours" rel="nofollow">https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_...</a> and "Write You A Haskell" <a href="http://dev.stephendiehl.com/fun/" rel="nofollow">http://dev.stephendiehl.com/fun/</a>
Hands-on Scala Programming (<a href="https://www.handsonscala.com/" rel="nofollow">https://www.handsonscala.com/</a>) is a great way to learn Scala. It's down-to-earth, project-based and focuses on the practical side of the language.
"Designing Elixir Systems with OTP" is a great book.<p>It's not intending to teach you the basics of the language, it is instead teaching you how to architect real world programs, using a particular case study that they work through (a quiz game). It's basically about the 'functional core, OTP boundaries' model that is an excellent approach for building real systems.<p>If you don't know Elixir at all the Getting Started guide is good for teaching the language constructs: <a href="https://elixir-lang.org/getting-started/introduction.html" rel="nofollow">https://elixir-lang.org/getting-started/introduction.html</a>
For C++, we've built Learn C++ Through Projects [0], which is a project-based C++ course.<p>We currently offer only one project to build a transport network monitor. It starts with some low-level topics (we use WebSockets to handle tens of thousands of network events) but a lot of code is also higher-level (we use the network events to create a routing engine) - so it may not be exactly a "systems programming" resource!<p>[0] <a href="https://learncppthroughprojects.com" rel="nofollow">https://learncppthroughprojects.com</a>
Books by Anthony J. Dos Reis<p>Those are so much underrated books that thought me how to become a software engineer. I hightly recommend especially these books.<p>Assembly Language and Computer Architecture Using C++ and Java<p>Compiler Construction Using Java, JavaCC, and Yacc<p>I promise! You'll obtain tons of skills from his books. I'm very debted to this man. I enjoyed a lot reading his books and made me who I am today.
I never worked through this, and it may be outdated now, but <i>Let's build a browser engine!</i> seems to fit the bill: <a href="https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html" rel="nofollow">https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.h...</a>
There's the Writing an Interpreter/Compiler in Go books: <a href="https://interpreterbook.com/" rel="nofollow">https://interpreterbook.com/</a> (Compiler book link is on that page too).
Great thread so far.<p>Anything specific for Python, and recent enough to be based on the latest Python (3.9.5, or at least 3.x)?<p>I remember (but can't find it, sorry) a great "learn by example" web tutorial, but based on Python 2.x, and possibly at least 6-7 years old by now.
my 2 cents... A single book wont teach everything, there will be missing holes, its better to have 2 monitors, open some small libraries in one monitor and go to first commit and start typing that and also understand it and gradually move to next commit... do it for 3-4 prjects and then u r set
Just ask openAI codex or github copilot.<p>It’ll all be natural language interfaces based on neural networks like that.<p>I wish things were otherwise but I can’t in good faith recommend someone learn “to code” or learn any programming language anymore.
This seems like a terrible idea unless you specifically want to learn how to program specific kinds of things on specific languages.<p>That said, I can see how this could be useful to someone who is already well versed in programming and computer science, and has other types of project experience—they have a solid foundation to build and reflect on.