5 ms·
My girlfriend has told me a couple times she wants to learn to program but this is the only intro book I own. I feel bad giving it to her because it just beats
by swiley 6y ago
My girlfriend has told me a couple times she wants to learn to program but this is the only intro book I own. I feel bad giving it to her because it just beats you with recursion right from the beginning (that isn’t to say it’s bad, I love it, that’s why I own a copy. I just feel like you’ll appreciate it most if you already know a little of some non functional language.) On the other hand she took it with us on a picnic the other day and didn’t seem to mind, in fact the simplicity of scheme’s syntax actually seemed to help a lot (she tried python once and there were too many different syntactic structures, but that was me giving her a tutorial rather than going through a book so maybe I’m just a bad teacher.)
Does anyone have any suggestions?
- andi999 6y agoIt depends on 'why' she wants to learn programming. What does she like and wants to be able to do herself? Like shiny gui, or webpages or own robot controller?
- nestorD 6y agoIf she is mathematically minded I would not be afraid of letting her learn with it (note that the corresponding course taught by the original authors is also available in video somewhere on the web and that you can use the SICP dialect with Racket). Having discovered programming in a functional language (Ocaml) I found that it was people with prior experience in other languages (such as Python) who had the most trouble getting confortable with recurcion.
- sergiosgc 6y agoSICP was used as the reference book for the introductory course on programming on my degree. People with prior experience had the most trouble with recursion. Students with no programming experience whatsoever grasped the concept pretty easily. I would try it out. It might need some analytically wired thought process, but again that is true for any kind of programming paradigm.
- tonyedgecombe 6y agoRecursion seems to be one of those inflection points that some people just can't get past.
- theaeolist 6y agoThat's because in order to understand recursion you must first understand recursion.
- brownianemotion 6y agoA great way to let someone understand recursion is to let them learn how the principle of mathematical induction works. It gets rid of all the noise related to the programming language.
- Aozora7 6y agoWhat I personally see in academic setting is that when recursion is taught, it's taught using examples where you would not want to use recursion. It's easy to understand why recursion is useful when you are tasked with traversing a file system. It's not when the first example you are given is calculating Fibonacci sequence.
- wadkar 6y agoI disagree to an extent. Sure file system traversal is great motivating example (or any tree traversal example for that matter). However, the Fibonacci sequence provides good end to end example of recursion, then tail recursion/dynamic programming.
- Jtsummers 6y agoI like the way SICP handles this, actually. They state clearly (in the text, haven't watched the videos) that the naive recursive form for Fibonacci is only illustrative, then they proceed to provide the iterative form. Following that they have this paragraph: > One should not conclude from this that tree-recursive processes are useless. When we consider processes that operate on hierarchically structured data rather than numbers, we will find that tree recursion is a natural and powerful tool. But even in numerical operations, tree-recursive processes can be useful in helping us to understand and design programs. For instance, although the first fib procedure is much less efficient than the second one, it is more straightforward, being little more than a translation into Lisp of the definition of the Fibonacci sequence. To formulate the iterative algorithm required noticing that the computation could be recast as an iteration with three state variables. Hopefully a professor in a course would make similar statements (I know mine did, repeatedly). And, at least in my early programming courses, we quickly (within a week or two) went on to those other problems where recursion was a natural and useful solution. The professors [0] introduced problems where recursion was either necessary (using for/while loops would be a non-trivial transformation with no performance gain) or, like naive Fibonacci, natural expressions of the problem. [0] I transferred universities, not all courses lined up so I got to see the second school's introduction to this topic even though I was past that point academically. I was an unpaid TA (technically I guess I was paying to be the TA).
- tonyedgecombe 6y agoI've heard good things about Code by Petzold although I haven't read it myself. https://www.amazon.com/Code-Language-Computer-Hardware-Software/dp/0735611319 https://www.amazon.com/Code-Language-Computer-Hardware-Softw...
- cmrdsprklpny 6y agoI've read it; it's a phenomenal book to understand more about how computers work on a hardware and conceptual level, but it doesn't really teach programming. Still strongly recommended.
- read_if_gay_ 6y agoAutomate the boring stuff with Python maybe. It quickly gives you useful results. But of course it’ll only get your feet wet, it’s nowhere near as formal and thorough as SICP.
- theaeolist 6y agoTo understand recursion first understand recursion on a recursive data structure (list, tree). It is very natural and there are loads of interesting algorithms. General recursion is more difficult to understand algorithmically so leave it for later.
- bryanrasmussen 6y agoI happen to think SICP is a pretty good start for the reason you mention, the simplicity of syntax, in my experience it only gets hairy in the end when you start implement OOP on top of it. Another good easy to learn as a first language in my experience is Rebol because it allows you to do stuff you ( meaning a person who uses a computer) might want to do quickly (send emails, scrape websites) Of course another benefit of SICP is that it is written by people who are probably better writers about languages than most of the programmers hired to write programming books and articles.
- cmrdsprklpny 6y agoHow to Design Programs (https://htdp.org/ https://htdp.org/) is fantastic, I believe it's based off SICP but I found it a little more accessible. It leads into recursion pretty well and intuitively, probably the favorite programming book I've read.
- browserface 6y agoI'm sure she'll be fine. She sounds like she already is. She might exceed you. People can teach themselves right? This book looks good but I don't think I should start reading it, because I get the feeling it's going to let me want to create my own "powerful programming language" and be led down that (long, probably dark) rabbit hole.
- credit_guy 6y agoI have high hopes for this Fall's MIT course in Computational Thinking [1]. While it was discussed here on HN, I don't think it got all the attention it deserves. I think this course will end up to be the start of a revolution in online teaching. We've had MOOCs and OCW, and other courses online for a while now, but this is a whole different level. They enlisted 3Blue1Brown (Grant Sanderson) to lecture. Arguably, he is head and shoulders above everyone else when it comes to mathematical animations and intuitive explanations. Coupling the pedagogical genius of this guy with the research genius of Alan Edelman, and with the expressivity of the new language Julia (which might beat Scheme in the end), this is a recipe for absolute success. Oh, and the main lectures are live and you can ask questions (and if your question is good, you receive the answer right away). Run, do not walk, to enlist in this course. [1] https://mitmath.github.io/18S191 https://mitmath.github.io/18S191
- witherk 6y agoI wonder if Grant feels lucky to get to work with MIT. MIT is obviously an amazing school but I really feel like they are the lucky ones. Even before covid, I thought that his work was light-years ahead of most math education. Now that everyone is scrambling to move online I'm sure he's even further ahead.
- dayvid 6y agoI’d recommend going through Brian Harvey’s video series while doing the book. Watch the video that covers the topic and then go through the section in the book. They also have recommended problems to do in the book. You don’t have to approach the book as a completionist who needs to complete every problem, etc. especially if you’re starting out. You can always revisit the book later with more experience, but the insights it can give you are invaluable . https://www.youtube.com/playlist?list=PLhMnuBfGeCDNgVzLPxF9o5UNKG1b-LFY9 https://www.youtube.com/playlist?list=PLhMnuBfGeCDNgVzLPxF9o...
- michaelluang 6y agoThe Little Schemer by Friedman is a good choice. https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992 https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0...
- 7thaccount 6y agoPython for the Absolute Beginner was very easy. Each chapter introduced a new concept (Ex: strings, variables, lists, iteration, branching, dictionaries, functions, file I/O, classes...etc) with a little text game (Ex: hangman). The writing is laid back and interesting. Once I read this I was able to start writing my own code with a little help using StackOverflow and it's been terrific for my career. There is no mathematical or computer science jargon to weigh you down. That can always come later. At this point programming is hard enough, but this book shows you all the building blocks and gives you some practice assembling things together.
- globular-toast 6y agoI suggest you trust the authors to know best when it comes to teaching programming. Sounds like you're worried it will be too hard for her. It might be. Non-programmers have lots of romantic ideas about what they think programming is. But the only way to know whether someone possesses any talent in it is to try it. I tried to teach one of my ex-girlfriends to program but I could tell before long that she didn't have the gift so encouraged her to do other things.
- AnthonBerg 6y ago<3 A Type of Programming: http://atypeofprogramming.com/ http://atypeofprogramming.com/ <3
- gumby 6y agoWhen SICP was written the majority of the freshman who took that course had never touched a computer before they took that class. This can be interpreted two ways: 1. It really is an introductory text and, as the book says, recursion is a simple, powerful, familiar idea. 2. Times have changed. I’m partial to interpretation #1
- scns 6y agoIf videos are okay i would recommend the course on edx.org taught by Gregor Kiczales "How to code: Simple Data" and the successor about complex data. They are based on the book "How to design Programs" also from MIT IIRC.
- poulsbohemian 6y ago> it just beats you with recursion right from the beginning I'm not disagreeing with you as I write this, more pontificating on teaching styles... we all know recursion can get tricky / be hard to understand in the context of a programming language, but sometimes it's all in the presentation... if we tell the student right up front "hey, this is how we do this, no big deal right?" then perhaps they don't put up their natural defenses and make it into a harder concept than it really is?
- johnc1231 6y agoI'd also recommend "How to Design Programs", newest version is here: https://htdp.org/2020-8-1/Book/index.html https://htdp.org/2020-8-1/Book/index.html. It's a much more accessible version of SICP.
- mesaframe 6y agoHTDP is a more gentler introduction to programming.