My 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…
One thing that helps me a lot when learning new languages is to NOT copy and paste but actually re-type the code. You will be forced to read more carefully and, more importantly, you will make typing mistakes. Hunting down your own mistake will teach you the subtleties of the syntax as well as further increase your understanding of the code. For more advanced programmers, there is also the challenge of translating th…
Ask HN: Books that teach programming by building a series of small projects?
121–130 of 204 posts
Re: Ask HN: Books that teach programming by building a series of small projects?
#122HTDPv2 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…
Re: Ask HN: Books that teach programming by building a series of small projects?
#123While 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…
edit: Based on your "It was my first introduction to rust" comment I think maybe you meant programming beginners?
Re: Ask HN: Books that teach programming by building a series of small projects?
#124My favourite is "Practical Common Lisp" by Peter Seibel ( 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 tru…
I'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.
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.
Re: Ask HN: Books that teach programming by building a series of small projects?
#125My favourite is "Practical Common Lisp" by Peter Seibel ( 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 tru…
I'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.
In my opinion the 'everything is an expression' is the really tasty part of the lisps, which goes well with quoting.
Re: Ask HN: Books that teach programming by building a series of small projects?
#126My favourite is "Practical Common Lisp" by Peter Seibel ( 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 tru…
I'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.
They're just very simple macros based around the `if` special form. Because they're macros, they can just treat the body as data, i.e. it's not executed as part of argument resolution.
If you wanted to make a `when` function in Python, the "body" would have to be a callable like a lambda or named function.
I know this probably isn't the most compelling use case but I found it to be a really simple way to understand some of the benefits of macros and how they could be used elsewhere.
Re: Ask HN: Books that teach programming by building a series of small projects?
#127The original was in Ratfor, which is a Fortran dialect. That being similar syntax but more limited than C is not a bad intro language.
Re: Ask HN: Books that teach programming by building a series of small projects?
#128Earlier quoted context omitted.
There 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…
Prefix each line with two spaces, per the formatdoc page [0] [0] 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.")
Re: Ask HN: Books that teach programming by building a series of small projects?
#129You build a whole computer from scratch through small projects.
Sure, you want learn a specific language, but you’ll grock programming in general.