Think like a computer scientist: free, interactive textbook

Originally published at: http://boingboing.net/2016/10/05/think-like-a-computer-scientis.html

2 Likes

No thanks, I’ve known too many computer scientists.

9 Likes

And I’ve seen the code they write :weary:

6 Likes

Me too, and I am one.
I did, however, once write a paper about what’s wrong with how computer scientists think:

3 Likes

Are you trying to sneak in a lesson on recursion?

6 Likes

As an Electrical Engineer, I’d rather not.

A computer scientist’s wife sends him to the grocery store and asks him to get a gallon of milk, and if they have eggs, to get a dozen. He returns staggering under the weight of 12 gallons of milk.

11 Likes

This is actually an incredible book. An older version is what I used to teach myself Python. If you want to learn to code, or to learn Python if you already code, this free book is far better than any of the courses you always see them flogging on the boingboing store.

I didn’t check it, but if this has been updated for Python 3, that is great, because one of the issues I’ve had recommending this to people these last two or three years is that all the examples and all the code you need to run them, was Python 2 only.

4 Likes

Thirteen gallons, surely? :wink:

A computer scientist calls his friend. “My wife just gave birth!” he says.

“Congratulations! Is it a boy or a girl?”

“Yes!”

6 Likes

Twelve. She said get a dozen, not get a dozen more.

3 Likes

get_milk(1.gallon) and (get_milk(12.gallons) if eggs.any?)

No? I guess maybe it could be:

milk = 1.gallon && (eggs.any? && 12.gallons)

But then if there are no eggs your husband may return false milk :open_mouth:

That night, the computer scientist attempted to explain if/then/else constructs while his wife threw milk at him.

2 Likes

This topic was automatically closed after 5 days. New replies are no longer allowed.