Live data from Hacker News

Can a simple algebra test predict programming aptitude?

codeup.com

111–120 of 216 posts

Re: Can a simple algebra test predict programming aptitude?

#111
post #63

Earlier quoted context omitted.

Yes it is algebra. Take second problem for instance. X + (x + 1) + (x+ 2) = 69. Solve for x.

Or just recognize that three consecutive numbers mean you divide by three and get the median of the three numbers. So 69/3-1, 69/3, 69/3+1, giving 22, 23, 24. No algebra involved, you just need to interpret the problem and build a tiny model in your head. Exactly like (some kinds of) programming.

It seems like you're doing algebra :)

Re: Can a simple algebra test predict programming aptitude?

#112

Most programming jobs involve a lot of algebra. You have variables, you do arithmetic to those variables, you apply functions. It's not a great surprise to me that if you are good at high school algebra, you can probably learn how to program. You might not be a great programmer, but you'll be able to do it.

An algebra is just a system of rules. Being good at number rules (school algebra) does not have much to do with being good at state rules (code algebra). I'd say there's more correlation between functional programming and school algebra, if anything.

Being good at a set of abstract formal rules is probably at least some kind of indicator that you'll be good at another set of abstract formal rules.

Re: Can a simple algebra test predict programming aptitude?

#113
post #61

If there is one thing that has always bothered me, is people evaluating student's prowess in "Computer Science" (which is not programming, shame on you) by having them learn your normal run-of-the-mill programming language/paradigm like Javascript, Python, PHP and whatnot and then claim they are not apt to program because they cannot solve problems or handle variables, mutability, etc etc. There are A LOT of differen…

Recursion is as hard as mutable state to grasp if not harder. We might find a few people who can do one thing sligtly better than the other one, but not complete blanks.

The whole point of what I said is that "hard" is a difficult thing to judge. For some tasks and some languages recursion is much easier to understand, teach and use. Just take the good ol' classical example of quicksort in Haskell or fibonacci in Lisp.

Some people can grok recursion in a functional programming language much faster and more easily than they would understand the concept of branching, variable assignment (with mutability) and non-pure functions (what we used to call "procedures" back in the day).

Re: Can a simple algebra test predict programming aptitude?

#114
post #69

Earlier quoted context omitted.

Ah, Scheme.. You must be an Indiana University grad. Only school I know that uses Scheme that much.

Lots of top schools use scheme (via SICP). Cal, Stanford and MIT all do (or at least did when I was an undergrad).

Dude you went to MIT? That's rad. EDIT: why downvote someone for complimenting them on their top schooling?

Re: Can a simple algebra test predict programming aptitude?

#115
post #77

Earlier quoted context omitted.

That's exactly how I solved it. I'd consider myself a pretty decent programmer, but I did poorly in algebra and calculus at middle, high school, and university level. Give me "x + (x + 1) + (x + 2) = 69" and I wouldn't know where to start. I could probably turn that word problem into that equation, but I would have no idea how to actually solve the equation algebraically. But given the word problem alone I knew to di…

Are you saying that if the word problem was "2 consecutive numbers and a third number that was five higher than the second number" you'd be unable to solve it? "Tricks" work for simple cases. Algebra works for all cases.

Yeah, I would be unable to solve it, given that I'm pretty sure there is no solution if we assume that "consecutive" implies integers (and I'd be curious what 'consecutive' means if we don't).

If instead we made it "2 consecutive numbers and a third number that was five higher than the second number add up to 70" (i.e., 21 + 22 + 27), that's easily solved using 'tricks'. Really, the trick mention (which is what I did in my head, too) is just a rephrasing of the algebra. That is, I would subtract 4 off of the thing that is 5 higher (so that it's now 1 higher; the problem is now the same, get 3 consecutive integers), subtract 4 off of the number I'm trying to get (so 66), so the problem is now 3 consecutive integers that equal 66, and solve the same way (66/3 = 22, so -> 21, 22, 23), and then just add the four back in to the highest (21, 22, 27).

Re: Can a simple algebra test predict programming aptitude?

