An attempt at a short no-prerequisite test for programming inclination

There has been pre­vi­ous dis­cus­sion on LW on the topic of how to quickly de­ter­mine if some­one might be good at pro­gram­ming. This is rele­vant be­cause this is cur­rently a good ca­reer field that can be rel­a­tively easy to en­ter, and be­cause pro­gram­ming-style think­ing is of­ten rele­vant to LW top­ics (eg de­ci­sion the­ory). In light of this I’ve cre­ated the fol­low­ing test, which is based on my mem­ory of a test from an in­ter­view pro­cess for a pro­gram­ming job. It at­tempts to test com­mon low-level con­cepts from pro­gram­ming such as se­quence, as­sign­ment, in­di­rec­tion, and re­cur­sion, in a way that doesn’t re­quire any pre­vi­ous pro­gram­ming ex­pe­rience (al­though pre­vi­ous ex­pe­rience will likely make it eas­ier).

This test is aimed at get­ting a quick clear pos­i­tive, so the fact that some­one does poorly on it doesn’t mean they can’t be­come a pro­gram­mer (ie I’d guess it’s likely to gen­er­ate false nega­tives rather than false pos­i­tives). This test is ob­vi­ously lack­ing sci­en­tific val­i­da­tion, and is prob­a­bly too short, but I’d like to start some­where.

I’d like to in­vite both pro­gram­mers and non-pro­gram­mers to take the test for com­par­i­son. It should only take about 5 min­utes. If you do the test, please also take the short poll in the com­ments for feed­back and cal­ibra­tion pur­poses, re­gard­less of what re­sult you got.

----- Test be­gins be­low -----

This is a 1-ques­tion al­gorith­mic think­ing ex­er­cise that should take less than 5 min­utes.

Pen and pa­per is re­quired. There should be no pre­req­ui­sites be­yond ba­sic ar­ith­metic.

First, write down the fol­low­ing se­quence of num­bered boxes. You will be writ­ing num­bers in some of the boxes more than once, so ei­ther use a pen­cil or make the boxes big enough to cross out and re­place num­bers.

1 2 3 4 5 6 7 8

[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]

Fol­low­ing is a se­quence of num­bered steps. Do the steps in the or­der they are num­bered (un­less in­structed oth­er­wise). Note that “write a num­ber in a box” means “cross out the pre­vi­ous num­ber and write the new num­ber”.

1. Write 1 in box 3, 2 in box 6, 9 in box 4, 1 in box 5, 5 in box 8, and 0 in the re­main­ing boxes.

2. In box 4, write the sum of the num­ber in box 3 and the num­ber in box 5.

3. In both boxes 2 and 5, write the the num­ber in box 8 minus the num­ber in box 6

4. Write 1 in the box whose num­ber is in box 3

5. In box 3, write the sum of the num­ber in box 3 and the num­ber in box 4

6. In the box whose num­ber is in box 6, write the sum of the num­ber that’s in the box whose num­ber is in box 4, and the num­ber that’s in box 5.

7. Do step 2 again, then con­tinue di­rectly on to step 8.

8. Do step 4 again, but this time with box 4 in­stead of box 3, then con­tinue di­rectly to step 9.

9. The fi­nal re­sult is the num­ber that is in the box whose num­ber is the num­ber that is in the box whose num­ber is equal to 2 plus the num­ber that is in box 4. End of test.

--------------

Ex­pected Re­sults: http://​​paste­bin.com/​​wA6xDxVb

Thanks for tak­ing the test! Don’t for­get to an­swer the poll in the com­ments too.

I’d also ap­pre­ci­ate any feed­back on the test, both if you think its go­ing in the right di­rec­tion or not and if you think there are spe­cific im­prove­ments that could be made.

edit: As some com­menters have pointed out, there was a pre­vi­ous at­tempt at such a test that you may have heard of: http://​​www.eis.mdx.ac.uk/​​re­search/​​PhDArea/​​saeed/​​

How­ever, it seems that fur­ther in­ves­ti­ga­tion found that their test, while bet­ter than noth­ing, wasn’t very ac­cu­rate. The test given in this post takes a differ­ent ap­proach.