19 ms·
Ask HN: Books that teach programming by building a series of small projects?
It is common knowledge that when first learning programming, one should start with small projects to build something real rather than learning rules and syntax of the language only.
Which are some of the best books that take a project based approach in teaching programming to a beginner?
- olkyts 4y agoLearning Rust, I use these 2: 1. Command-Line Rust: A Project-Based Primer for Writing Rust CLIs 2. Zero To Production In Rust (it's actually one project)
- devd00d 4y agoNot quite programming but certainly covers the "small projects" part. This is what taught me the basics of Unreal Engine: https://www.youtube.com/watch?v=k-zMkzmduqI https://www.youtube.com/watch?v=k-zMkzmduqI
- kirso 4y agoI failed to learn for the past 10 years and I am complicit. But partially as a self-taught, you have no clue which resources are good and which are not. Recently all mainstream "learn to code" sources realised just making you memorise concepts doesn't work and started changing curriculum, but before that happens... The best 2 resources I found are: - https://learnprogramming.online/ https://learnprogramming.online/ - https://scrimba.com https://scrimba.com Both are project driven and won't hand-hold you if you want to continue, you need to proceed based on a mastery learning method.
- volodarik_lemon 4y agoAll Swift by Sundell series are pretty good.
- basicallydan 4y agoIf they don't exist, this is a good idea for anybody looking for a project to write a programming book
- cameron_b 4y agoThere are many, but the field is still wide open. Anyone with a particular domain experience should find a market. There are lots of starting from scratch guides, and few focused guides. for subject in ["Finance", "Contact Management", "Service Desk Automation", "Web Apps from scratch", "Web Apps on someone else's API", "Baseball Metrics"]: for language in ["R", "Go", "Python3", "Rust", "Lisp"]: print(f"Examples for {subject} in {language} would make a good book.") edit: no idea how to smash indent-formatting into MD-for-HN
- Nzen 4y agoPrefix each line with two spaces, per the formatdoc page [0] [0] https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc for subject in [ "Finance", "Contact Management", "Service Desk Automation", "Web Apps from scratch", "Web Apps on someone else's API", "Baseball Metrics" ] : for language in [ "R", "Go", "Python3", "Rust", "Lisp" ] : print(f"Examples for {subject} in {language} would make a good book.")
- cameron_b 4y agoThanks!
- theshrike79 4y agoIf we're talking a complete beginner with maybe only "hello world" level skills I recommend the Lego BOOST set: https://www.lego.com/en-fi/product/boost-creative-toolbox-17101 https://www.lego.com/en-fi/product/boost-creative-toolbox-17... It teaches you step by step the basics of programming (loops, function calls etc) using a scratch-like programming language.
- oidar 4y agoAny alternative to this? I think lego stopped making it.
- theshrike79 4y agothe Mindstorms Robot Inventor is a bit more advanced (Scratch-like vs Scratch Jr on the Boost) and twice as expensive: https://www.lego.com/en-us/product/robot-inventor-51515 https://www.lego.com/en-us/product/robot-inventor-51515
- tsm 4y agoSoftware Design by Example (https://www.routledge.com/Software-Design-by-Example-A-Tool-Based-Introduction-with-JavaScript/Wilson/p/book/9781032330235 https://www.routledge.com/Software-Design-by-Example-A-Tool-...) Available free online at https://third-bit.com/sdxjs/ https://third-bit.com/sdxjs/
- pixelmonkey 4y agoNot a book, but CS50x is a freely available course with high quality videos and lecture notes. The lecture exercises are programming projects of sorts. It teaches programming from scratch with C and then Python. Plus, since a lot of students take it, there are lots of online resources with tips, like the CS50 subreddit. https://cs50.harvard.edu/x/2023/ https://cs50.harvard.edu/x/2023/
- cehrlich 4y agoCS50x and CS50web are fantastic. web is a bit outdated but it doesn't matter because the projects are so good.
- rahuldan 4y agoThere is this excellent Github repo for this: https://github.com/codecrafters-io/build-your-own-x https://github.com/codecrafters-io/build-your-own-x It has a collection of blogs for building various small projects to learn different languages.
- asicsp 4y agoSimilar resources: * Projectbook https://projectbook.code.brettchalupa.com/ https://projectbook.code.brettchalupa.com/ * Project Based Learning https://github.com/practical-tutorials/project-based-learning https://github.com/practical-tutorials/project-based-learnin...
- saperyton 4y agoThe Advanced Beginner blog post series by Robert Heaton is great.
- asicsp 4y agoLink: https://robertheaton.com/2018/12/08/programming-projects-for-advanced-beginners/ https://robertheaton.com/2018/12/08/programming-projects-for...
- ultrasounder 4y agoIn the same vein I can also suggest ; https://hackattic.com https://hackattic.com and http://newcoder.io http://newcoder.io Both take the student through the process of building one fully-functional application.
- jtmiclat 4y agoI found Al Sweigart's books nice for beginners. Highlights https://automatetheboringstuff.com https://automatetheboringstuff.com https://inventwithpython.com/bigbookpython https://inventwithpython.com/bigbookpython
- kennyfrc 4y agoThere’s quite a few: - Zed Shaw’s Learn More Python the Hard Way[1] - Brian Hogan’s Exercises for Programmers (best for beginners or for learning a new language)[2] - Hal Fulton’s The Ruby Way[3] - Chris Ferdinandi’s Vanilla JS Academy[4] - Marc-Andre Cournoyer’s Great Code Club (it’s old, and the community doesn’t exist anymore, but i think he still maintains it)[5] - A few python books from No Starch Press (notably those authored by Al Sweigart) I learned the most as a beginner from Zed Shaw’s work, and from reading open source code. Once you’re done with the initial “learn from tutorials” phase, there’s no better resource than reading open source code. [1] https://www.amazon.com/Learn-More-Python-Hard-Way/dp/0134123484/ref=mp_s_a_1_1?crid=QA7619O1989I&keywords=zed+shaw+learn+more+python&qid=1673963222&sprefix=zed+shaw+learn+more+puthon%2Caps%2C343&sr=8-1 https://www.amazon.com/Learn-More-Python-Hard-Way/dp/0134123... [2] https://www.amazon.com/Exercises-Programmers-Challenges-Develop-Coding/dp/1680501224 https://www.amazon.com/Exercises-Programmers-Challenges-Deve... [3] https://www.amazon.com/Ruby-Way-Programming-Addison-Wesley-Professional/dp/0321714636 https://www.amazon.com/Ruby-Way-Programming-Addison-Wesley-P... [4] https://vanillajsacademy.com/ https://vanillajsacademy.com/ [5] https://www.greatcodeclub.com/ https://www.greatcodeclub.com/
- darreninthenet 4y agoIs Shaw's first Python book any good?
- kennyfrc 4y agoIf you’re a pure beginner with zero programming experience, yes. If you’ve programmed a few scripts and have done a flask web app, his first book might be too easy.
- cameron_b 4y agoI found his Learn Python3 The Hard Way to be a great series of exercises if you're starting out or starting again. You won't find -everything- on any topic, but the exercises are complete enough to get you rolling and seed the sort of patterns that will make you successful in looking for more material. I had a little bit of Python(2) under my belt from general curiosity, and I've done some C++ in high school so I have some "CS Theory" There is a "more" python version out now https://learncodethehardway.org/more-python-book/ https://learncodethehardway.org/more-python-book/ Amazon ( the "newer" version proposed is not, it's his python2 book ) https://www.amazon.com/Learn-More-Python-Hard-Way/dp/0134123484 https://www.amazon.com/Learn-More-Python-Hard-Way/dp/0134123...
- poszlem 4y agoI can recommend "Programming: Principles and Practice Using C++", although the fact that it uses C++ as a first language can be a downside to some.
- throwawaybnb123 4y agoCodecademy has projects page: https://www.codecademy.com/projects https://www.codecademy.com/projects
- werber 4y agohttps://eloquentjavascript.net/ https://eloquentjavascript.net/ is nice and project based, it builds up from 0
- nemoniac 4y agoNand2tetris https://www.nand2tetris.org/ https://www.nand2tetris.org/
- gen_greyface 4y agocheck this https://news.ycombinator.com/item?id=22299180 https://news.ycombinator.com/item?id=22299180 Ask HN: What are some books where the reader learns by building projects?
- __warlord__ 4y agoNot a book, but check [Build your own X](https://github.com/codecrafters-io/build-your-own-x https://github.com/codecrafters-io/build-your-own-x), a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch.
- boredemployee 4y ago>> one should start with small projects to build something real rather than learning rules and syntax of the language only. Yes, but don't overlook the great learning that is gained, at the beginning of any learning, by studying from many different sources (aka good books). It seems that something magical happens when you do this: the confrontation of ideas from different sources can make you better absorb ideas and resolve any doubts that you didn't understand before.
- larve 4y agoPeter norvig’s paradigms of artificial intelligence programming, despite its age, is a delight. https://norvig.github.io/paip-lisp/#/ https://norvig.github.io/paip-lisp/#/
- newsoul 4y agoBut is that suitable for a beginner?
- nesarkvechnep 4y agoYes, it is. It’s not about machine learning, neural networks but the more approachable AI of the 80s.
- globalise83 4y agoHaven't tried his, but can GPT3 write code that results in 1980s style AI?
- nesarkvechnep 4y agoWhy not go ask it?
- larve 4y agoIt depends on what you mean by beginner, but I would say for someone who has been futzing with a couple of js boot camps or building some php websites, it’s what takes you from hacking to software development. Completely new to programming, maybe, if someone has a background in maths or physics and has a sense of “rigor” in thinking. But, of all the books I worked through, this is the one I remember just having tons of fun because the examples are so cool and the code so… clear. I think norvigs programming course in python (which I only skimmed) could be a great modern equivalent.
- LastTrain 4y agoWhen I was young, I went about it the opposite way. I thought of some small project and researched how to implement it, then moved on to something bigger. Everybody is different of course, but I felt like I learned more having to figure out how to go about implementing each myself.
- bartvk 4y agoLearn Swift in 100 days. It start with the basics using Swift Playgrounds. But as soon as possible, it starts with building apps. https://www.hackingwithswift.com/100 https://www.hackingwithswift.com/100
- _jcrossley 4y agoCame to say the same thing - plus, there's a great 100 Days of SwiftUI as well, which gets nontrivial apps running pretty quickly.
- phowat 4y agohttp://landoflisp.com/ http://landoflisp.com/ Was a really fun read.
- rg111 4y agoA similar great book is Realm of Racket.
- kriro 4y ago"Hands on Rust" teaches Rust by building a rogue like game step by step. Before that there's a chapter where you rebuild Flappy Bird from scratch that teaches the "basics" before diving into more advanced concepts in the rogue like. I liked the approach and recommend the book but it's fast paced and expects quite a bit from the reader (it's excellent if you have some programming experience already but probably daunting as a true first book imo).
- myers 4y agoI second this one. This was a great book. There are some follow ups to the final project I like Compile to WASM so you can run on the web: <https://hands-on-rust.com/2021/11/06/run-your-rust-games-in-a-browser-hands-on-rust-bonus-content/ https://hands-on-rust.com/2021/11/06/run-your-rust-games-in-...> Port to the Bevy ECS: <https://saveriomiroddi.github.io/learn_bevy_ecs_by_ripping_off/ https://saveriomiroddi.github.io/learn_bevy_ecs_by_ripping_o...>
- kriro 4y agoOh cool I wasn't aware of these. Thanks for sharing, both look very interesting. I like the idea of reusing projects to teach different tech :)
- hgsgm 4y agocheckio.com for increasing challenges in Python or JS. But also pretty much every book does that.
- dartharva 4y agoI don't know why jtimiclat's comment recommending Al Sweigart's books got downvoted and faded out, they are indeed quite good for beginners wanting to get their hands dirty with programming instead of cramming it in an academic way. Not to mention they're all freely available and give excellent value for both time and money: https://inventwithpython.com/ https://inventwithpython.com/
- ajoseps 4y agoThis book is still in progress but I've gone through some of the chapters and have enjoyed it. Rust from the Ground Up: https://leanpub.com/rust-from-the-ground-up https://leanpub.com/rust-from-the-ground-up I was looking for a book that had offline projects I can work on while on flights, and this book focuses on rebuilding linux utilities using rust. The other nice part is that you get a better understanding of linux internals. I believe the author is also responsive on the rust subreddit.
- mprovost 4y agoThanks for the kind words! I'm desperately polishing the next chapter for publication...
- ajoseps 4y agogreat to see you on HN as well! I haven't revisited the book in a while but I really liked the chapters I did work on. I have another flight coming up soon so maybe I'll try another chapter :)
- tmtvl 4y agoCommon Lisp: A Gentle Introduction to Symbolic Computation(https://www.cs.cmu.edu/~dst/LispBook/ https://www.cs.cmu.edu/~dst/LispBook/) has you build a number of small applications, like a substitution decipher application, a plotting function, and more, which it calls "keyboard exercises".
- tjpnz 4y agoMUD Game Programming. Not sure how easy obtaining a copy would be in 2023 but it has two projects which I recall being a lot of fun. I never did build a successful MUD but did learn a fair amount about network programming. https://www.goodreads.com/en/book/show/927128.Mud_Game_Programming_With_CDROM_ https://www.goodreads.com/en/book/show/927128.Mud_Game_Progr...
- Jemaclus 4y agoI build MUDs whenever I learn a new language! Didn't know there was a BOOK for it! Wow. Very cool!
- rg111 4y agoI recently finished the book that teaches programming by developing games using DragonRubyGameToolkit. Really loved this book. _____ Python Crash Course by Eric Matthes has a section dedicated to projects. I really liked this book. This is what taught me Python. I knew C before.
- kgwxd 4y agoProgramming Games for Atari 2600 https://forums.atariage.com/topic/339819-upcoming-book-on-atari-2600-programming-now-available/#comment-5153794 https://forums.atariage.com/topic/339819-upcoming-book-on-at...
- modernerd 4y agoFor Swift: https://www.apple.com/swift/playgrounds/ https://www.apple.com/swift/playgrounds/ (I've had more success introducing programming with this than with any of the links below; it's a very compelling intro for those who already own an iPad/Mac, and the core concepts are generalisable to other languages/environments even if it's specific to Apple's APIs and hardware.) ~~~ For Python: https://automatetheboringstuff.com https://automatetheboringstuff.com https://nostarch.com/big-book-small-python-projects https://nostarch.com/big-book-small-python-projects ~~~ For JS: https://eloquentjavascript.net https://eloquentjavascript.net (project-based and for beginners) https://javascript30.com https://javascript30.com (not for total beginners or self-study, would need a friend/tutor)
- Sn0wCoder 4y agoI second eloquent JavaScript. Been doing this book since v1 and recommend to just about anyone that asks for recommendations. I use typescript daily and have been hoping that this book gets updated for TS although it would be hard since it uses lots of JS tricks that may or may not be best practices in TS. Technically just renaming the files from .js to .TS would work the linter would go crazy
- bpesquet 4y agoI beg to differ: for all its qualities, Eloquent JavaScript is not a very beginner-friendly book. It goes quite deep into many JS intricaties and contains a lot of challenging tasks for people just discovering programming. More beginner-focused alternatives are https://www.freecodecamp.org https://www.freecodecamp.org and https://thejsway.net https://thejsway.net. Disclaimer: I've been teaching programming professionally for 15+ years and wrote the latter.
- Sn0wCoder 4y agoI have recommended to beginners before and most of them thanked me. I skimmed the page for your book but did not see the link to the free version. I am on mobile so maybe just missed it. Says read free here, but here is not a link. Clicking the book takes you to Amazon.
- elias94 4y agoI would suggest Practical Common Lisp https://gigamonkeys.com/book/ https://gigamonkeys.com/book/ You will create a MP3 database, a web server, a spam filter, a HTML generator. Really practical!
- forrestbrazeal 4y agoMy Cloud Resume Challenge project [0] and book [1] uses a set of small, stackable mini-projects to introduce beginners to many of the pragmatic skills used in cloud software engineering. [0] https://cloudresumechallenge.dev/docs/the-challenge/ https://cloudresumechallenge.dev/docs/the-challenge/ [1] https://cloudresumechallenge.dev/book/ https://cloudresumechallenge.dev/book/
- skizm 4y agoWhile on the topic, how about any books or courses that teach building a 3D game engine from scratch? I'm language agnostic, so any language is fine.
- AlexeyBrin 4y agoI think pikuma.com has a course about implementing a 3D rasterizer from scratch in C.
- atan2 4y agoThe best!!!
- twawaaay 4y agoMy favourite is "Practical Common Lisp" by Peter Seibel (https://gigamonkeys.com/book/ https://gigamonkeys.com/book/) Not only is the book free to read (although I would suggest to pay for it if you like it!) The code to parse binary files actually "inspired" my design of an actual production application which was very flexible, succinct and, most importantly, so fast I had to spend a lot of effort convincing people the numbers are actually true. It taught me some important lessons about how you can achieve performance with Lisp languages and the real reasons for the power of macros. Not too shabby for the first book on Lisp I red!
- halkony 4y agoI've been learning lisp this past week. I think I get the main idea of "code is data and data is code", but I struggle to understand how it's more powerful than, say, making a function factory in Python.
- agumonkey 4y agomaybe a function factory is just an OO pattern for return closures, it's difficult to not perceive things from 'now', but i'll be frank i 1) never liked DP 2) couldn't spend more than 5 minutes reading about them as it seemed more verbose and redundant
- majormunky 4y agoI'm also learning lisp, mainly as a part of learning emacs, so I may not be super accurate here. In python, when you have a reference to a function, its a bit opaque, you can tell the thing is a function, but I don't think you can really go into the function object, and alter it lets say. You may be able to using the AST or something, but its not a "first-class" thing you can do. In lisp (and code is data, data is code), the function is also a list, so you would be able to use all the normal programming tools to iterate over the list, add new items to the list, etc, which can change how the function runs.
- altruios 4y agoSuch a concept could use an example to solidify that point. If I have a function Foo that adds two numbers together. How is that represented in lisp (as a list you say?)? How would one alter that function/lisp-list: to multiply numbers instead?
- eatonphil 4y agoSort of like that, I've been slowly working on a rosetta code for implementations of small problems. Rosettacode.org allows you to use standard library functions so many (but not all) of their examples are useless when you actually want to see how to code something from hand in the language. So my rosetta code only allows you to implement the main part of the thing yourself. But it's not appropriate for beginners. It's more appropriate for teaching a new language to someone who is already an intermediate programmer. https://tinyprograms.org/ https://tinyprograms.org/
- hiAndrewQuinn 4y agoGod, I hope you just found Rosetta.code off limits. That's a fantastic name
- CraigJPerry 4y agoHTDPv2 https://htdp.org/ https://htdp.org/ - it's about learning to program rather than teaching a specific language. I thought the little projects you build along the way struck a good balance of interest, e.g. you're building a snake game by section 2 (but crucially you've already been exposed to how to think about data so you're not just dropped into the deep end with some boilerplate to fiddle with). Anyway, i could write tons of praise for this book but it's convinced me to ditch python for teaching newbies and i LOVED python for getting newbies started real quick with projects for years.
- newsoul 4y agoI wouldn't mind if you write some more about the book.
- dns_snek 4y agoThat sound like an interesting approach and I'd love to hear more about it! One striking difference compared to most "beginner languages" is the Lisp-like syntax. I think focusing on problem solving rather than learning syntax is a great goal, but does this particular choice of a language make it harder for your "students" to continue learning in another language? I'm assuming they would switch to a more popular language at some point (with syntax that resembles C), so I'm curious what that transition is like for beginners.
- agumonkey 4y agoInteresting, I rarely see it mentioned. How do people react to the mindset it teaches ? I really like that it's near language-less programming book, really more about and/or :)
- jonjacky 4y agoThe famous Structure and Interpretation of Computer Programs (SICP) does this, in the Scheme language. The whole book is online here, with the table of contents right at the front: https://web.mit.edu/6.001/6.037/sicp.pdf https://web.mit.edu/6.001/6.037/sicp.pdf
- bosch_mind 4y agoThere’s a JS edition too
- beeburrt 4y agoAnd a 'comparison' edition https://sicp.sourceacademy.org/ https://sicp.sourceacademy.org/
- patchorang 4y agoNot a book and webdev focused, but I've been doing https://fullstackopen.com/en/ https://fullstackopen.com/en/ and it's been great. The chapters are structured so you are building 2 projects at once. One where you follow along with the chapter material with example code and explanations. And a second in the exercises. I really like it because it introduces the concepts in the context of a project, but you can't get stuck because the code is there too. Then you need to really apply it in the exercises on your own project, without the example code.
- kirso 4y agoIts a great resource, but not for total beginners, however if you know basics of html, css and javascript this is hands-down one of the best resources out there.
- velmu 4y agoThe Symfony Fast Track book takes this approach: https://symfony.com/doc/6.2/the-fast-track/en/index.html https://symfony.com/doc/6.2/the-fast-track/en/index.html
- kdmitry 4y agoI have done courses on udemy like this before for learning new languages and tech stacks. There are plenty of courses on there that you can usually get for $20 that will teach you by building a bunch of small apps or services that build up in complexity.
- eu 4y agohttp://tinypythonprojects.com/ http://tinypythonprojects.com/
- fellowniusmonk 4y agoIt's not quite the same as what you are looking for, but I've known multiple people who were stuck in their attemp to learn to code before using railstutorial, I view it and the book "sql: visual quickstart guide" as two very well designed intros that manage to avoid having sections with random jumps in difficulty and terminology usage that can leave true beginners behind.
- jcon321 4y agoNo joke, "C for Dummies" - it's more teaching you CS101 concepts, less about "C". Tons of examples to go through and the attitude of the author is very helpful compared to a lot of other styles out there. I was failing my computer science classes first semester. Towards the end of the semester I sat down in the library for a few days and just went page by page typing every example and compiling it. Aced every IT class I had the next few years. I attribute that book to making everything "click" for me. Once you understand the beginner concepts that book shows, then you as an individual would know where to look to gain improvement.
- anurags 4y agohttps://github.com/practical-tutorials/project-based-learning https://github.com/practical-tutorials/project-based-learnin...
- robaye 4y agoC Programming: A Modern Approach by K. N. King. I’ve never seen another book that contains as many exercises and projects as Kings book does.
- evandale 4y agoHow to Design Programs: https://htdp.org/2022-8-7/Book/index.html https://htdp.org/2022-8-7/Book/index.html It's lots of small problems that seem like projects and I've found it fun to expand on the examples on your own beyond what the book asks.
- feliixh 4y agoAutomate the boring stuff with Python
- HellDunkel 4y agoThe Rust Programming Language by Steve Klabnik and Carol Nichols. I don’t think it’s a language for beginners though.
- azhenley 4y agoCheck out my blog series, "Challenging projects every programmer should try". Who knows, maybe I will turn it into a book that shows how to implement each project :) https://austinhenley.com/blog/challengingprojects.html https://austinhenley.com/blog/challengingprojects.html
- cinntaile 4y agoI like your list. Maybe you could break the projects down into smaller subproblems (you sort of do that already) but I personally don't like seeing the implementation. It gives you a false sense of understanding imo.
- fedeb95 4y agoParenthesis: keep in mind that while learning by doing might be a good way to begin, even if I wouldn't be so sure as wether one "should" or "could" start along such a path, at some point you'll be stuck without studying the "boring" stuff you've delayed. True programming is realising the boring stuff weren't so boring in the first place
- tasuki 4y agoI'm very much a fan of a project-based approach. However, I wouldn't recommend any book for that. I'd ask the apprentice what they'd like to achieve, and try to reduce scope as much as possible. There's a world of difference in motivation when building something you want to exist, versus building a project because a book told you so.
- culopatin 4y agoMy biggest gripe with all the project tutorials I’ve seen is that really quickly you get into a “ok I get what we’re doing” and then just copy the code they provide. At the end of the day you did zero mental workout because you didn’t have to figure out the code. I hope to find one of these that guides you but doesn’t give you the code immediately, but has a code answer key at the end or something. I get it that it’s not easy to do, but there must be one out there that doesn’t spoon-feed you everything.
- dielll 4y agoDatacamp does what you want
- ojl 4y agoThat’s why I like The Ray Tracer Challenge. He gives you test scenarios and a little bit of pseudo code (sometimes). The actual implementation has to be done by the reader. http://raytracerchallenge.com/ http://raytracerchallenge.com/
- the_gastropod 4y ago+1 This is one of my favorite programming books. It's a very rewarding-feeling experience to build something so capable so quickly.
- aeontech 4y agoThat's really cool, probably deserves its own submission for discussion!
- intelVISA 4y agoThinking of building something along those lines i.e. you can peek ahead if you really get stuck. Proj-based learning is really fun to both create and consume imo.
- culopatin 4y agoIf it helps you in any way, what I try to do is to use a tutorial book to build my own app. For example a Flask tutorial that shows how to build a blog app, but I’m building a library. I still learn about the Flask way and I learn some building blocks but I have to figure out the equivalent for what I want to do. I often get stuck though. So maybe showing the building blocks and letting you use them for something. You could perhaps show 2 or 3 suggested projects that are built with the building blocks. You show the generic version of the blocks, and then you figure out how to tweak them to make one of the 2 or 3 suggested projects. Sort of buying the legos and then showing what you could do with them. But building it is up to you.
- unrequited 4y agohttps://shop.jcoglan.com/building-git/ https://shop.jcoglan.com/building-git/ This is an excellent resource.
- samvher 4y agoSoftware Foundations is a series of interactive books where you work through proofs in Coq, gradually increasing in complexity: https://softwarefoundations.cis.upenn.edu/ https://softwarefoundations.cis.upenn.edu/ This is a bit on the edge of the domain that you're asking about (not really for beginners, and proofs are perhaps a somewhat niche type of programming) but I learned a lot from this and many people don't seem to know it, so I think it belongs in the list.
- icco 4y agoPretty much all of the books at newline do this: https://www.newline.co/ https://www.newline.co/
- dan-g 4y agohttps://beautifulracket.com/ https://beautifulracket.com/ by Matthew Butterick - “An Introduction to Language-Oriented Programming Using Racket”
- weird_user 4y agoFor beginners, Daniel Holden's Build Your Own Lisp[1] is excellent material for learning C. It's a very succinct book. For intermediate programmers, Build Your Own Redis[2] is a WIP book I am currently writing. [1] https://buildyourownlisp.com/ https://buildyourownlisp.com/ [2] https://build-your-own.org/ https://build-your-own.org/
- tejohnso 4y agoBuild your own redis sounds like a good idea, but I found the title confusing as C and C++ are different languages and you're using the old "C/C++" phrasing. I immediately wondered, "well, which is it?" So I dug into it a bit, and from the introduction I see it's "mostly C with some C++ features". But if you're going to require C++ features/libraries and a C++ compiler, then it's not C. So why not just say it's C++? I guess another way to ask is: what makes it "mostly C"? Is it a market capture decision? Is there some interesting language tradeoff involved?
- allie1 4y agoManning.com also has LiveProjects which are good for Machine Learning projects
- ThomPete 4y agoChatGPT is probably much better at doing that for you. You can start with anything you want and explore as deep as you want.
- azemetre 4y agoWhile not for beginners, if you'd like to learn rust I recently finished "Command line Rust" [1]. It was my first introduction to rust and the book was quite enjoyable. It starts off with teaching you the very basics of a command line (what it means to exit, true, or false, etc) and each chapter has you recreate a popular command line tool (like grep, cal, tail, wc) while introducing a new rust concept. The book also does TDD, test driven design, by first teaching you how to create these tests then in subsequent chapters having the tests prewritten for you. It's definitely worth a look, the author has a great writing style as well that isn't as monotonous as most programming books I've read. [1] https://www.oreilly.com/library/view/command-line-rust/9781098109424/ https://www.oreilly.com/library/view/command-line-rust/97810...
- adolph 4y agoCame here to mention just that book. It is excellent.
- lifewallet_dev 4y agoThank you! I needed this one, how fun, I did this when learning Haskell, now I can do it with Rust.
- dbalatero 4y agoJust to clarify, when you say "not for beginners" do you mean beginners to Rust or programming in general? edit: Based on your "It was my first introduction to rust" comment I think maybe you meant programming beginners?
- RomanPushkin 4y agoShameless plug: FREE https://leanpub.com/rubyisforfun https://leanpub.com/rubyisforfun - Ruby Is For Fun, I made the book so you do a lot of exercise. There is around 80 exercises in total. Rewritten as a course: https://www.educative.io/courses/handbook-ruby-developers https://www.educative.io/courses/handbook-ruby-developers
- hlship 4y agoNot quite a beginner book, but you should check out https://www.amazon.com/Mazes-Programmers-Twisty-Little-Passages/dp/1680500554 https://www.amazon.com/Mazes-Programmers-Twisty-Little-Passa....
- cratermoon 4y agoPractical Common Lisp by Peter Seibel
- WoodenChair 4y agoFor intermediate programmer, that's what we do in the Classic Computer Science Problems series (https://classicproblems.com https://classicproblems.com). We combine learning programming with learning computer science problem solving techniques.
- autodev1 4y ago- Pick a language - Find a recent book (< 2 yrs old) on LibGen.is - OR, a Udemy.com video series (note: never pay more than $12 or so-- the promo rate. If you see a higher price, just create a new email & user account (or reset cookies?) and you'll see the promo price again) - Visit: Roadmap.sh to get a sense of a learning roadmap what knowledge to build. - Use a search engine to answer questions, such as "free learning resource for learning <XYZ thing>"
- AlwaysRock 4y agoMost udemy/MOOC courses are structured this way. I tend to just look for the highest rated ones on whatever language I'm interested in and make sure it says build projects or something similar.
- rcardo11 4y agoThis is the best programming book I have ever picked https://www.amazon.com/-/es/Noam-Nisan/dp/0262539802/ref=sr_1_1?keywords=nand2tetris&qid=1673977221&sprefix=nand2%2Caps%2C322&sr=8-1 https://www.amazon.com/-/es/Noam-Nisan/dp/0262539802/ref=sr_...
- MarkusWandel 4y ago"Software Tools" by Kernighan & Plauger, perhaps. The original was in Ratfor, which is a Fortran dialect. That being similar syntax but more limited than C is not a bad intro language.
- abecedarius 4y agoThere's a later edition Software Tools in Pascal which had some improvements. (According to the preface iirc. I didn't read that one since I found the earlier book first.)
- maCDzP 4y agoI like “The Elements of Computing Systems: Building a Modern Computer from First Principles”. You build a whole computer from scratch through small projects. Sure, you want learn a specific language, but you’ll grock programming in general.
- kriro 4y agoI highly recommend this, it made the whole topic of "how does a computer actually work" approachable for me. On their website there's a projects section where they highlight things their students did and there's a project that re-creates the built computer in an FPGA (I belive some ice40) I also recommend this as a follow up.
- Plasmoid 4y agoActually, Advent of Code is pretty good. The problems are challenging but you have a defined end condition and lots of help out on the internet.
- numbsafari 4y ago“Programming BASIC Adventure Games for the TRS-80” “Assembly Language, Step by Step” Check those out.
- ilyt 4y agoIt's common approach because building something that you want is good motivation. I don't think that works as well when it is some random project from the book. Like, sure, better than dry code, but I'm far more motivated to learn when I also make something for me.
- Icathian 4y agoThe challenge I, and I think many others, run into with this is that there's almost never anything I "want". I spend so much time racking my brain for what to build I never start. Having a nice curated problem put in front of me sets me off and it's easy from there.
- dgb23 4y agoI agree in regards to complete beginners. But I think for more intermediate or advanced programmers it is very beneficial to go about a project in a more self-driven, free form way. Software design, exploration, research, reading specs and so on are half of the work (or more) in programming. What I would have loved to realize when I was younger is that there's nothing you can't write. It might be a drastically simplified version compared of the real thing, but you can absolutely do it. An operating system, a browser, a web server ("from scratch") a programming language, a video game (with a custom engine)... It's all possible with enough effort. And even if you don't want to do the up-front work yourself, it is easier to find cool, guided projects out there if you already know what you want.
- keepquestioning 4y agoraytracing weekend
- mesozoic 4y agoI'd like the equivalent for electronics if anyone has any suggestions.
- albertzeyer 4y agoSame question, but not for beginners but for experienced programmers: Which book would you recommend to improve architectural design decisions, developing complex systems, etc? But on actual examples, e.g. by building a series of projects, or parts of it?
- saboot 4y agoThis was just released, I haven't picked it up yet but it's definitely on my wish list https://www.manning.com/books/tiny-c-projects https://www.manning.com/books/tiny-c-projects
- rwieruch 4y agoShameless plug if allowed: “The Road to React” goes through one large project to teach React.js from beginner to intermediate. I learned that going through one project it allows the teacher to go through a series of foundational aspects of the topic before implementing more advanced domain specific features which make use of the earlier learned building blocks for the real world project. Does it make sense? https://www.amazon.com/Road-learn-React-pragmatic-React-js/dp/172004399X/ https://www.amazon.com/Road-learn-React-pragmatic-React-js/d...
- ljf 4y agoThe 'Arduino Projects Book' does a brilliant job if taking someone who knowing nothing about coding or electronics and setting out lessons and projects that take you from zero to somewhere fun. I still can't really code, but I can have a lot of fun tinkering because of that book.
- friend_and_foe 4y agoWrite yourself a scheme in 48 hours by Johnothan Tang is a fantastic book, there's also the structure and interpretation of computer programs. https://upload.wikimedia.org/wikipedia/commons/a/aa/Write_Yourself_a_Scheme_in_48_Hours.pdf https://upload.wikimedia.org/wikipedia/commons/a/aa/Write_Yo... https://web.mit.edu/6.001/6.037/sicp.pdf https://web.mit.edu/6.001/6.037/sicp.pdf
- FranklinMaillot 4y agoNot a book but The Coding Train on Youtube is probably one of the best introduction to programming. It's fun to watch, Daniel Shiffman is a fantastic teacher and he doesn't take himself too seriously. But what sets this course apart from any other are the coding challenges. Following the thought process of a programmer in real time, watching him making mistakes and hunting for bugs is invaluable. He uses p5js, a javascript library for graphics. The lessons are geared towards generative art but cover a broad range of topics including machine learning. https://www.youtube.com/@TheCodingTrain https://www.youtube.com/@TheCodingTrain
- nerpderp82 4y agoCoding Train is soooo good, it is like if Bob Ross had a baby with Donald Knuth.
- ojl 4y agoI mentioned The Ray Tracer Challenge in a comment below, and it seems quite popular so I’ll submit it here as well. http://raytracerchallenge.com/ http://raytracerchallenge.com/ It’s not really for beginners though, but maybe possible to start it together with a beginners book in a language of choice. It starts with points, vectors and matrixes, but gets more advanced later on. It’s around 250 pages and there’s basically no code provided, just test scenarios and a bit of pseudo code.
- garfieldnate 4y agoThis is my favorite programming book. It provides the test cases for the whole ray tracer, and making them pass was really addictive. I was obsessed with it for the month or so it took to finish. He's also written another book on mazes, but I haven't had the chance to read it. I wish there were a similar book on 2D graphics, which are plenty complex themselves.
- jtolds 4y agoPython Programming for the Absolute Beginner (https://smile.amazon.com/Python-Programming-Absolute-Beginner-3rd-dp-1435455002/dp/1435455002/ https://smile.amazon.com/Python-Programming-Absolute-Beginne...) has you make a game at the end of every chapter with the concepts you've learned so far. I've bought this book for a number of people, though perhaps Automate the Boring Stuff with Python: Practical Programming for Total Beginners (https://smile.amazon.com/gp/product/1593275994/ https://smile.amazon.com/gp/product/1593275994/) is better if you don't want to make games.
- ggrothendieck 4y agoPer Brinch Handsen, Programming a Personal Computer. Book is online. Interpreter, editor and OS in about 10 KLOC. http://pascal.hansotten.com/per-brinch-hansen/ http://pascal.hansotten.com/per-brinch-hansen/ Also https://news.ycombinator.com/item?id=24913959 https://news.ycombinator.com/item?id=24913959
- speakspokespok 4y agoThought the question was regarding specific books that teach programming via small projects it's worth mentioning a related topic here. A Common Sense Guide to Data Structures and Algorithms by Jay Wengrow * 2nd Edition * not only covers the theory really well but goes on to provide code examples in popular high level languages explaining when and how best to use them usefully. At the end of each section are prompts where you extend the lesson into a small project and each chapter builds on the last. The author has a github repo so you can compare your project solution to his. It made a rather dry topic extremely fun and approachable.
- hurril 4y agoThis one is nothing short of brilliant: https://www.manning.com/books/haskell-in-depth https://www.manning.com/books/haskell-in-depth
- yasoob 4y agoHi! I would like to shamelessly plug my own book "Practical Python Projects". It follows project based approach. It is completely free to read online and has a paid EBook option if that is what you prefer. https://practicalpython.yasoob.me/ https://practicalpython.yasoob.me/
- throwaway81523 4y ago> It is common knowledge that when first learning programming, one should start with small projects to build something real rather than learning rules and syntax of the language only. I would start by examining that assumption: it varies from one person to the next. If you like the project approach then great, go for it, but for other people it can be better to exercise individual features of the language in isolation until they are well understood, rather than trying to put a lot of half-understood features together into a more complex program. I have gotten into trouble over this myself a few times, and now definitely prefer the piecewise approach to the project approach.
- sitkack 4y agoThe New Turing Omnibus is a nice collection of small domain problems that can be solved with computation. https://oke.cx/mseih https://oke.cx/mseih In the domain of theoretical physics, I highly recommend, "From Newton to Mandlebrot".
- smckk 4y agoI recommend the Deitel[0] series for Python and C family languages like Java, C# etc. With hundreds of complete examples to follow (not code snippets) and exercises to challenge you, you will do better with these books as a beginner. My strategy is to get to the 10th chapter of the book skipping the exercises, then go back and try them with a better overall understanding of the language and its nuances. Great series. [0] https://deitel.com/ https://deitel.com/
- aagha 4y agoI'd love suggestions for PHP.
- deathtrader666 4y agohttps://symfony.com/doc/6.2/the-fast-track/en/index.html https://symfony.com/doc/6.2/the-fast-track/en/index.html