#116

Earlier quoted context omitted.

There is a difference between “algebra with numbers” and “algebraic manipulation”. You do the latter all the time with code when you observe and use equivalences like this: if a then return b else return c === return (if a then b else c) I.e., “return” is distributive over the branches of the “if” expression, so you can factor it out. When you see “bad” programmers redundantly specifying Boolean expressions like “x =…

This skill can help to write more concise code and refactor better but I wouldn't say it's the core component. Very well-functioning, maintainable code could certainly be written that was full of "== true" lines. That is preferable to indecipherable long-winded one-liners with no comments that are hard to parse.

That’s a false dichotomy. An indecipherable long-winded one-liner with no comments is not well factored code either.

I didn’t mean to imply that syntactic manipulation is the core component of programming, only that it’s a required skill, which beginners commonly struggle to learn. I’ve tutored a good number of beginner CS students, and a big issue is developing a general understanding of a language from the few concrete examples they’ve seen. If you’ve only ever seen “name.name()”, you may be surprised that “(expression).name()” is possible. If you’ve only ever seen “if (name == expression)”, you may be surprised that “if (name)” or “name = (name == expression)” are possible.

This article concerns how beginners learn to program, and I’m only arguing that I would expect an early understanding of the algebra of programs to be an advantage in learning how to productively manipulate programs. When you’re comfortable with the syntax, it is much easier to reason about the more important issue of semantics.

Re: Can a simple algebra test predict programming aptitude?

#117
Lot of people in here offering cheap opinions, while mgirdley's team has done the actual work. They're not saying that the kinda of algebra test they're proposing is foolpoof, perfect, subjectivity-free, or even the best way of testing for programming aptitude.

What they _are_ saying is that the test is an efficient, effective way to do it, with better ROI than IQ tests.

It doesn't actually matter _why_ that's the case, though Animats' suggestion seems plausible: "From the test questions, this isn't an "algebra test". It's a word problem decoding test. That's appropriate to programming, where you have to go from an informal specification of the problem to a formal one."

Re: Can a simple algebra test predict programming aptitude?

#119
post #80

Earlier quoted context omitted.

There main test has 60 datapoints... how many tries do you think they made exactly before deciding they didn't correlate as well? Yes, IQ tests are expensive, but if you buy one test, the marginal cost of giving to an extra student is basically 0. I suspect it wasn't tested at all.

A real IQ test takes at least 2 hours of 1-on-1 time with a psycholigist to administer, so in the event that someone actually wants to do real iq testing the marginal cost is quite high.

The ASVAB, GRE, LSAT, MCAT, and SAT all have correlations with psychologist administered IQ tests of around 0.9. WORDSUM, which is a ten word vocabulary test has a correlation of 0.71[1].

[1]Every time I use the WORDSUM variable from the GSS people will complain that a score on a 10-question vocabulary test is not a good measure of intelligence. The reality is that “good” is too imprecise a term. The correlation between adult IQ and WORDSUM = 0.71. The source for this number is a 1980 paper, The Enduring Effects of Education on Verbal Skills. I’ve reproduced the relevant table…

The Enduring Effect of Education on Verbal Skills

http://www.jstor.org/discover/10.2307/2112492?uid=3737800&ui...

Re: Can a simple algebra test predict programming aptitude?

#120
post #61

If there is one thing that has always bothered me, is people evaluating student's prowess in "Computer Science" (which is not programming, shame on you) by having them learn your normal run-of-the-mill programming language/paradigm like Javascript, Python, PHP and whatnot and then claim they are not apt to program because they cannot solve problems or handle variables, mutability, etc etc. There are A LOT of differen…

Recursion is as hard as mutable state to grasp if not harder. We might find a few people who can do one thing sligtly better than the other one, but not complete blanks.

In 35 years of programming across platforms and languages covering embedded to web applications it is my opinion that recursion is dangerous and useless. There is no way I would use recursion to evaluate how good a programmer might be. To quote the movie: "Frankly dear, I don't give a damn".
Post reply on HN