
How to think like a computer scientist
by Allen B. Downey · first published 2009
23mentions
16recommended by
19HN commenters
2008–2026first – last mentioned
84% recommend11% neutral5% critical
Why HN recommends it
Free, approachable introduction to programming and computer science fundamentals. Suited to high school students, self-learners, and as a Python-focused companion to university courses.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…should I read to learn Python itself" will never go away, if you are a beginner, I would recommend Zed Shaw's book there, or if you try it and don't like its style (or want to compliment it), then Downey's How to Think Like a Computer Scientist is also pretty good. If you're already coming from some other language, or would classify yourself as something other than a beginner, the best resource is the official tutorial (http://docs.python.org/tut),…
on “Best Open Python Books” ↗The textbook for this course is actually online, so in this instance the problem's solved. They're using the free book "How to Think Like a Computer Scientist," by Allen B. Downey. Check it out here: http://www.greenteapress.com/thinkpython/thinkpython.html
on “A Gentle Introduction to Programming Using Python” ↗The Python tutorial linked on the site looks very well laid out and easy for beginners to learn from: http://www.openbookproject.net/thinkcs/python/english2e/inde...
on “A Gentle Introduction to Programming Using Python” ↗I would instead suggest the subsequent "Think Python - How to Think Like a Computer Scientist" by Downey: http://www.greenteapress.com/thinkpython/thinkpython.html
on “How to Think Like a Computer Scientist: Learning with Python 2nd Edition (2012)” ↗If you want to go with python, http://openbookproject.net/thinkcs/python/english3e/ followed by http://chimera.labs.oreilly.com/books/1234000000754 are both free and teach good habits on the way to backend web development.
on “Roadmap to becoming a web developer in 2017” ↗In college I had tried to get into programming (including taking a CS class) and had, each time, bounced off (not because I couldn't get it, but tutorials seemed boring and a passion wasn't ignited). Fast forward to after college, I found myself at a career-y job I disliked. Each lunch break I loaded up my (shiny new 2011) Macbook Air with a few tabs-worth of chapters of How to Think Like a Compu
on “Removing Home Internet Is the Most Productive Thing I've Done” ↗OP, if you are looking for specific recommendations, this book is free and good: http://openbookproject.net/thinkcs/python/english3e/ If you want to learn web programming, follow it up with this one that is also free: http://chimera.labs.oreilly.com/books/1234000000754/index.ht...
on “Ask HN: Ruby, Python, or JavaScript for teenager?” ↗…"Structure and Interpretation of Computer Programs" by Abelson and Sussman(s). It teaches programming concepts using the Lisp/Scheme language (seldom used any more), but does so brilliantly. "Think Python: How to Think Like a Computer Scientist" by Downey might provide the right mix of computing concepts and programming practice. If you do want a traditional intro to CS theory, two books that cover that topic well are: "Introduction to the…
on “Ask HN: I'm looking for a good book on the fundamentals of CS” ↗I'm not a big fan of the O'Reilly books on Python, but if you prefer the style of Learning Python, you can't really go wrong. Most of the basic Python tutorials teach more or less the same material, so you won't miss too much by choosing one tutorial over the other. I personally recommend How To Think Like A Computer Scientist (http://openbookproject.net/thinkCSpy/). It doesn't cover everything i
on “Ask YC: What is the best Python book for a beginner?” ↗You could try Think Python: How to Think Like a Computer Scientist by Allen B. Downey. http://www.greenteapress.com/thinkpython/thinkpython.html It is due to be published by Cambridge University Press under the title Python for Software Design. The link above is for…
on “Dive into Python 3” ↗I really liked How to think Like A Computer Scientist http://openbookproject.net/thinkCSpy/index.xhtml A friendly way into programming in general and uses Python. Also, there are ways to connect R and Python.
on “Ask HN: Econometrics, Bioinformatics, Game Theory. Python or R?” ↗When trying to learn programming for the first time, find a book that has lots of exercises. I used an earlier edition of http://openbookproject.net/thinkcs/python/english3e/, but I've heard that people like "learn python/java/ruby/... the hard way".
on “Books or video tutorial: the best way to learn coding?” ↗For python, this is the book that I learned from: http://openbookproject.net/thinkcs/python/english3e/ and this is a good book that teaches web development: http://chimera.labs.oreilly.com/books/1234000000754/index.ht... Both are free. For learning deployment, first download vagrant and try deploying on a vagrant box. Then, get a digital ocean account (here's some free server time: https://m.do.c
on “Ask HN: What do you want to learn in 2017?” ↗I love Allen Downey's books. His "How to Think Like a Computer Scientist" was the first CS book I used in high school, and it has given me the strongest fundamentals I could ever ask for. I'm a college student now taking OS, so hoping this will be a good complement to my…
on “Think OS: A Brief Introduction to Operating Systems” ↗quick suggestions: * create sub-headings, for ex: 'Basic datatypes' chapter, create numbers/strings/lists as sub-headings... * loop iteration - as you are anyway showing how to use 'enumerate', I'd suggest to not show 'range(len(mylist))' * lots of ' Finally', might want to remove some or rework those sentences ---- Resources similar to this, but full fledged books * http://greenteapress.com
on “At full speed with Python: a book for self-learners” ↗