
CS Unplugged: Computer Science Without a Computer - avinassh
http://csunplugged.org/activities/
======
sophacles
I have encountered a lot of people who earnestly want to learn to program. But
it is difficult as we all know - and a big part of that difficulty is learning
to think in terms of process and small discrete steps. When that is confounded
with annoying things like syntax pickiness, dealing with OS oddities and
compiler warnings, the result is a lot of long-term confusion in folks
learning.

I've found that a deck of cards and some patience can really help people
understand the tiny step by tiny step thinking that is fundamental to computer
science and programming. Things like sort this row of cards (following only
these rules) and, yeah it's frustrating to do that over and over, lets group
those together in a new rule called $X, and so on gets that thinking instilled
better than any amount of explaining the programming language ever did. Later,
introducing the computer in the mix actually seems easier once the student is
accustomed to thinking like a computer.

~~~
artlogic
I have to second the deck of cards approach. One particularly effective
exercise is to hand someone a shuffled deck of numeric cards and ask them to
write down a process for sorting them, using only the concept of bigger or
smaller. Given about 20 minutes, most people will come up with selection sort
on their own.

It's this sort of introspection that's key to understanding computers. We
abstract large chunks of computational thinking naturally. It's essential to
be able to ask yourself, "How am I really doing this?" \- and to come up with
an answer.

 _edited slightly for grammar_

------
artlogic
I'm very happy to see this. I've taught computer science at the college level.
Whether you realize it or not, learning CS has very little to do with typing
symbols into a computer. While it's true the computer sometimes surprises us,
I've told my students that if you can't run the program in your head, then you
simply don't understand what's going on. You haven't learned anything.

More often than not, the computer facilitates a guess and check programming
mentality that isn't just endemic to students, but to our profession in
general. I'm certainly not immune to the temptation to fix problems by
repeated runs with small tweaks: "Does it work? No... no... no... yes! Move
on!" That's not computer science. It's data entry.

It's not that computers have no place in the curriculum. They can be immensely
helpful in understanding of complex algorithms, much the same way performing
an experiment can lead to a more thorough understanding of physics, or
chemistry. However, no one would argue chemistry is about moving chemicals
from one test tube to another.

~~~
davnicwil
> if you can't run the program in your head, then you simply don't understand
> what's going on

Agreed, and sometimes it's surprisingly tricky to describe what's happening
not in terms of the coding abstractions we all know and love, but just in
plain English.

I remember I did a contract years ago for a PhD student which was basically
doing some statistical analysis of a massive dataset. When I was doing
progress reports she'd often drill down and ask, out of genuine curiosity (she
was an academic, go figure :-) just _how_ the computer was doing the things I
was describing.

I couldn't use abstractions like 'well I just loop over this set and
accumulate x and...' because that's gibberish to her - so I had to kind of
break down what was actually going on in plain English (obviously with a
degree of abstraction from the hardware etc). I did so very awkwardly because
I was used to just 'thinking in code', but remember it was very helpful for me
to be forced to do this because it really tested that I actually understood
what my algorithms were doing.

But obviously there's a limit to the usefulness of this line of thinking.
Abstractions are always present - _ad adsurdium_ , we'd never talk about
electrons flying around etc. It ceases (except in extremely rare exceptions)
to be useful to describe what is actually happening in more detail than 'this
black box does X, and I use it with another black box that does Y to achieve
Z' right about the level where you're writing 'real' applications with
frameworks and whatnot.

~~~
hyperpape
I wonder to what extent you were just finding actual abstractions that the two
of you could share. "For each number/thing in this list, you do a calculation"
is an abstraction from an old school "for (i = 0; i < n; i++)" loop. A lot of
modern conveniences in programming are abstractions that ordinary language has
had forever.

A lot of people in programming think of abstraction in terms of
AbstractFactoryFactories or LifecycleConfigurators and then start to complain
about architecture astronauts and leaky abstractions. But there are more basic
abstractions that we use every day, which are perfectly precise, don't leak[1]
and are near-indispensible.

[1] Except perhaps in terms of performance.

------
jasonjei
Learning CS without a computer brings you incredibly good foundations when you
do program with a computer. Algorithms, data structures, and other theory
become much easier to implement. I used to think it was stupid that we had to
implement algorithms on paper tests, but a lot of that makes you a better
programmer. I still don't think paging memory on paper has any good use for an
OS class--just busy work :).

~~~
pjmorris
I think there's something to doing it in your head/on paper. Reminds me of the
story told of Don Knuth, clipped here from Quora...

Quote from Alan Kay about Knuth:

When I was at Stanford with the AI project [in the late 1960s] one of the
things we used to do every Thanksgiving is have a computer programming contest
with people on research projects in the Bay area. The prize I think was a
turkey.

