I have a sizable and growing portfolio of code I've written: some complicated algorithm stuff, some open source contributions; things like that. No one ever looks at it. I'm starting to wonder why linked lists are so important to employers.
I always look at that stuff and I ask about it during interviews, but I still ask general technical questions. Sometimes the candidate's contribution to a project is nothing more than writing the README file.
How Effective are Technical Interviews?
111–114 of 114 posts
Re: How Effective are Technical Interviews?
#112Earlier quoted context omitted.
I realize you are trying to make some sort of "Aha! You don't know what you're talking about!" point here, but in practice taking advantage of the fact that you can store multiple types of values in the same variable in a dynamic language is almost always a bad idea and subjects you to exactly the sort of bugs that this question is bringing to light. So, enjoy your sense of superiority because I made a slight mis-sta…
Apologies if the similar wording came across as some sort of personal jibe. I was merely trying to point out that even if the question was a simplification as you said, it was still a poor way to assess a candidate, because it's still getting hung up on a technicality rather than determining whether the candidate understands the underlying issue.
As to the technical issue, I don't think this has anything to do with dynamic vs. static typing. It would be theoretically possible to define operator+ in C++ to produce the same behavior as Javascript.
Re: How Effective are Technical Interviews?
#113Earlier quoted context omitted.
It's C we talking about, just add the remainder to 0x30 and you get your character.
[pedantic]: you should use '0', not 0x30. 1. The standard library C function atoi may be named 'ASCII to integer', but it should convert a numerical string in the platform's encoding to integer. For symmetry, itoa should convert an integer to a platform encoded numeric string, not to an ASCII numerical string. 2. Not all computers use ASCII for C strings. Because of that, '0' need not equal 0x30. For example, in EBCD…
Re: How Effective are Technical Interviews?
#114Earlier quoted context omitted.
Apologies if the similar wording came across as some sort of personal jibe. I was merely trying to point out that even if the question was a simplification as you said, it was still a poor way to assess a candidate, because it's still getting hung up on a technicality rather than determining whether the candidate understands the underlying issue.
I guess I read too much into your comment. Apologies in my part for overreacting. As to the technical issue, I don't think this has anything to do with dynamic vs. static typing. It would be theoretically possible to define operator+ in C++ to produce the same behavior as Javascript.
Well, yes and no.
In a sense, the real problem here is the overloaded + operator, which has two quite different meanings, numerical addition and string concatenation, depending on context. This is particularly a problem in a dynamically typed language, though, because you don't know in advance what that context is and therefore which overload will be chosen.
> It would be theoretically possible to define operator+ in C++ to produce the same behavior as Javascript.
In C++, you can't actually change the behaviour in this particular case, because you can only define overloaded operators where at least one operand has a user-defined type.
So in fact, just to make things simple, the C++ answer on most modern computers will be 56. Go figure. :-)