9 ms·
Sorry, not buying it. I caught 3 "Whoops sorry you missed a weird bug in a specific programming language that you weren't explicitly being tested on". Sure, if
by kefka 9y ago
Sorry, not buying it.
I caught 3 "Whoops sorry you missed a weird bug in a specific programming language that you weren't explicitly being tested on". Sure, if I was doing a Python3 quiz, I'd expect those. But this wasn't what the quiz claimed to be.
Turns out, the "fill in the blank" code was easy, got all of them. Along with all the 1st year theory questions.
- horsawlarway 9y agoI agree. Coming in with a LOT of experience in JS and a good damn chunk in c++, but none in python... this is really bad test. You ask dev about aspects of the language that are essentially memorization: Does matrix.append(x) in python append by reference or by value? Both are equally likely without knowing anything about the language. the question is also pretty easy to answer correct IF I know that, but I have no reason to know that. You're not testing skill in any sense of the word. You're purely testing familiarity with this specific language (and worse, this language's standard library) That's bad.
- kbp 9y ago> Does matrix.append(x) in python append by reference or by value? Both are equally likely without knowing anything about the language. I don't think they're equally likely. The question would have the same answer in Javascript, Ruby, Lisp, Perl 6, Java, and many other languages. You can see from the code samples that Python is a high level, dynamic, imperative language, so I think it's fair to assume you would expect that behaviour from it. There's a bit of guessing, but you can make an educated guess.
- horsawlarway 9y agoWay late, but your response sort of proves the point. You're having to argue about what I can infer about the language. What JS/Ruby/Lisp/Perl/Java do is irrelevant. Hey, C/Go/D/C++ would all be more likely to append by value, but neither of us care a whit because it's asking about Python, which I know nothing about. So (and this is really hard) try to forget that you've got experience with the language, and approach it as a random pseudo language: this question has no clear answer, because it depends on the memorized implementation details of the standard library of a language... That's bad. --- Finally: JS doesn't have matrix as a base type (boolean/number/string/null/undefined/symbol is it, baby), so for this same question, I'd strongly argue that you're simply wrong about bucketing JS with those other languages. Again, for JS the question would revolve around the implementation details of the matrix object and its prototype. Trust me, I can write a useful matrix implementation that appends by value in JS.
- kbp 9y ago> What JS/Ruby/Lisp/Perl/Java do is irrelevant. Hey, C/Go/D/C++ would all be more likely to append by value, but neither of us care a whit because it's asking about Python, which I know nothing about. I guess my point was that you should be able to infer that Python would be more likely to behave like JS/Ruby/Lisp/Perl/Java than C/Go/D/C++. If you know or can tell by looking at it that it's much more in the first camp then the second, then you should be able to guess. You're probably right that I overstated how easy that is to tell just from the syntax if you don't know anything at all about Python, but it's also pretty short of memorizing implementation details. > Finally: JS doesn't have matrix as a base type (boolean/number/string/null/undefined/symbol is it, baby), so for this same question, I'd strongly argue that you're simply wrong about bucketing JS with those other languages. Again, for JS the question would revolve around the implementation details of the matrix object and its prototype. The 'matrix' in the question wasn't a special matrix type, it was just a list of lists. Word-for-word translated into Javascript it would look like: let matrix = [] let row = [0, 0] for (let i = 0; i < 2; ++i) matrix.push(row) matrix[1][1] = 1
- kefka 9y agoQuestion: If you were given a new block of code below, what is the result of X if X is passed by reference? [Block of code] 1. 34 2. 17 3. 43 4. 22.5 5. Not listed ____________________ This would be a much more clearer way of handling pass by ref/value. 2 of the answers are correct, so this could be reused to ask the other one. If they're being tricky, they can award half-credit for choosing the wrong pass-by-*. And 3 other answers are junk. And this abstracts out any sort of programming neologims or fetishization of $random_language.
- horsawlarway 9y agoBut that LITERALLY is memorizing implementation details. Here are the rules for JS, which I happen to know, because I use it often: 1. Javascript is always pass by value, but when a variable refers to an object (including arrays), the "value" is a reference to the object. 2. Changing the value of a variable never changes the underlying primitive or object, it just points the variable to a new primitive or object. 3. Changing a property of an object referenced by a variable does change the underlying object. Those are not trivial "just infer it" details. That's highly language specific, and absolutely unrelated to the skills the test claims to be evaluating.
- eropple 9y agoAgreed - this is a really Python-heavy thing that shouldn't be. I got 13/15 largely through guessing the syntax and semantic weirdness of a language I only rarely touch and never for long (like, the matrix question, by-value or by-reference? I had a 50/50 chance to get it right). Not a big fan. Feels really weird.