[John] McCarthy used to make up the problems. The one year that Knuth entered
this, he won both the fastest time getting the program running and he also won
the fastest execution of the algorithm. He did it on the worst system with
remote batch called the Wilbur system. And he basically beat the shit out of
everyone.

And they asked him, "How could you possibly do this?" And he answered, "When I
learned to program, you were lucky if you got five minutes with the machine a
day. If you wanted to get the program going, it just had to be written right.
So people just learned to program like it was carving stone. You sort of have
to sidle up to it. That's how I learned to program." \- [1]

[1] - [http://www.quora.com/How-would-Donald-Knuth-fare-as-a-
compet...](http://www.quora.com/How-would-Donald-Knuth-fare-as-a-competitor-
on-TopCoder-today)

~~~
drfuchs
Knuth wrote the entirety of the first version of TeX on yellow legal note
pads, and then typed it all in, and then started debugging. Ditto for
MetaFont. Both are the equivalent of about 10kloc (after the Tangle
preprocessor removes the voluminous comments).

~~~
copperx
I would love a reference about the yellow legal note pad thing.

In reality, writing a program in longhand is something everybody could do --
but because nowadays programming is mostly plumbing, you have to empirically
test everything.

~~~
drfuchs
I saw it with my own eyes when I was in his office to discuss some typesetter-
interfacing issues, but I suppose that's not enough of a reference. Perhaps
the story is repeated in an old issue of TuGboat, the journal of the TeX Users
Group, but I couldn't find it. Here's a more extensive description from a
decade ago though:
[https://groups.google.com/d/msg/comp.text.tex/9quGg7j6U0k/tl...](https://groups.google.com/d/msg/comp.text.tex/9quGg7j6U0k/tlWm_B_zQ5IJ)

------
danso
As someone who studied CS in school, I appreciate this approach. But I don't
know if I would if I were, say, learning to code as an adult. The reality of
the matter is that computers themselves are a _massive_ aid in learning how to
program...and I mean far beyond the ability to quickly Google/StackOverflow
questions.

Being adept at an interactive interpreter, for example, opens up the
opportunity for fulfilling (or at least, less frustrating) interactive
debugging...to me, being able to debug is at the core of understanding
programming. And while that's not pure computer science, per se, it's a great
way to not just understand and replicate CS concepts, but to fully test and
explore them via immediate feedback. Sometimes I've found that I can only
understand an algorithm by implementing it in code, and then tweaking/breaking
it to test my assumptions...a computer makes it so that such exploration is
not impossibly tedious.

~~~
wiskirz
This isn't about learning how to program though. This is dedicated to
imparting computational thinking as a skill. It's not going to teach you how
to program, but it will make you a better programmer.

~~~
seanmcdirmid
Indeed, learning to program and learning to think like a computer are very
different activities and skills.

------
mikeflynn
I remember walking in to Comp Sci 101 on the first day and quite a few people
had laptops and everyone was surprised to see it wasn't a computer lab
classroom. Right off the bat our professor addressed this: "Yes, this is
Computer Science but it's really science about computing. You won't ever see a
computer in the class room. You'll do programming assignments at home but in
here we take notes, talk and draw diagrams. " Felt weird at the time but makes
perfect sense to me now.

------
aunty_helen
I have a great respect for Tim Bell, someone who has put his everything into
this project to make CS more accessable and get it taught at an earlier age.

I can always remeber back in 2008 when he gave a special lecture to
COSC122-S208 with an early prototype of this program. It was obvious that I
wasn't the only one left with a feeling of 'why didn't they just tell us that
to start with?' after 10 weeks of battling beginner skills at java and trying
to learn data structure concepts and algorithms at the same time.

------
jrochkind1
This would be really good for prisoners too, who don't usually have access to
a computer but are often interested in learning about computers.

~~~
ljk
or for some people who don't know how a computer works ;)
[http://www.youtube.com/watch?v=5Qj8p-PEwbI](http://www.youtube.com/watch?v=5Qj8p-PEwbI)

------
geebee
Computer Science without a Computer… you mean math? ;)

Joking aside, this can be a very good exercise. I did interviews on the
whiteboard, and it did teach me that I have come to rely a little too much on
compiling and running to understand the logic I've written.

~~~
oxalo
Your comment made me stop and think about all the times I've seen someone
complain about 'coding' on a whiteboard during interviews. Did those people
learn 'computer science' entirely in front of a computer, and so sort of
'trial and errored' they're way to the correct answer? Not trying to claim one
way is better than the other, but rather trying to understand why the argument
over coding in interviews is so polarized.

~~~
taco_emoji
I can only speak for myself, but I just want a keyboard and a screen. I don't
need a compiler--it's just got to do with the _transcription method_ , not
because I need the write/execute/debug loop.

I'd be fine doing a coding interview with just Notepad.exe or vi or whatever.
It takes me ~2 seconds to type a line of code, but more like 10 or 15 seconds
to handwrite it [0], and my brain's just not used to that kind of latency. It
trips me up.

Plus, on a whiteboard, the mechanics of "oops I need to insert a line... I
guess I'll just write it down here and draw a big arrow... ok now I need to
rename this variable, but now the name is really long and I can't fit it...
wait, what was I doing?".

It just mucks up my process. I don't precisely conceive an entire subroutine
before I put fingers to keyboard--my code evolves as I'm writing it. I edit,
revise, rethink, and refactor constantly, long before anything's even
compiled. Keys and screen facilitate that process a thousand times better than
pencil and paper. Handwriting just isn't the best _medium_ for code [1].

[0] And thank god I have a CS education, because if nothing else I at least
learned how to write legible braces, brackets, ampersands, and at-signs by
hand...

[1] OP is obviously a wonderful idea but that's because it's teaching aspects
of CS that _aren 't_ code.

~~~
geebee
Yeah, I opened a can of worms with my comment, didn't I? For the record, I'm
one of the people who has complained here on HN about whiteboard interviews.
Just because they taught me that I rely a bit too much on the compile/run
cycle doesn't mean that I think coding exercises at the whiteboard are the
right way to do interviews!

I think your use of the term "latency" is a very good way to describe some of
the problems around whiteboard coding.

------
rietta
Reminds me of competing in the ACM Intercollegiate Programming Competitions.
With 3 students and one computer, you had to solve the problems offline and
only spend keyboard time for entering and running your program. It really
teaches a skill-set that's hard to appreciate if you always have a computer
and the compiler in front of you while working out solutions.

~~~
RogerL
Yes. I thought that really artificially skewed the scores, though. When we
went to the finals one team member (who normally achieved one run, one pass),
keep flubbing his entry. His protracted time in the seat meant the rest of us
were artificially restricted at getting our problems done. I had an entire
program written out but was never able to even type in. I suppose you could
argue that we should have managed that resource better, but you cannot
realistically predict someone is going to have an off day; it was 'clear' that
he understood what the problem was and the next change was going to be
successful. Ah well, it was a lot of fun.

------
pja
I should get round to submitting my updated version of the 'have a bunch of
kids be logic gates & simulate a binary adder' exercise I found on the net a
few years ago which has gone down really well the last few times I've run it.

~~~
copperx
I'm teaching an architecture course, and I would really appreciate it if you
could share the link.

~~~
pja
[http://intellectualicebergs.org/kidputer/](http://intellectualicebergs.org/kidputer/)
was my original source.

I’ve tweaked the exercise a bit though, so I’ll see if I can get those changes
written up - the original author gave us permission to use the work as we saw
fit back when I worked at the Dept of Comp.Sci. in Oxford.

------
kazinator
There is no problem with using a computer for teaching. The problem is the
nature of the modern personal computer. It's too usable for things other than
programming, which constitute numerous distractions.

Maybe what you need for teaching is a computer with a programming language in
the firmware, which gives you that language's REPL (and nothing but that)
within a fraction of a second of powering up.

~~~
bcoates
Strong agreement. As a kid I learned more programming skills from my HP-48 (a
forth/scheme hybrid REPL posing as a calculator) than from the PCs I mostly
used for video games.

~~~
fit2rule
As a parent, I'm using my old 8-bit machines to teach my kids computer
science. It worked then, and it still works today - in fact, they're becoming
more and more the locus of activity, the slow, cranky old 1mhz machines in the
retrobattlestation, but they're still getting massive use - the value of them
is: no Internet. You only get what you put into it. And my eldest 8-year old
is having a blast learning how to make pixel-graphics, old school .. finally a
use for his math!

------
jedberg
I'm seeing a lot of comments here about the format and how it's not great to
learn CS without a computer, etc etc.

I personally think this site is AMAZING and I plan to share it with many of my
friends.

Perhaps this is because many of my friends, like my wife, are elementary
school teachers and I've seen the kind of resources they usually have to work
with.

As far as resources for elementary school kids, this site is far and away the
best I've ever seen. They clearly took their time to do things well, knew
their target audience, made a site that is super useful to _teachers_.

~~~
copperx
Which site are you talking about?

~~~
rev_bird
The one linked at the top of the page, I presume.

------
adpirz
I'm building a K-12 comp sci curriculum for a network of schools and we're
pulling a LOT from this. Why? I previously taught an intro CS course to 8th
graders with the "jump straight to the code" method, and found that many, if
not most students struggled with conceptualizing and articulating algorithms,
even in Scratch which is very visual.

Moving forward, our curriculum is going to build those skills up front and
off-screen, then move to code. How we build those is a continuing work in
progress, but CS Unplugged is a big part of that.

~~~
musername
Maths should be preparing for this in advance. after all it's just maths, even
with the sorting and all. We are not talking about systems programming or such
like. Still, as others mention, having a pc with a debugger and other
distractions is ... distracting.

------
meeper16
"Learning music by reading about it is like making love by mail." \- Luciano
Pavarotti

~~~
Someone
_" Computer science is no more about computers than astronomy is about
telescopes."_

(Attributed to) Dijkstra.

 _" Computer science isn't a science and it isn't about computers"_

(www.jonahkagan.me/projects/writing/cs-essay.html, but I think that isn't the
original)

You can learn music without ever touching an instrument, but you can't learn
playing an instrument that way.

Similarly, learning computer science is not the same thing as learning to
program or learning software engineering.

~~~
tyrust
>"Computer science isn't a science and it isn't about computers"

Earliest use of this quote that I know of is from Abelson in his 1986 lecture
teaching SICP:
[https://youtu.be/2Op3QLzMgSY?t=24](https://youtu.be/2Op3QLzMgSY?t=24)

~~~
amelius
Hence, we should call it "Information Technology" instead.

------
seanmcdirmid
This is the reason Europeans CS is generally much more theoretical than
American CS: in the early days of computing, Europe was rich in talent but not
so much in hardware, so focused on computer science in a purer sense; the
Americans had plenty of hardware, so focused more on pragmatic aspects.

This still has some effects today in department cultures even though hardware
is readily accessible to all now.

~~~
theoh
It would be interesting to hear more about that. Do you have a source you
could post a link to? Cambridge University in particular felt (in late 90s)
like it might have been affected by that.

------
LouisSayers
When I was at uni we took CS Unplugged around primary schools to play some of
the games from the materials and teach kids some of the basic concepts. It was
heaps of fun and I highly recommend that other people do the same!

In particular I love [http://csunplugged.org/error-
detection/](http://csunplugged.org/error-detection/) as it's a magic trick.
I've used this at parties, and I find it funny that it's a computer science
concept.

Tim Bell's also super nice, and it's fantastic that he developed this!

------
jorgeleo
This is the "new" computer science, the one with no math

------
jot
Reminds me of this approach:

[http://everyonecanprogram.com/](http://everyonecanprogram.com/)

UK schools are teaching programming with marble runs.

------
deano
I went through the K&R C book writing out the exercises and notes in a
notebook. I had limited access to a computer at the college I was attending.
Thankfully I was well beyond my "Intro to UNIX" class and that granted me the
free time to play with the code I had written in my notebook. I think learning
to code this way can be a huge aid in conceptualizing certain CS / programming
topics.

------
b3b0p
In my intro CS course the first day the instructor said they don't teach
programming and there was zero credit lab for that. He said this is the design
and implementation of algorithms. The labs were 3 hours, zero credit, taught
in C and on Linux. If I remember the machines in the lab were running
Afterstep, I used Window Maker at the time on my personal machine. Memories...

------
plg
I had a 3rd year undergrad CS class in "Programming Paradigms" where the final
exam involved writing programs in Prolog, Lisp, C, and Fortran ... With paper
and pen. It was awesome. As I recall I scored a 100 and was a TA for the
course the following year (in my 4th yr)

------
alienium
i dropped out so i can get a job to buy a computer to keep studying :( very
bad financial situation

~~~
copperx
This doesn't make sense in a world where Raspberry Pis cost $35

~~~
LouisSayers
Not much use without a screen, mouse and keyboard. But yes, if someone really
wanted it bad enough, they'd make it happen.

------
DrNuke
Thanks for sharing, will pass to fellow non-native programmers for them and
their kids. I'm afraid to say that in a productive environment CS is still way
more a technical effort than a cognitive one for "us". But Python helps, aha!

------
baldfat
HOOSERS - Basketball movie (The best sports movie ever) had the first practice
was performed with out a basketball. This reminds me of this.

Love this organization with the activities and activities with videos. Great
presentation to me.

------
avodonosov
The contents of the source seems to be good, but somewhat noise - too lot of
intro, preliminary info, table of contents, etc. It's takes digging to get to
actual knowledge.

------
abc_lisper
This is excellent. Great to get kids interested. Heck, my mom would be
interested too.

------
MehdiHK
This is so cool! Are there any similar efforts worth bookmarking?

------
smaili
Kind of ironic that it's without a computer yet you need one to access their
site :)

~~~
webXL
Or you can print it out and give it to someone who wants to teach kids some
CS!

