You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

ShardPhoenix comments on An attempt at a short no-prerequisite test for programming inclination - Less Wrong Discussion

4 Post author: ShardPhoenix 29 June 2013 11:36PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (68)

You are viewing a single comment's thread.

Comment author: ShardPhoenix 29 June 2013 11:40:09PM 1 point [-]

Poll for test takers:

Programming experience vs. whether you got the correct results (Here "experienced" means "professional or heavy user of programming" and "moderate" means "occasional user of programming"):

Did you think this was fair as a quick test?

Submitting...

Comment author: Nornagest 30 June 2013 12:32:14AM *  3 points [-]

I got this right, but ended up having to invent notation to keep track of the indirection in the last segment. I think it's likely a decent test of whether you're likely to quickly pick up an intuitive head for pointer math and a very basic variable name-value distinction, but it won't capture other forms of abstraction that're necessary for programming: loops, types, conditional branching, Boolean logic. You could probably get away with dropping conditionals (I get the impression they're fairly intuitive), but I've had trouble teaching the others in the past.

Has a bit of an old-school feel to it, too; I'd expect the results to correlate better with talent for C than they would with, say, Python.

Comment author: J_Taylor 30 June 2013 01:02:44AM 0 points [-]

I got this right, but ended up having to invent notation to keep track of the indirection in the last segment.

This is also the case for myself. I would be very impressed by anyone who did not have to do this.

Comment author: James_Blair 30 June 2013 01:44:28AM 12 points [-]

The trick is to evaluate right to left.

Comment author: AlexSchell 30 June 2013 01:28:58PM *  3 points [-]

I opted for doing this and also checking the answer once, as opposed to using notation.

Comment author: Alsadius 30 June 2013 08:28:31AM 3 points [-]

I didn't. Instead, I just kept taking the least-condition-laden part of the instruction, replacing it with a number, and repeating the operation on the newly simplified sentence.

Comment author: palladias 30 June 2013 07:02:12PM 0 points [-]

Ditto.

Comment author: NancyLebovitz 30 June 2013 01:11:12AM 0 points [-]

I didn't invent notation, but I did write

number whose number [redacted] box whose number = [redacted]

so that I could keep track as I worked from bottom to top.

Comment author: sebmathguy 02 July 2013 04:05:08AM *  2 points [-]

I'm a new user with -1 karma who therefore can't vote, so I'll combat censorship bias like this:

Moderate programmer, correct

Yes

Comment author: gjm 30 June 2013 07:46:02PM 1 point [-]

So, as of 2013-06-30 20:42 (UK summer time) it's 13:4 for "experienced programmers", 10:2 for "moderate programmers", and 7:2 for "non-programmers". The "moderate programmers" are beating the "experienced", and the "non-" are well within the margin of error.

Now, of course LW is a hive of scum and villainy^H^H^H^H^Hplace where even the non-programmers tend to be pretty programmery, and as Morendil points out the people who chose to take the test may be atypical somehow -- but, still, this looks to me like evidence that this isn't a very effective test for discriminating between people with aptitude for programming and people without.

Comment author: ShardPhoenix 01 July 2013 09:41:31AM 0 points [-]

Yes, I agree that the poll results aren't too encouraging. It might still be interesting to try the test on a more general population, but without a follow-up to see who eventually learned to program it would be hard to tell how accurate (if at all) it was.

Comment author: DSherron 01 July 2013 08:08:20PM 0 points [-]

Answered "moderate programmer, incorrect". I got the correct final answer but had 2 boxes incorrect. Haven't checked where I went wrong, although I was very surprised I had as back in grade school I got these things correct with near perfection. I learned programming very easily and have traditionally rapidly outpaced my peers, but I'm only just starting professionally and don't feel like an "experienced" programmer. As for the test, I suspect it will show some distinction but with very many false positives and negatives. There are too many uncovered aspects of what seems to make up a natural programmer. Also, it is tedious as hell, and I suspect that boredom will lead to recklessness will lead to false negatives, which aren't terrible but are still not good. May also lead to some selection effect.

Comment author: FeepingCreature 30 June 2013 02:26:02PM 0 points [-]

The indirection syntax should be rewritten to be left to right. As it is, it's a good fit for C's idiosyncratic type syntax, but needlessly obtuse otherwise.

  1. In the box whose number is in box 6, write the sum of the number that's in the box whose number is in box 4, and the number that's in box 5.

  2. Take the number in box 5. Where n is the number in box 4, take the number in box n, and the number in box 5, and add them. Where m is the number in box 6, write the result in box m.

Comment author: novalis 30 June 2013 05:27:43PM *  1 point [-]

The indirection syntax should be rewritten to be left to right.

I don't actually think so. The final answer is simply f(g(h(x))), which is a perfectly normal thing to see in programming.

That said, I still think it's a bad test. It involves no reasoning whatsoever -- merely following instructions carefully. I'm a reasonably good programmer, but sometimes a bit sloppy (that's why I write tests). So, I ended up with the correct final answer but a wrong number in one of the boxes.

Comment author: palladias 30 June 2013 12:41:22AM 0 points [-]

I wasn't sure whether to score myself as a moderate programmer or non-programmer. One CS class in college, three in Udacity, read GEB, use algorithmic approaches in day to day life, but not on a computer.

Comment author: ShardPhoenix 30 June 2013 01:35:43AM 1 point [-]

I'd say moderate.

Comment author: Barry_Cotter 30 June 2013 02:21:32PM 2 points [-]

I think there's a category missing between moderate and non-programmer. I got halfway through Eloquent JavaScript and maybe a tenth of the way through Learn Python the Hard Way. I have way, way less exposure to programming than palladias but almost infinitely more than the modal person. I suggest novice/glancing familiarity. I did the poll as moderate.

Comment author: Estarlio 01 July 2013 09:19:31PM -1 points [-]

I suspect this is more confusing because of the way it's written - especially the last step which I'd imagine is where most people are falling down - than because of it really being complicated.