As Richard Feynman famously said: "What I cannot create, I do not understand." I like to learn things to bare bones. But almost all courses are shallow.<p>Now I am learning https://www.nand2tetris.org/ and it's fantastic by structure and explanation. In the past, I also completed JS and HTML courses by Anthony Alicea on Udemy. These courses also follow a similar approach to truly understanding how things work under the hood.<p>What other books/courses could you recommend from any area of programming?
Other people have mentioned ray-tracing in one weekend<p>Complimentary to that I would recommend TinyRenderer<p><a href="https://github.com/ssloy/tinyrenderer/wiki">https://github.com/ssloy/tinyrenderer/wiki</a><p>This one is a CPU-based rasterizing renderer, it gives you a good understanding of what a GPU graphics pipeline does underneath.<p>In the graphics world the two common ways of rendering things are either rasterization or raytracing.<p>Raytracing is basically all the movie/VFX/CGI/offline renderers (although it is also being used for certain parts of real-time in recent years)<p>Raster is how most real-time renderers like the ones used for video games work.<p>If you're interested in graphics I'd highly recommend implementing a ray-tracer and a rasterizer from scratch at least once to get a good mental model of how they both work.
<i>Code: The Hidden Language of Computer Hardware and Software</i> by Charles Petzold is probably up your alley. Building to how computers work from first principles.
I highly recommend a fantastic indie game called "Turing Complete" (<a href="https://turingcomplete.game/" rel="nofollow noreferrer">https://turingcomplete.game/</a>)<p>Its basically a digital logic simulator/playground, masquerading as a game. Early levels have you solving a simple problem with a few and/or/not gates, then gradually building larger components like half adders, registers, RAM and eventually (I'm not there yet though) you end up with a complete CPU with an instruction set you have designed and implemented, and you are solving the puzzles by writing machine code (which you designed) programs for your CPU.<p>Its been featured on hacker news before:<p><a href="https://news.ycombinator.com/item?id=28903296">https://news.ycombinator.com/item?id=28903296</a><p><a href="https://news.ycombinator.com/item?id=28735441">https://news.ycombinator.com/item?id=28735441</a>
Ben Eater's 8-bit and 6502 based computer series: <a href="https://eater.net/" rel="nofollow noreferrer">https://eater.net/</a>
The Little X series;<p>[1] The Little Schemer: <a href="https://mitpress.mit.edu/9780262560993/the-little-schemer/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262560993/the-little-schemer/</a><p>[2] The Little Prover: <a href="https://mitpress.mit.edu/9780262527958/the-little-prover/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262527958/the-little-prover/</a><p>[3] The Little Typer: <a href="https://mitpress.mit.edu/9780262536431/the-little-typer/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262536431/the-little-typer/</a><p>[4] The Little Learner: <a href="https://mitpress.mit.edu/9780262546379/the-little-learner/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262546379/the-little-learner/</a><p>Note that [1] also has companion volumes: The Seasoned Schemer [1a] and The Reasoned Schemer [1b]<p>[1a] <a href="https://mitpress.mit.edu/9780262561006/the-seasoned-schemer/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262561006/the-seasoned-schemer/</a><p>[1b] <a href="https://mitpress.mit.edu/9780262535519/the-reasoned-schemer/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262535519/the-reasoned-schemer/</a>
You might find "Code: The Hidden Language of Computer Hardware and Software" by Charles Petzold intriguing. It takes a similar hands-on approach to explore computer fundamentals. Additionally, "Computer Systems: A Programmer's Perspective" by Randal E. Bryant and David R. O'Hallaron is another great read for delving deeper into computer architecture.
Also see recommendations for "Ask HN: Books Similar to Code by Charles Petzold?": <a href="https://news.ycombinator.com/item?id=29522588">https://news.ycombinator.com/item?id=29522588</a>
Introduction to Computing Systems: From Bits & Gates to C/C++ & Beyond<p><a href="https://www.mheducation.com/highered/product/introduction-computing-systems-bits-gates-c-c-beyond-patt-patel/M9781260150537.html#overview" rel="nofollow noreferrer">https://www.mheducation.com/highered/product/introduction-co...</a><p>Is similar to nand2tetris. It uses a simple machine language, the Little Computer 3 (LC-3), and builds from the hardware up. Earlier editions are cheap, and don't include C++.
Let's Build A Compiler:<p><a href="https://compilers.iecc.com/crenshaw/" rel="nofollow noreferrer">https://compilers.iecc.com/crenshaw/</a><p>Check on GitHub. Folks ported it to C, Go, etc.
Then you may study standard textbooks like "Compilers: Principles, Techniques, and Tools", "Engineering A Compiler" and so ond.
This professor takes some pretty good notes for his CS courses: <a href="http://www.cs.yale.edu/homes/aspnes/#classes" rel="nofollow noreferrer">http://www.cs.yale.edu/homes/aspnes/#classes</a><p>I might add that if you like the feeling of understanding a subject from top to bottom, if you haven't taken higher mathematics already, be careful... if you start studying math you might fall in love and have other subjects ruined for you. Colleges do us extreme disservices telling us basic calculus/linear algebra/diffeq are "math". Mathematics is like going from XOR (ZFC and basic set theory/logic) all the way up to the wildest things you can imagine.<p>I highly recommend anybody who enjoys the sense of complete mastery and "extremely nitpicky but capable of doing anything I can imagine" that computer programming tickles to try learning propositional logic, abstract algebra, and real analysis. Then graph theory, theory of computation, and actual algorithms research (ie whats in algorithms journals, though TBH stuff from a few decades ago is way more approachable and applicable). The guy I linked above has a great survey: <a href="http://www.cs.yale.edu/homes/aspnes/classes/202/notes.pdf" rel="nofollow noreferrer">http://www.cs.yale.edu/homes/aspnes/classes/202/notes.pdf</a>.<p>It honestly took years after I finished grad school for it all to fully click to the extent it has with me now, but not only does higher math teach you to think in an entirely different way, it unironically teaches you the underlying structure of <i>everything</i>. Well, maybe it's not great at solving super fuzzy human problems but especially when working with computers, knowing about things like chaos theory in distributed systems, invariants, graph algorithms, structural isomorphisms, cryptography, analyzing your shit in a way that's actually statistically useful... it's everywhere.
There is also nandgame.com, which is heavily inspired by the first few sections of nand2tetris but presents it as a drag and drop web page instead of needing to download and edit the local text files, so it's easier to jump in.
TECS by Noam Nisan and Shimon Schocken: <a href="https://mitpress.mit.edu/9780262140874/" rel="nofollow noreferrer">https://mitpress.mit.edu/9780262140874/</a>
Linux From Scratch: <a href="https://www.linuxfromscratch.org/" rel="nofollow noreferrer">https://www.linuxfromscratch.org/</a>
Neural Networks and Deep Learning, a free online book. <a href="http://neuralnetworksanddeeplearning.com/" rel="nofollow noreferrer">http://neuralnetworksanddeeplearning.com/</a>
Dive Into Systems<p><a href="https://diveintosystems.org/" rel="nofollow noreferrer">https://diveintosystems.org/</a><p>free online book