Found 23 comments on HN

sharmi · 2018-05-14 · Original thread

A Tour of Go [1] (If you are a novice, you really should try writing the programs yourself. You will end up finishing it in an day or two. If you just read through, it would be just a couple of hours)

The Little Schemer [2]

[1] https://tour.golang.org/welcome/1

[2] https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0...

pmoriarty · 2017-10-03 · Original thread

This reminds me of the style of The Little Schemer[1] which a lot of people love but which I found to be plodding and insufferably condescending.

[1] - https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0...

jarcane · 2015-02-16 · Original thread

The classic systems were worlds ahead of most modern ones in one very important respect: documentation.

The Tandy/Radio Shack books for the Color Computer series (and it's astoundingly good LOGO implementation) were amazingly clear and concisely written with lots of examples, and because in those days even a disk drive wasn't a guarantee, all the examples were written to be hand-typed and experimented with.

There were even books in those days that aimed to teach kids machine language! [1]

That said, I think Djikstra and Felleisen may be slightly right about the long-term usefulness of old-fashioned BASIC and LOGO for learning, but there are a few books in modern languages that come close.

Hello World![2] was explicitly written to hearken back to those old manuals, by a father aiming to teach his 12-yo son programming with Python.

Land of Lisp[3] and Realm of Racket[4] also call to mind those old books as well, though they're targeting a bit older audience and have their quirks (LoL is a bit in-love with huge nested trees and a-lists in the examples, and Realm of Racket tends to gloss over a lot of the examples and expects you to just read the sample code rather than walking you through the process completely).

The Little Schemer[5] is also a fantastic little book that takes on the form almost of a set of brain-teasers, and teaches recursive thinking entirely by example and in methodical detail. The later chapters can be a bit stumpy, but if you go through the book step by step in regular sessions it builds on itself pretty well.

All of these are aiming at around the 12+ age range though, I don't think there's much out there anymore for anything younger.

[1] http://boingboing.net/2013/05/16/1983s-wonderful-introducti....

[2] http://www.amazon.com/Hello-World-Computer-Programming-Begin...

[3] http://www.amazon.com/Land-Lisp-Learn-Program-Game/dp/159327...

[4] http://www.amazon.com/Realm-Racket-Learn-Program-Game/dp/159...

[5] http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

pash · 2015-01-06 · Original thread

To understand the theory of recursive functions you must understand fixed points, but I think there's a simpler way to understand the magic of the Y combinator.*map* on the right hand side of the second case.*map'* as "map-prime", i.e., a variant of the definition of *map*.)*map' map'* to equal *map*, which is what we're trying to do). The left hand side looks a little strange [0], but it's just saying that we need the first parameter of our definition to be the the thing we're defining.*why* is just*fix* takes a function and applies it to itself (after applying it first to arguments *x* and *y*). Great. That's what we needed. Now we can take our defintion of *map'* (the one marked *Pay attention for later!* above) and do this:*map* there because we can easily show that this definition is equivalent to our original definition of *map* by showing that it reduces to the same expression:*map' map' f xs*, you will see is indeed equal to the definition of *map*.

Here's how it works. Say we have a recursive function like *map*:

```
map f [] = [] -- We'll ignore the base case since there's no recursion here
map f (x:xs) = f x : map f xs -- This is the interesting part
```

We want to write this more primitively, without explicit recursion. How can we do that? Well, if it's possible at all, we obviously need to get rid of the How? Well, let's abstract over the recursive call, replacing it with a function that we'll add as parameter to our definition:

```
map' _ f [] = [] -- Still boring
map' g f (x:xs) = f x : g g f xs -- Pay attention for later!
```

