JS assessment: A test-driven approach to assessing JS skills
1–10 of 12 posts
Re: JS assessment: A test-driven approach to assessing JS skills
#21. How some students came up with interesting approaches I wouldn't have initially thought up.
2. How many students wouldn't get the tests to pass. They'd do something part way, which would have looked 'good enough' if I'd just described the problem. But when running via a test runner, it failed.
Re: JS assessment: A test-driven approach to assessing JS skills
#3Re: JS assessment: A test-driven approach to assessing JS skills
#4What I'm more concerned is the idea that this is apparently structured like an automated test. If you used it that way, then here is a function which would pass the first test file:
fn = function (a, b) {
switch (b) {
case 3: return 2;
case undefined: return 10;
case 2: return '1 3 4'.split(" ");
case 10: return [0, 0, 0, 0, 10];
case 'z': return '1 2 z 3 4'.split(" ");
default: return '1 2 3 4 a b c'.split(" ");
}
};
It was built by just looking at the "expect" calls, finding the input to the function and the output from it, and duplicating that output.That's obviously not what you want to test. You really want to say, "you give me an object, and I'm going to generate a couple random test vectors and make sure you do the right thing with those vectors." You shouldn't hardcode the result, but the right algorithms, so that someone else's solutions can be measured against the right way to do things. And then you need to ask people not to modify the right solutions, but to duplicate them.
Re: JS assessment: A test-driven approach to assessing JS skills
#5Re: JS assessment: A test-driven approach to assessing JS skills
#6I like this idea but I think the design needs to be pretty drastically rethought. Node.js is not really the right medium for this sort of test, although it might function as a first barrier for screening the interested; "you must be able to follow readmes to install software" etc. What I'm more concerned is the idea that this is apparently structured like an automated test. If you used it that way, then here is a fun…
Re: JS assessment: A test-driven approach to assessing JS skills
#7Re: JS assessment: A test-driven approach to assessing JS skills
#8I think those things are super-fun! You always learn something :) Discovered this super-simple "partial" pattern while doing the "functions" part: https://gist.github.com/2375986
Re: JS assessment: A test-driven approach to assessing JS skills
#9I like this idea but I think the design needs to be pretty drastically rethought. Node.js is not really the right medium for this sort of test, although it might function as a first barrier for screening the interested; "you must be able to follow readmes to install software" etc. What I'm more concerned is the idea that this is apparently structured like an automated test. If you used it that way, then here is a fun…
Your guess about why I chose something that involves a little bit of setup is right on target, too. Being able to follow the instructions in a readme and get a simple project like this set up is a key skill to have, too.
Re: JS assessment: A test-driven approach to assessing JS skills
#10It would great to see this expanded to cover more aspects of JS. It seems like it would be a good set of companion exercises to a tutorial.