Hacker News new | ask | show | jobs
by tinco 4769 days ago
Wow, I clicked the 'Surprise Me!' button on Amazon and it took me to a page with this text:

"Namespaces are features often found within object oriented languages, such as C++, Ruby, and recently, PHP. A namespace allows libraries to use similar naming conventions without collision. The namespace often applies and implies a context for its identifiers."

Now I don't know how big this book is, but I don't think you can cram that much information in a children's programming introduction.

I also don't see at all how it is relevant to explain this much information about namespaces and their historic context. The amount of jargon you need to be familiar with to understand this paragraph is rather large and I know plenty undergraduates who'd have difficulty with understand this, even if they've used namespaces before..

Is this information for the parent or for the child?

(please don't see this as a middlebrow dismissal, I think it's a great idea to write programming books for young children and the cover of this one looks great, I am just genuinely surprised at this page being in there)

3 comments

I really wanted to prove you wrong by finding some evidence that the quote you featured isn't included in the book, but instead I stumbled upon a page[1] about boolean data types which was equally inappropriate for a younger audience. So instead I found myself up-voting you.

In fact to further prove your point, the boolean page made reference to the history of the name, which even I was unaware of after 25 years of programming.

It's a great pity about the content of this book as it's actually a really good idea. But with the content as in depth as it is, I couldn't even justify buying it as to read to my kid as a novelty item.

[1] http://ecx.images-amazon.com/images/I/51BIi5OBjML.png

Transcript:

> Named after George Boole, boolean is the most primitive data type, allowing for one of two values - true or false. Boolean operators are intended to represent truth values. Many languages contain a strict boolean data type, however, several languages, such as C and Lisp represent boolean values as the integers of 0 (false) and 1 (true). In most languages 1 and 0 are interchangeable for true and false.

I suspect the average lay adult pulled off the street would have a hard time understanding this, let alone a child.

Explained like I'm five: B is for Bit. A Bit is the smallest piece of Data a Computer can know. Arrays, and all Data, are made of Bits. Bits are either 0 or 1, nothing more, nothing less, and nothing in between.

(Booleans have no Business at B, Because Bits are Boolean)

Incidentally, Lisp doesn't even represent boolean values as 0 and 1, it represent them as nil (equivalent to '(), the empty list) and anything-but-nil. Indeed:

    * (if 0 "truthy" "falsey")

    "truthy"
I got a page about try/catch... no thank you.

This is exactly what computer science is not about. I feel like I'm an astronomer looking for a great children's book to introduce my child to the wonders of the universe; but instead I get a book that goes over all the different parts and kinds of telescopes.

It's a book about programming, not computer science. You might be disconcerted to learn that the book isn't about chemistry, either, or whatever else off-topic content you insist the author had put in his book.

BTW, Telescopes are cool, a miracle of optics.

There are two sections for each letter, for example:

Page 1: K is for key. Like your fingerprint, everyone is unique

Page 2: Though programming languages use ...

The first page is for the kid, the second for the parent. I kinda like it actually.