(Read All we've done so far is replaced *map'* where it should be on the right-hand side of its own definition with *g*, and then added *g* as parameter of the function. We end up with a double *g* on the right-hand side because of that added parameter.

OK, now what? Well, we need somehow to make *g* be *map'*, the thing we're defining. which means we need somehow to pass our definition of *map'* to itself, so that (in the second case) we'd end up with something that evaluates to:

```
map' map' f (x:xs) = f x : map' map' f xs
```

Then the right hand side would obviously be right; it's what we were shooting for at the start (assuming we can get So how do we make this happen? Well, what is *map map f (x:xs)*? It's *map* applied to itself, then to some other arguments we need. So the key, it seems, is to figure out how to apply *map* to itself. Well, in the lambda calculus that's pretty easy [1]:

```
why f x y = f f x y
```

That is, ```
lambda f. lambda x. lambda y. (f f) x) y
```

OK, so ```
map = why map'
```

And I've re-used the name ```
map f (x:xs) = why map' f (x:xs)
== (by def. of `why`)
map' map' f (x:xs)
== (by def. of `map'`
f x : map' map' f xs
```

Which, if you keep expanding the expression Voilà. So that wasn't too hard. It's basically two steps: (1) abstract over the recursive call, then (2) figure out how to pass the function you're defining to itself. If you look at the Y combinator, you'll see that that's exactly what's going on there.

If this didn't make a lot of sense to you, it's probably because I wrote it on my iPad at 4:30 in the morning. It really is just those two steps: abstract over the recursive call, then self-apply. ...

To get deeper into the recursive mindset (if you're not there yet) and to build up deliberately to the Y combinator, take a look at one of my favorite books on functional programming, *The Little Schemer* [2]. (And watch out for the jelly stains!)

------

0. And it's ill typed, but never mind that. It's not possible to define the Y combinator (or any other fixed-point combinator) in the simply typed-lambda calculus, so just imagine that my Haskell-style syntax is untyped, like the basic lambda calculus.

1. Although, again, there's no way to give *fix* a good type in the simply typed lambda calculus.

2. http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262...

baddox · 2015-01-05 · Original thread

It's certainly possible to learn to "think recursively," and thus be able to work out recursive solutions to new problems in the same way that other people work out iterative solutions to new problems.

The book The Little Schemer is a great way to learn to think recursively. It has been 5 years since I read it, and I haven't kept the skill fresh, so I've probably lost most of it.

http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262...

evanspa · 2014-11-07 · Original thread

I started my Lisp journey seeking to learn Clojure too. I starting out with The Little Schemer[1]. I chose Scheme so that I could first wrap my head around the basic Lisp syntax, along with the recursive and functional thinking. To keep things as simple as possible, I did 95% of the exercises using a composition notebook and pencil[2]. This kept the incidental complexity to a minimum.

Later, I moved on to the Clojure books. Working through the Little Schemer was invaluable (and its bibliography is excellent too).

[1] http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

[2] https://github.com/evanspa/TheLittleSchemer/blob/master/sche...

clark-kent · 2014-07-14 · Original thread

SCIP should always be in the list as one of the best programming books ever written. Others are
'Simply Scheme: An introduction to computer science', simply scheme is an alternative to "How to design Programs", http://htdp.org/, both books are written for non-programmers but they provide a gentle introduction to many advanced topics covered in SCIP. I prefer "Simply Scheme".
Another one is the "Little Schemer" http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262....

jongold · 2014-07-09 · Original thread

I really liked The Little Schemer[0]. The language/syntax is a little different to Clojure but it's broadly transferable; really helped me think functionally.

I'm a total noob with this stuff but I've been really happy with Clojure (and more recently ClojureScript/Om) :)

[0] http://www.amazon.co.uk/Little-Schemer-Daniel-P-Friedman/dp/...

baddox · 2014-05-16 · Original thread

I recently went through the later chapters of The Little Schemer again. I still find it incredibly challenging and awesome. As many have said, this is a great book to teach you to think recursively.

http://www.ccs.neu.edu/home/matthias/BTLS/

http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262...

latj · 2014-03-07 · Original thread

Get a copy of this for the kids!

http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262...

hga · 2013-07-01 · Original thread

Lots of terrific advice here, and I myself am mostly a self-taught programmer, I've only taken 3 formal courses, all introductory. I'd only add:

"*Maybe I would be confident in my skills to apply to some tech jobs. Or do some freelance work*"

Don't expect to get "normal" tech jobs by the time you're good enough unless you can disguise your age, age discrimination is fierce in this field. But as noted by you and many others, there are many options.

I'd also add that at some point unless you've forgotten all your math and don't want to refresh it try *Structure and Interpretation of Computer Programs* (SICP) (http://en.wikipedia.org/wiki/Structure_and_Interpretation_of..., http://ocw.mit.edu/courses/electrical-engineering-and-comput...), everything you need is free and online. If it's a good enough fit for you it will teach you some foundational things that'll make you a better all around programmer and system designer. E.g. one way or another learn big O notation (https://en.wikipedia.org/wiki/Big_O_notation) and its significance.

Over time, get some breath. In my book that means try to learn the basics of these languages and concepts and their typical environments: Lisp and recursion (see SICP above, or alternatives on the Wikpedia page plus http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262... specifically for recursion), C and pointers, HTML, Javascript and browser programming, and some database work, SQL/RDBMS preferred, I recommend PostgreSQL over any of the MySQL variants, but a simple key/value store or embedded SQL database would also get your feet wet. If you learn recursion and pointers you'll be way ahead of most people who believe themselves to be programmers.

Good luck!

baddox · 2013-02-21 · Original thread

The Little Schemer is the book that got me thinking about data structures recursively (starting with linked lists), and that was later furthered by SICP.

http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

pearkes · 2012-04-01 · Original thread

I've found The Little Schemer[1] to be very approachable and effective for grokking common CS concepts.

[1]: http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262...

ericmoritz · 2011-06-01 · Original thread

I found Erlang hard to understand at first but I was a victim of my own ignorance. I knew instantly that it's pattern matching feature was incredibly useful but it wasn't until I read "The Little Schemer" http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02... that I was able "get" Erlang.

andjones · 2011-04-19 · Original thread

It sounds like you're more interested in programming languages in general. You might find these books interesting:

Essentials of Programming Languages http://www.amazon.com/Essentials-Programming-Languages-Danie...

The Little Schemer http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

stevelosh · 2011-04-06 · Original thread

My vote goes for The Little Schemer. It's short (but don't read it all in one sitting), entertaining, and will teach you some important concepts.

http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

parenthesis · 2010-07-21 · Original thread

Two good books which are in the sort of style you seek are:

*The Little Schemer* <http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...; and

*Clause and Effect* <http://www.amazon.com/Clause-Effect-Programming-Working-Prog....

Also a help is that the languages they use ('use' is a more appropriate word here than 'teach') — Scheme and Prolog, respectively — are much more mathematical in nature than typical mainstream languages are.

sh1mmer · 2010-05-03 · Original thread

I remember when I first read this a while back, and I wanted to read the little schemer too. It's now in 4th ed. (http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02... - $22) but I really wish there was an e-version for my Kindle: PDF, anything.

samdk · 2010-04-17 · Original thread

The Little Schemer is an updated version of The Little Lisper. It also happens to be much cheaper: http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

It's an excellent introduction to thinking recursively. The others in the series (The Seasoned Schemer, The Reasoned Schemer) are worth reading too.

steveeq1 · 2009-12-26 · Original thread

The Little Schemer:
http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

grinnbearit · 2009-12-14 · Original thread

I personally find scheme to be the simplest Lisp to learn (after working with Common Lisp, Clojure and Scheme). If you do want to learn scheme, I found the MIT lectures http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Compute... brilliant and the little schemer http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02... a lot of fun as well.

steveeq1 · 2009-01-11 · Original thread

Might I make a recommendation? Start with "The Little Schemer" and then graduate to "The Seasoned Schemer". Here: http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...

It takes you more step-by-step than SICP and once you get more practice with those books, SICP will be much more paletable.

[0] https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0...