I found this old Jeff Atwood post (yes, it’s because it was linked from so-called “Hacker News,” okay?) about the apparent intractability of teaching programming, based on an academic paper. The upshot is that 1) some (and perhaps a majority of) people are simply incapable of coming to grips with programming and 2) these people seem to derive almost no benefit of any kind from programming coursework.
An example of a question that can be used to determine if someone will get anything out of studying program is presented:
Read the following statements and tick the box next to the correct answer.
int a = 10; int b = 20; a = b;
The new values of a and b are:
- [ ] a = 20 b = 0
- [ ] a = 20 b = 20
- [ ] a = 0 b = 10
- [ ] a = 10 b = 10
- [ ] a = 30 b = 20
- [ ] a = 30 b = 0
- [ ] a = 10 b = 30
- [ ] a = 0 b = 30
- [ ] a = 10 b = 20
- [ ] a = 20 b = 10
So people throw out a whole lot of explanations for this in comments and inevitably devolves into “teachers suck” because everyone on the internet is such a fucking precious snowflake, but I’m not going to get sidetracked by that, because then I’ll just get depressed and never get to the point.
Which is: the reason this information confuses people is that they think that variable assignment is confusing because it’s a mathematical abstraction, but this isn’t true. Variable assignment, and a number of similar concepts that you need to wrap your head around in programming are confusing because they are linguistic abstractions, and linguistic prejudices are confusing and difficult to override (or, as is apparent here, even identify) because they develop than people tend to think they would, and so much work goes into preserving them. Understanding computers requires one to assume intuitively (although not consciously) that meaning is pretty arbitrary, which is arguably the single most important step to understanding (again, often in a pre/non/sub-conscious way) how to interact with the rules whereby meaning is generated.
So I decided that my existing side-projects were all too mercenary and that I needed to do something goofy. The goofy thing I decided to do centers around generating random text using Markov Chains. I’m learning Javscript as I go, and when I was ready to have it generate text from the probability table I wasn’t somewhere where I could connect to the internet, so I didn’t know how to generate random numbers. Just to test the generator I arbitrarily set it to retrieve the first word from the list of possible words. For various implementation reasons, this will give you the input text, unless certain kinds of repetition occurs.
As an input text, I used the last two paragraphs here, because I thought it would be funny, and a little meta. After all this explanation, this will probably be a little disappointing, but the point is I got this:
and I thought it was totally hilarious.