I am looking for writings/tutorials/videos which describe a specific technology or feature by implementing them, ideally in no more than few thousands lines of code (and not just 10-20 line code snippets). Idea is to teach about underlying technology by a hands-on project, which is not overwhelming like trying to implement full-feature game engine and yet captures the essence of technology. Some examples are -<p>* Build a simple database (https://cstack.github.io/db_tutorial/)<p>* Containers in 500 lines (https://blog.lizzie.io/linux-containers-in-500-loc.html)<p>* Malloc tutorial (https://danluu.com/malloc-tutorial/)<p>* Nativecoin - build your own crypto-currency (https://lhartikk.github.io/)<p>I'm sure there are great such projects/tutorials in domains like networking, filesystem, databases, compiler, web design, messaging, game design, fintech, etc. If you have come across such writings/projects, kindly share.
"500 Lines or Less" is an entire book of articles just like this. Each chapter guides you through a small (500 loc or less) implementation of a common component (eg a web server). <a href="http://aosabook.org/en/index.html" rel="nofollow">http://aosabook.org/en/index.html</a>
It's still very early days, but Bitwise is interesting (<a href="https://github.com/pervognsen/bitwise" rel="nofollow">https://github.com/pervognsen/bitwise</a>)<p>There's also Handmade Hero (<a href="https://handmadehero.org/" rel="nofollow">https://handmadehero.org/</a>)<p>The Raytracing books by Peter Shirley are also very interesting, starting with "Raytracing in one weekend" (<a href="https://www.amazon.com/Ray-Tracing-Weekend-Minibooks-Book-ebook/dp/B01B5AODD8/ref=sr_1_1?ie=UTF8&qid=1521122179&sr=8-1&keywords=raytracing+in+one+weekend" rel="nofollow">https://www.amazon.com/Ray-Tracing-Weekend-Minibooks-Book-eb...</a>)<p>And lastly there's Crafting Interpreters (<a href="http://www.craftinginterpreters.com/" rel="nofollow">http://www.craftinginterpreters.com/</a>)
Build Your Own React <a href="https://github.com/hexacta/didact" rel="nofollow">https://github.com/hexacta/didact</a><p>Create Your Own Programming Language <a href="http://createyourproglang.com/" rel="nofollow">http://createyourproglang.com/</a><p>Build Your Own Sinatra: <a href="https://getgood.at/build-your-own/sinatra" rel="nofollow">https://getgood.at/build-your-own/sinatra</a> (disclaimer: I'm the author of this)<p>Vanilla JS series <a href="https://javascript30.com/" rel="nofollow">https://javascript30.com/</a><p>Super Tiny Compiler <a href="https://github.com/jamiebuilds/the-super-tiny-compiler" rel="nofollow">https://github.com/jamiebuilds/the-super-tiny-compiler</a>
I've programmed my own simple synthesizer [1] by following along "The Audio Programming Book" [0].<p>It gives a concise explanation for the techniques and theories for signal processing while showing practical code examples.<p>[0]: <a href="https://mitpress.mit.edu/books/audio-programming-book" rel="nofollow">https://mitpress.mit.edu/books/audio-programming-book</a><p>[1]: <a href="https://github.com/badosu/sine_synth.lv2" rel="nofollow">https://github.com/badosu/sine_synth.lv2</a>
I worked through most of this tutorial on building a simple text editor in C and greatly enjoyed it. Highly recommend it!<p><a href="https://viewsourcecode.org/snaptoken/kilo/" rel="nofollow">https://viewsourcecode.org/snaptoken/kilo/</a>
I've got a bunch of "Build a mini React" [0] and "Build a mini Redux" [1] articles referenced in my React/Redux links list. I particularly recommend the "Didact: a DIY guide to build your own React" post series [2] and "Build Yourself a Redux" [3].<p>[0] <a href="https://github.com/markerikson/react-redux-links/blob/master/react-implementation.md#miniature-react-implementations" rel="nofollow">https://github.com/markerikson/react-redux-links/blob/master...</a><p>[1] <a href="https://github.com/markerikson/react-redux-links/blob/master/redux-tutorials.md#redux-implementation-walkthroughs" rel="nofollow">https://github.com/markerikson/react-redux-links/blob/master...</a><p>[2] <a href="https://engineering.hexacta.com/didact-learning-how-react-works-by-building-it-from-scratch-51007984e5c5" rel="nofollow">https://engineering.hexacta.com/didact-learning-how-react-wo...</a><p>[3] <a href="https://zapier.com/engineering/how-to-build-redux/" rel="nofollow">https://zapier.com/engineering/how-to-build-redux/</a>
This describes the purpose of the (paid) resource available at “The Great Code Club” [1].<p>Marc-André Cournoyer has put together several different projects:
- 2D/3D Game
- Database Engine
- Virtual Machine
- Backend + Frontend Framework
- Neural Network
- Language
- Server
- Real-Time Web Engine<p>Full Disclosure: I am a happy customer of Marc Andre’s “Owning Rails” [2] workshop. No other affiliation.<p>[1] <a href="http://www.greatcodeclub.com" rel="nofollow">http://www.greatcodeclub.com</a>
[2] <a href="http://owningrails.com" rel="nofollow">http://owningrails.com</a>
I built a live streaming system with VoD constrained to RasPi+CDN with minimal code in a few weeks, fully FLOSS and offline capable. All design and hours of live hacking are online, comparison here: <a href="https://ispooge.com/2018-03-14-video-platforms-compared.html" rel="nofollow">https://ispooge.com/2018-03-14-video-platforms-compared.html</a> lmk if you want specifics — tutorials being produced on tinydatacenter.com. I am documenting as I learn, given I have no background in vid nor feature list in mind.<p>Tldr: all you need to make your own scalable Twitch without coding (but with patience). It’s a <2mo old so feedback appreciated, but my live vlog has been going strong for weeks and syndicating to 4+ other networks.
MAL (Make a Lisp) is a good one around building a lisp.<p><a href="https://github.com/kanaka/mal" rel="nofollow">https://github.com/kanaka/mal</a><p>Lots of examples across 72 languages.
Came across this website some time ago:<p>The Architecture of Open Source Applications<p>500 Lines or Less<p><a href="http://aosabook.org/en/index.html" rel="nofollow">http://aosabook.org/en/index.html</a>
I know it isn't quite what you're asking for, but I recommend writing a static site compiler from scratch for a static site you actually use. Buy a nice HTML / CSS template (I found this one <a href="https://html5up.net/story" rel="nofollow">https://html5up.net/story</a> then modified it) and build yourself a nice personal site from scratch.<p>You'll be surprised at how nice it is to just fully understand everything without a mess of libraries getting in the way and the resulting project will be perfectly tailored to your needs.
I recommend the interpreter book [<a href="https://interpreterbook.com/" rel="nofollow">https://interpreterbook.com/</a>], which isn't entirely free of charge however.<p>On the other hand, it was enough to get me off the ground for my lexer and write a parser that wasn't entirely dumb.
Building a Modern Computer from First Principles <a href="http://nand2tetris.org/" rel="nofollow">http://nand2tetris.org/</a>
"Let's Build a Compiler" by Crenshaw: <a href="https://compilers.iecc.com/crenshaw/" rel="nofollow">https://compilers.iecc.com/crenshaw/</a><p>It's an old classic, using somewhat outdated technologies, but there are more moderns versions floating around, for example a C + x86 one: <a href="https://github.com/lotabout/Let-s-build-a-compiler" rel="nofollow">https://github.com/lotabout/Let-s-build-a-compiler</a>
The "Getting Started with Redux" course on egghead.io, from Dan Abramov, developer of Redux, basically has you write Redux from scratch to learn how it works:<p><a href="https://egghead.io/courses/getting-started-with-redux" rel="nofollow">https://egghead.io/courses/getting-started-with-redux</a>
I wrote <i>Hello Web App</i> to teach Django + Python web app development by talking readers through creating a unique project (using a project template described in the tutorial): <a href="https://hellowebbooks.com/learn-django" rel="nofollow">https://hellowebbooks.com/learn-django</a><p>I'm actually fundraising for the new edition of the book, updated for Python3+Django2.0: <a href="https://www.kickstarter.com/projects/1868398473/hello-web-app-20-build-your-first-web-app-with-dja" rel="nofollow">https://www.kickstarter.com/projects/1868398473/hello-web-ap...</a>
Here is a Javascript program that implements the basics of the git version control system. It is a literate program with a prose explanation in side-by-side format:<p><a href="http://gitlet.maryrosecook.com/docs/gitlet.html" rel="nofollow">http://gitlet.maryrosecook.com/docs/gitlet.html</a><p>Here is another side-by-side example. It is a Python program that implements a very simple interpreter for the Lisp programming language.<p><a href="http://khamidou.com/compilers/lisp.py/" rel="nofollow">http://khamidou.com/compilers/lisp.py/</a>
Build your own really shitty Redis. Then make it less shitty.<p>A really shitty Redis/HTTP can be built in around 100 lines in many languages (assuming the language stdlib helps you out a bit -- Python, Go, Clojure would all fit).<p>The fun begins when you make a concentrated effort into making it less shitty. What tradeoffs will you make to what gain? It's a fun space to explore.
Take a look at Gary Bernhardt's From Scratch series:<p><a href="https://www.destroyallsoftware.com/screencasts/catalog" rel="nofollow">https://www.destroyallsoftware.com/screencasts/catalog</a><p>Not free, but very good.
'How to Build Tinder with React Native & Expo' It's a bit longer and more complex than what your asking for but I just finished building out a course learning React Native & Expo by building a Tinder clone <a href="https://www.udemy.com/how-to-build-tinder/?couponCode=LEARNREACT" rel="nofollow">https://www.udemy.com/how-to-build-tinder/?couponCode=LEARNR...</a>
Not my project, but Writing An Interpreter in Go is excellent: <a href="https://interpreterbook.com/" rel="nofollow">https://interpreterbook.com/</a>
Lots of good stuff already in the comments! Here are some examples/tutorials I wrote on my blog:<p>- A TDD approach for building a simple microprocessor model in Python: <a href="http://joaoventura.net/blog/2017/simple-microprocessor/" rel="nofollow">http://joaoventura.net/blog/2017/simple-microprocessor/</a><p>- Building a basic HTTP Server from scratch in Python: <a href="http://joaoventura.net/blog/2017/python-webserver/" rel="nofollow">http://joaoventura.net/blog/2017/python-webserver/</a>
Redox OS has `orbutils`, a bunch of simplistic GUI utilites written in Rust and somewhat cross-platform (it's possible to build and run them on other platforms) [0].<p>The most interesting and educational one for me is `browser`, which crudely shows web pages and is written in less than a thousand lines of Rust from scratch.<p>[0] <a href="https://github.com/redox-os/orbutils/tree/6764004b9f6f386af17031d302430a89057ba77e/src" rel="nofollow">https://github.com/redox-os/orbutils/tree/6764004b9f6f386af1...</a>
I enjoyed <a href="https://viewsourcecode.org/snaptoken/kilo/" rel="nofollow">https://viewsourcecode.org/snaptoken/kilo/</a>
and <a href="http://www.buildyourownlisp.com/" rel="nofollow">http://www.buildyourownlisp.com/</a>
A series on building modern business apps <a href="https://www.voucherify.io/blog/building-an-online-marketplace-from-scratch-introduction" rel="nofollow">https://www.voucherify.io/blog/building-an-online-marketplac...</a>
There is the famous Linux From Scratch [1] which teaches how to build a functioning GNU Linux system from the grounds up.<p>[1] <a href="http://www.linuxfromscratch.org/" rel="nofollow">http://www.linuxfromscratch.org/</a>
I started an awesome list with the content from this discussion: <a href="https://github.com/cweagans/awesome-diy-software" rel="nofollow">https://github.com/cweagans/awesome-diy-software</a>
Writing a full-featured multi-tenant web app from scratch: <a href="https://medium.com/@ashokgelal/writing-a-full-featured-multi-tenant-laravel-app-from-scratch-a0e1a7350d9d" rel="nofollow">https://medium.com/@ashokgelal/writing-a-full-featured-multi...</a>
A pretty concise regex engine, along with the explanation: <a href="https://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html" rel="nofollow">https://www.cs.princeton.edu/courses/archive/spr09/cos333/be...</a>
Build your own React (<a href="https://github.com/hexacta/didact" rel="nofollow">https://github.com/hexacta/didact</a>).
There's a Github repo[1] with a collection of project based tutorials.<p>1. <a href="https://github.com/tuvtran/project-based-learning" rel="nofollow">https://github.com/tuvtran/project-based-learning</a>
Write your own software renderer, and learn how the principles of computer rendering work: <a href="https://github.com/ssloy/tinyrenderer" rel="nofollow">https://github.com/ssloy/tinyrenderer</a><p>The wiki has lessons in detail: <a href="https://github.com/ssloy/tinyrenderer/wiki/Lesson-1:-Bresenham%E2%80%99s-Line-Drawing-Algorithm" rel="nofollow">https://github.com/ssloy/tinyrenderer/wiki/Lesson-1:-Bresenh...</a>
Implementing a Key-Value Store<p><a href="http://codecapsule.com/2012/11/07/implementing-a-key-value-store-part-1-what-are-key-value-stores-and-why-implement-one/" rel="nofollow">http://codecapsule.com/2012/11/07/implementing-a-key-value-s...</a><p>Let's Make a Voxel Engine<p><a href="https://sites.google.com/site/letsmakeavoxelengine/" rel="nofollow">https://sites.google.com/site/letsmakeavoxelengine/</a>
This Tutorial shows how to create a full game (Asteroids-Like) with Love2D and Lua. The game itself is available on Steam. The course is free, and you can pay to get the full source code and the solutions to the tasks. Doing it right now, about halfway through. Really engaging and interesting so far.<p><a href="https://github.com/SSYGEN/blog/issues/30" rel="nofollow">https://github.com/SSYGEN/blog/issues/30</a>
Unity's roll-a-ball tutorial is pretty good for starting out with their IDE and also gives some decent exposure to C# basics.<p><a href="https://unity3d.com/learn/tutorials/s/roll-ball-tutorial" rel="nofollow">https://unity3d.com/learn/tutorials/s/roll-ball-tutorial</a>
This is properly hands-on as you have to make something :)
<a href="http://www.technoblogy.com/show?NMX" rel="nofollow">http://www.technoblogy.com/show?NMX</a><p>Click on the ATTiny85 tag for more projects. I've made / adapted quite a few of those. Great fun and challenging!
So with these sort of tutorials/guides is it generally a good practice to build on extra functionality to learn more?<p>I always feel like it's too much hand holding, or I'm just copying/re-building the wheel and not learning enough, but I do very much enjoy them.
Write You A Scheme, Version 2: <a href="https://github.com/write-you-a-scheme-v2/scheme" rel="nofollow">https://github.com/write-you-a-scheme-v2/scheme</a><p>Use Haskell to write a Scheme!
"Write Yourself a Roguelike" is an Open Source project that started as a ebook by a former Thoughtbot employee. <a href="https://github.com/thoughtbot/write-yourself-a-roguelike" rel="nofollow">https://github.com/thoughtbot/write-yourself-a-roguelike</a><p>It's very much still in progress, but certainly fits the brief.
This guide to Build Your Own React is great and even includes React Fiber. well worth it. <a href="https://github.com/hexacta/didact" rel="nofollow">https://github.com/hexacta/didact</a>
One of my favorites: <a href="http://peter.michaux.ca/articles/scheme-from-scratch-introduction" rel="nofollow">http://peter.michaux.ca/articles/scheme-from-scratch-introdu...</a>
Before switching to React, I learned a lot about Angular from <a href="https://teropa.info/build-your-own-angular/" rel="nofollow">https://teropa.info/build-your-own-angular/</a>
'Write your own Operating System' by tuhdo<p><a href="https://github.com/tuhdo/os01" rel="nofollow">https://github.com/tuhdo/os01</a>