Which are some of the best books that take a project based approach in teaching programming to a beginner?
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/97810...
- 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/0134123...
[2] https://www.amazon.com/Exercises-Programmers-Challenges-Deve...
[3] https://www.amazon.com/Ruby-Way-Programming-Addison-Wesley-P...
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!
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.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://nostarch.com/big-book-small-python-projects
~~~
For JS:
https://eloquentjavascript.net (project-based and for beginners)
https://javascript30.com (not for total beginners or self-study, would need a friend/tutor)
It has a collection of blogs for building various small projects to learn different languages.
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.
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.
https://www.amazon.com/Road-learn-React-pragmatic-React-js/d...
Available free online at https://third-bit.com/sdxjs/
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.
For intermediate programmers, Build Your Own Redis[2] is a WIP book I am currently writing.
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.
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.
https://www.goodreads.com/en/book/show/927128.Mud_Game_Progr...
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.
Not to mention they're all freely available and give excellent value for both time and money: https://inventwithpython.com/
Was a really fun read.
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.
[0] https://cloudresumechallenge.dev/docs/the-challenge/ [1] https://cloudresumechallenge.dev/book/
It teaches you step by step the basics of programming (loops, function calls etc) using a scratch-like programming language.
FREE 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:
Highlights https://automatetheboringstuff.com https://inventwithpython.com/bigbookpython
I still can't really code, but I can have a lot of fun tinkering because of that book.
In the domain of theoretical physics, I highly recommend, "From Newton to Mandlebrot".
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.
You will create a MP3 database, a web server, a spam filter, a HTML generator. Really practical!
https://news.ycombinator.com/item?id=22299180 Ask HN: What are some books where the reader learns by building projects?
You build a whole computer from scratch through small projects.
Sure, you want learn a specific language, but you’ll grock programming in general.
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.
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.
- 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
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.
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.
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://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.
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.
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.
https://upload.wikimedia.org/wikipedia/commons/a/aa/Write_Yo...
_____
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.
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.
This is an excellent resource.
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?
“Assembly Language, Step by Step”
Check those out.
But also pretty much every book does that.