- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
Admin
Types are overused. Types are very good for some purposes, however sometimes people get too obsessed with them. I like C's structs. It's all about the data. Of course, I wouldn't necessarily call them strings, but most of the time I find I'm passing character arrays around...occasionally I might pass some numbers around instead, but normally it's jsut a whole bunch of characters.
Sometimes I use numbers too, although only when I need to do frequent calculations....
Admin
Admin
Truth. I used a FizzBuzz in my company's recent bout of hiring. I got one of my colleagues to do the question; took maybe a minute, including reading and bewilderment ("is it supposed to be this easy?").
The first interviewee I gave it to took 15 minutes. I was flabbergasted. Some were slow, some failed outright, some betrayed their lack of communication ability, and a small minority did it perfectly fine. It's not like I didn't screen their resumes. My test wasn't at all far from the stereotypical FizzBuzz either, I just customized it enough to keep it from being too Googleable.
Admin
Except that as we all know, cheaters do prosper all the time.
They misrepresent situations to the detriment of others, they take credit for things, they overcriticize and are hypocritical, they abuse and curry favor, they rely on politics rather than engineering merit, they resist change, and they are incompetent and hide it with metrics that obscure performance (360 degree reviews my ass)
So, the article was spot on, but the title is wrong. The truth is cheaters do just fine. It's the rest of us who bounce from place to place trying to avoid their devastation.
Admin
It's funny that when you give out FizzBuzz question then change the number from 3 and 5 to 2 and 7, and still seeing people submitting reply with 3 and 5.
They don't even qualify for "Copy and paste" type of programmer.
Admin
No, you're The Only One.
Admin
Admin
The answer is A. ';' is the assignment operator, and () is the swap operator. =D Also, if you intend () to be equivalent to += then its associativity is different direction to ; which makes it an annoying programming language.
The point is just consistency. If I treat () as swap consistently for all 20 questions, then I've worked out a consistent schema, and I can be a programmer. These aren't random people that the test is given to. These are people who express enough of an interest in programming to take formal classes in it; presumably they have decent education leaning towards mathematics/science. I was given questions like this in third grade... if 4 # 2 = 2, and 15 # 3 is 5, what is 12 # 4? Changing the symbol used for the operator shouldn't make any difference; a decent programmer should be able to switch between using 'is' 'let' 'var =' '=' ':=' '<-' and changing it to more 'palatable' wording essentially takes it further away from programming and makes it an English test.
Also, I've interviewed many programmers before and if they can't write FizzBuzz in less than 10 minutes, interview is over. It happens disturbingly often.
Admin
I think part of why people here are having a hard time understanding the cited article is that it's difficult to conceive of the listed problem unless you've seen it for yourself. Source: I teach programmers. Watching people struggle with a task almost identical to one they've already solved is commonplace.
As an example, in High-School maths, a common form of task is:
I'm not saying this is a good teaching method, but it's how my school worked and it's how a lot of my friends and colleagues were taught.
The expectation of the sort of people who hang around on forums such as these is that there are 3 categories of people: A) Those that solve all 50 questions correctly (barring transcription or arithmetic errors) B) Those that solve all 50 questions incorrectly, making the same mistake over and over C) Those that solve 4 questions one way or the other, and assume the rest will be the same
It may come as a surprise to learn that there is a 4th category: D) Those that do all 50 questions, get some right and some wrong, following a different logical procedure each time. Sometimes they add, sometimes subtract, sometimes skip that step, sometimes do it twice. They are unable to extrapolate from the example in a consistent manner.
If you're the sort of person to read The Daily WTF, you are not in that 4th category. Your coworkers might be, but since life rarely needs us to do the same thing 50 times in succession, they look like category B. The trick is, categories A, B and C are actually the same: essentially you can follow an algorithm (I'm oversimplifying here. More broadly, you can recognise patterns in data and information).
Assuming you're still reading by this point: the cited article is research into this effect. If they get the same "wrong" answer 20 times in a row, they're in category B (which is functionally identical to A once you explain a given topic in enough detail to cover the bit they don't understand): it doesn't matter what you think the "=" sign does, as long as you think it means the same thing each time you see it.
Part of the point of the paper is recognising that category D exists, which is an alien concept to the sort of people who can program. If, however, you try and explain functions to the people in D, you'll be met with confusion: their brain just does not recognise ordered series of steps that are self-similar.
E.g. http://thedailywtf.com/Articles/The_Replacement.aspx. Observe the bit at the end with the strings.
Admin
TRWTF is having an IDE with a font that allows you to mistake the 1 and l.
Admin
Admin
Admin
If I was given that to write in an interview I'd ask for the business reason for doing it - what department wants it, how much are they being charged, etc. Or do you want people who will code whatever they're asked without any question?
Admin
Good luck with that, haha.
Admin
Or an English degree.
Admin
And if I was the interviewer in that case, I'd immediately dismiss you as someone too irrational to be a useful part of the team.
Really now. A quiz question for an interview has to be something simple enough that a reasonably competent applicant could complete it in a few minutes, maybe an hour tops. We're not seriously going to ask an applicant to write a complete manufacturing requirements planning system as part of a job interview. Even if we asked him to make a minor modification to an existing system, he would have to learn enough about that system to figure out where and how to make the change. For someone coming in with no prior knowledge of the system, that could well be hours of work for even a trivial change.
OF COURSE a quiz question is going to be over-simplified, abstract, and probably of no real-world value. The point isn't that our company needs to add a fizz-buzz processor to our accounts payable system, it's that we want to see if you are capable of writing a simple function accurately in a reasonable amount of time.
If you can't grasp that concept, than forget your programming skills, you don't have enough plain common sense to work here.
Admin
There's another way??
Admin
In any of those cases, you're out of the interview process.
Admin
[quote user="JPW"]I haven't coded in a while, let's see how I do in Perl.
Perl array merge
@combined = @first_array + @second_array; [/quote]
Nope, that will give you an array with a single element, which will be the sum of the lengths of the arrays, as + takes only scalars. You're looking for @combined = (@first, @second), since Perl flattens lists.
Gosh that was hard.
Let's try a Perl fizzbuzz. Let's use Map just to be a pain.
@integers = (1..100); map {&carbonate($_)} @integers;
print @integers;
sub carbonate{ $n = $_ if ($n %3*5 == 0) {$n = 'FizzBuzz';} elsif ($n %5 == 0) {$n = 'Buzz';} elsif ($n %3 == 0) {$n = 'Fizz';} return $n; } [/quote]
Close, should be $n = $_[0], or simply:
[quote]Am I hired for succeeding, fired for using Perl, or mocked for some obvious failure in the above?[/quote]
Not knowing scalar and list context is basically not knowing Perl, and not testing your code and then asking if you'll get mocked is just weak sauce.
Admin
I'll be back in a minute. I have to go and prepare invoices for my kids.
Admin
Quite frankly, if the code actually worked I'd continue with the interview.
Programmers shouldn't waste valuable time actually writing code if a simple google search will give them what they need.
Addendum (2013-05-10 10:45): Quite frankly, if the code actually worked I'd continue with the interview.
Programmers shouldn't waste valuable time actually writing code if a simple google search will give them what they need for a simple problem. The follow up question should have been "explain to me how this works".
+---+
Also, I've been in an interview where they asked me to do the FizzBuzz thing. So I put the answer on the whiteboard without pausing (common question, easy answer). I then proceeded to put up 2 alternate versions.
They said they were impressed.
So I asked them what they had hoped to gain from the 3 possible outcomes to their question anyway. The possible outcomes being that 1. I couldn't do it. 2. I could do it without errors. or 3. I could with minor errors.
They threw out a line about how it was to gauge whether or not I could solve a problem. I pointed out that if they really wanted to test someone they shouldn't use one of the most well known questions on the planet. A question whose answer is incredibly easy to recall without thinking; which is all I did.
So I asked if they had put any real thought into go / no go questions and what those might be. When they looked at me blankly, I explained that go / no go questions are those that if answered incorrectly mean you discard the applicant. They still looked at me blankly, so I let them know that this was a no go moment and left.
This is the problem with idiots who don't really consider how to conduct an actual interview. The interviewee is given a list of crap questions pulled from the internet which ultimately have absolutely nothing at all to do with the problem space their team is working in.
How about asking me to do a select statement with a complex join on a couple tables? Or asking me to handle unmanaged resources (.net). Or even, how a doctype impacts presentation of html pages within various browsers?
Those questions require actual experience to answer. Actually, I'd go further to say that if you can answer those three questions you would do well as a .net web programmer. If you can't you're either a junior level guy (regardless of time on job) or a complete pretender.
Admin
Personally I hate being in management, having to hire and fire people. I’m a problem solver who prefers to let those with managing skills play the role of manager/leader. That said I have done interviews and hired as well as fired and from my experience the best way to sort out the BS/Sales people who are able to talk their way into a job and those with actual skills applicable to the job they are applying for is by providing a series of problems to solve that go from easy to difficult and which are applicable to the skill required for the job the interviewee is applying for.
For example, if you are hiring a DBA or coder who will be focusing on interacting with a RDBMS like SQL Server/Oracle then I would provide the candidate with the DDL to build a new DB along with a set of tables and fill those tables with sample data. Next they would be asked to provide several queries with each being harder then the one before. I would work my way from a relatively easy query that anyone with a basic understanding of SQL would be able to do on up thru the really tough stuff, the kind of things that SQL Guru Joe Celko covers in any of a number of books he’s written. By starting of with easy and working my way up to really hard I can not only gauge if the candidate is a BS artist/Sales Person who just knows the jargon and or buzzwords but I can also determine to what level of knowledge with SQL they operate. If the candidate could not take the DDL code provided and create a new DB and tables with it then I know they have no clue about SQL or RDBMS. If however they ask no questions then I know they have at least a basic understanding of relation DB’s and from there it’s a matter of determining at what level they operate with the SQL language.
I would imagine this same technique would work for a web designer or traditional Object Oriented Programming job working in C++ or VB.Net or any of a number of similar languages. What’s most important is to not throw at the candidate the most difficult thing you can think of, at least not at the start as you could end up intimidating the candidate into performing poorly and possibly loose a potentially excellent employee who simply does not function well under a pressure interview. Interviewing is a skill all its own and far too often the person tasked with the interviewing has no business doing interviews as they themselves are poor at interviewing. The interviewer can be just as bad at the task as the interviewee. Far too often its assumed that the manager/team leader is the best person to interview the candidates.
Admin
The above is mine and I posted it before registering b/c I though the registration would happen at first post. Since There’s no way I can see to edit an anonymous post after the posting I'm replying to it and claim the post.
Admin
Sigh. My son just took his road test to get a driver's license. The test begins at the testing station, circles around town and the highway for ten or twenty miles, and then ends at the opposite end of the testing station.
So would it have been rational for my son to say, "Hey, if you're just going to end up at the other end of the parking lot, we can just walk there in thirty seconds. All this driving is a waste of time."
Lest you think this a serious question, the answer is, "No." That would be stupid. The point of the test is not that the examiner wants to get from one side of the parking lot to the other and foolishly takes this wildly inefficient route. The point of the test is to determine the competency of the student in driving over this route.
Likewise, when a company gives a fizz/buzz programming quiz, the point is not that they have a desperate business need for a working fizz/buzz program. It's that they want to see if the applicant is capable of writing such a program.
Admin
Sure, if I was going to give an applicant a programming quiz, I wouldn't use fizz/buzz because it is a common problem for beginning programmers and there's too much chance the applicant has already done it or seen solutions elsewhere. I'd prefer to make up an original problem of similar complexity.
Though as someone pointed out earlier in this thread, an interesting thing to do is to make some trivial change to the problem, like make the magic numbers 9 and 13 instead of 3 and 5, or make the magic words "foo" and "bar" instead of "fizz" and "buzz". The truly incompetent applicants who have just memorized a solution will be completely flustered. It would be interesting to observe the results.
Still, there'd be plenty of applicants who are mildly competent who would realize how to make the trivial change to a memorized solution. I'd prefer an original problem.
Admin
And in perl, too:
Only 50 bytes.
Admin
The real WTF, aside from your code not actually working, is the notion that you think you could be fired for using what might be the right tool for the job.
Admin
FizzBuzz is a baseline go/no go. If you know it, good. If you don't, and can't do it, it's an obvious no go, just like your personality.
Admin
Stackoverflow has ruined everyone and made all lazy.
Admin
You know someone actually implemented that, eh:
http://gkoberger.github.io/stacksort/
Admin
I'm actually kind of surprised that people actually give the "original" FizzBuzz as an interview question. I was under the impression that "a FizzBuzz" question should just be some relatively straight-forward question, but not necessarily the exact same one everyone uses.
Admin
Or if not hired yet, you can't be fired, but you can be blacklisted. A few years ago I read about a Linux guy applying for a contractor's position to work on Linux at a client's site. The client's registration system only worked with Internet Explorer, even for the Linux position. The Linux guy had the gall to use Linux on his home PC. He further had the gall to inform the client of how their registration site could be modified to work with Firefox. That was the final straw. The WTF reward: he was blacklisted.
Admin
Admin
All of the above.
Admin
No offense, but those two are only the best programmer/analyst YOU know. Also, it takes knowledge and skill in a field to recognize knowledge and skill in the same field (of course, you're convinced you have both 100%).
Admin
And, what is wrong with that sentence, pretty boy?
Admin
I'm claiming that post. I created it while I was logged in, and now I'm here as an anonymous user and I want everyone to know that this is still the same guy, that is, me.
Admin
Comma comma comma chameleon.
Admin
Quite possibly.
But, it doesn't matter what I answer to that first question, there is no right or wrong. It's the rest of the questions that matter. If the second question is:
23 ; x 62 ; y x () y
(a) x is 85 and y is 62 (b) x is 62 and y is 23 (c) x is 0 and y is pi-squared
then if I answered (a) then (b), or (b) then (a), or (c) in both cases, then I'm doing well; I've come up with a consistent model, and am applying the rules I've made (but answer (c) wouldn't be a good one, as it's not clear how 17 & 4 could be manipulated to give pi-squared).
The rules are not complex. Because we can't see the other questions in that quiz, maybe you think they're trying to be tricky, but I guess they have the same simplicity throughout. If someone thinks the 'a = b' swaps the numbers, then that's OK, as long as they are consistent. If someone thinks 'a = b' means 'a += b', then that's OK, as long as they are consistent.
Note that after doing the quiz, they are given instruction, and asked to do the quiz again - and the results are similar (but I expect more people would get the results 'correct' rather than just 'consistent'). This suggests that the ability to build and use a suitable mental model is not changed by the instruction, but the mental model used by those who could handle one would corrected.
Maybe the test should have been totally outside the programming realm, but from my experience I can agree that there is a (quite strong) correlation between being able to come up with a mental 'model' to match evidence and programming ability.
I'm not sure that this 'modelling' ability is strictly related to programming, but there are people who 'model' and people who don't. Good programmers will tend to model (but so will good soldiers, good pilots, good lawyers etc)
I'm not sure I agree with that - 'int a = 10' is different from 'a = b' (or even 'a = 10'). If you don't know anything about programming, then you won't have a clue what the 'int' at the front means. However, that doesn't matter for this test.
Admin
FizzBuzz (contractor's version):
Admin
In Commodore BASIC (and many other dialects) equate (assignment) and equal to (comparison) use exactly the same symbol relying on context to differentiate.
for example, What is the value of a after executing the following? b=2:c=3:a=b=c
In many languages the value of a (and also b) is 3 In Commodore BASIC a=0 (b not equal to c) The keyword LET was not used because it is a space wasting optional keyword in Commodore BASIC. Sinclair BASIC also uses = for both meanings, though the LET keyword is required in that dialect.
I often use == when I wish to make it clear I mean comparison, but in many languages it is a syntax error.
The study, as explained clearly for those who actually read it before commenting, says that the test is administered before the course starts and again after the course is completed. Completing the course rarely changed the result. Restated as students who passed on the first test also passed on the second, students who failed on the first test also failed on the second & students who gave up on the first test also gave up on the second test.
The test was not testing for knowledge of the programming syntax, it was testing for mindset which is why answering the questions using a consistent interpretation was "correct" regardless of what someone who had trained in that particular language would see.
Admin
Once the lazy incompetents are removed, you can move on to realistic tests.
Admin
So let me get this straight - knowing what FizzBuzz is constitutes a test of programming ability?
Why not just ask candidates to code a SmeckleTickle routine? Oh, nobody knows what SmeckleTickle is? Interview process complete in record time! Re-post the position. What's for lunch?
Admin
I stumbled on this email address robinsonbuckler few days ago, so i emailed him about my bad relationship condition, how my lover left me, how he was with another girl, so Mr Robinson told me it would take 3days to get my boyfriend back, i waited for 3 days, unbelievable my boyfriend came to my house asking me if we could try things out again. He broke up with the other girl and we rekindled and got back together, he now show me care and attention. Mr Robinson was my last hope, my last chance after all the spell casters I tried before, Mr Robinson kept his promise! he is the greatest spell caster on the internet, call Mr Robinson, he stays in UNITED STATE + [1 9 7 1 5 1 2 6 7 4 5] for help