- 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
I was at an interview for a C position. The interviewer asked how to declare and allocate a two dimentional array as an array of pointers. I got that one right, he seemed satisfied and asked how I would reference an element knowing the index values. My reply was that you reference it as nested pointers, but the easy way is to use subscripts like a normal array.
"No, that can't work. The memory layout is different from an array."
"True, but the compiler knows the difference and will generate the correct code."
He paused, and said "excuse me for a moment." He turned his chair around and typed in a program, compiled and ran it.
I got the job. We worked together for several years at a few different jobs. I still consider him a good friend.
Admin
Now try the same problem, but you only know one coin is different, but don't know whether it is heavier or lighter.
Anyway, to get back on-topic, I signed up for a bunch of interviews in school without paying close enough attention. When I got to IBM, the interviewer asked me how I would like Rochester. I told him I was born in upstate NY. Turns out the plant was in Rochester, Minn. Oh well.
Admin
Thank god, cos I was banging my head for a moment trying to find the problem in the first one...
Admin
If you want to be REALLY picky, then the answer could be 0. Assume that one of the coins is substantially heavier than the other ones (depleted uranium or something like that vs aluminium). You'd be able to pick it out by hand and would not need the scales at all ;-)
Admin
This is actually true in some cases! A very high-speed projectile can appear to go one mile in a shorter distance than one kilometer. This "Length Contraction" is a consequence of relativity.
Yes, I know, the projectile's length contracts, not the frame (mile) it runs on. But this is all about schooling people!
Admin
I walked out of one of the best job interviews I ever had feeling like it was a disaster. I was shocked when I got a call and an offer mere hours later. The reason was that I aced all the junior-level questions, did ok at the intermediate level quesations, but when the interviewer began asking high-level questions I spent what seemed like an eternity repeating things like, "I don't know. I'm not familiar. I haven't had experience with that."
I ended up being hired solely on my ability to competently explain concepts that I knew and honestly admit when I did not know something instead of trying to bluff through it.
Important life lesson that I will never forget.
Admin
Of course, both of these are easily resolved. ("Using the balance scale, and no other methods of measuring the coins, what is the minimum number of weighings required to be certain of identifying the heavy coin?")
Admin
Even if they weren't developers, that company had to have developers somewhere. I recommend not complaining about holders of $JOB_TITLE in general, but rather complaining about holders of $JOB_TITLE that you've encountered in the past and how you'd appreciate working with some that were better than that.
Learning your interviewers' job titles is still useful, as it lets you make an initial educated guess at their mindset.
Admin
But then you couldn't give an answer of -8 by weighing the coins in your hands before they are even put on the scale.
Admin
I had a professor do that to me in a lab one time, he loved to tell people they were wrong and see if they would back down, when pushed enough in everyone would.... until he met me. I forget the original subject, but all I remember is the class sitting in stunned silence when I called him a stubborn a**hole. Well no one had ever utterly refused to back down from him before so he broke out in laughter, we went out for drinks and latter when he was promoted to Dean and transferred to another campus he offered me a teaching position.
Admin
I recall my first interview (phone-based) being one that I got flummoxed half-way through and started to BS my way around. The interviewer, a blunt-speaking fellow, called me on it and 'declined' my services (with about 5 words - rather polite, looking back).
Next interview I had, I simply said that I had no idea but was interested in learning. I got that job.
As for logic problems, does anyone have the pattern for the weighing, assuming the weight is known to be either heavier or lighter?
With some quick inspection, I've got the following:
Between 1 to 3 coins: 1 weighing. Between 4 to 9 coins: 2 weighings. Between 10 to ??? coins: 3 weighings.
(..and since I didn't see it mentioned earlier, in the case where you aren't told if the odd coin is heavier or lighter, I believe you add one weighing to the total; aka: find the odd coin, then weigh it against any other coin)
Admin
Admin
("assuming you know whether the weight is heavier or lighter")
A with ceiling(X/3) coins B with another ceiling(X/3) coins C with the rest of the coins
and weigh A against B. This tells you which set contains the bad coin, and each set contains at most 3^(N-1) coins.
It does work (weigh A against B, then A against C, and continue as above) but it's not optimal. With optimal strategy, up to (3^N-3)/2 coins can be done in N weighings. Google "12 coins" for more info.
Admin
What part of "going from memory" did you not understand? Cripes, I put it right there in the post and there still has to be the jerk telling me I'm wrong.
I got the question right that's the point of the story. Whether or not I remember the trivial details years later when posting on a message board doesn't really matter, does it?
Sorry, I guess I'm thin-skinned today.
As to why Google is asking trivia questions like that... I don't know. I never got far enough in the interview process to ask, although I was curious.
Admin
Admin
"km" = 2 letters, significantly shorter than "mile" (four letters)...
Admin
Maybe not the experience, but that doesn't mean he didn't have the skills to learn quickly. I taught myself Cobol while on a job, and later SAS querying to a DB2 RDMS with no prior experience - if you are a quick learner and know the basic concepts they'll take you further than previous experience.
Admin
Why would you smile and nod? Go find proof in the library, and show it to the teacher and principal. If they won't back down, get your parents to stand up for you.
In 7th grade a teach insisted that 12am was noon, and 12pm was midnight. When I disagreed, his response was "you're a 12 year old kid and I'm an adult - who do you think is correct?" It wasn't until I showed him the dictionary entry that he apologized to me and the class.
Admin
I went for an interview fresh-out of undergrad up at APC (yes, the UPS marker) in Rhode Island to do software work. The whole morning was spent on boring generic forms and bullshit sessions.
Come afternoon, they finally started with the technical interview. I sit down with this guy, and he starts quizzing me on bug troubleshooting:
"A user types data into a form and presses the OK button <form closes>. When the form is brought up again, the data is back to the original values. Solve the problem."
My first question was: how many buttons are on the form? I figured this might be a simple "ok, cancel" button-swap problem. He said there was just one: the OK button. I thought that was weird, but I didn't persure the matter.
So, here I was asking questions about the underlying software framework: what happens to the data once the OK button is pressed, how the form is populated via that data the next time it appears, and whether it was properly tested, setting up test cases, etc, when he gets this smug look, interrupts me, and says: "You missed the scope of the problem completely. It was a swapped button error."
I told him HIS error explaining the scope of the form, and that I thought it was a swaped-button problem from the beginning (that's why I asked the button question), and he didn't believe me - we were at an impasse. Didn't hurt me at all, I got to see the backwoods of Rhode Island for free, and I'm not so sure I wanted to live there.
I guess the moral of the story is: DO NOT hesitate to question what the interviewer declares to be true, just avoid being an ass about it. Explain your thoughts, and see what the interviewer thinks.
Admin
In the 6th grade, I was literally screamed at for about 10 minutes for correcting my teacher. He basically went on a tirade about how he was tired I was always correcting him and showing he was wrong. Previously, the teacher constantly spouted BS he knew nothing about and I was the only one who had the guts and knowledge to show him he was wrong, using the set of encyclopedia britanica we had as my source. I don't really remember any of the BS anymore except that it varied from the extraordinarily obvious to some more subtle trivia (the issue in particular that caused the outburst was him telling us that a Robinson projection map was a Mercator projection map).
Of course, that little episode sent my reputation soaring among my peers. I never corrected him ever again, but his reputation was so shot that by then, I didn't need to. Everything he said afterwards was pretty much regarded as non-information, and I think that was a far more important lesson than anything 6th graders get taught--that even figures of perceived authority can be wrong.
Eventually, our parents heard about his incompetence and went to our PTA, the principal, and even the union with it. And even though he was tenured, he ended up with the worst teaching position in the school the following year and retired soon after that.
My friends and I still get a good laugh at it every now and again.
Admin
Unlike today, where the kids' parents will sue at the drop of a hat, because little Johnny didn't get an A when he didn't do any homework and failed all the tests. You know, he might not qualify for that free college tuition and they would have to pay (GASP!) for it. OTOH, kids get expelled for having the wrong kind of keychain these days, so it's just all fucked up.
Admin
Please tell me your parents knew better. And what happen when they corrected the teacher?
Admin
Ahh, the bullshit question. Love 'em. I had a nice variant of that pattern on an interview: "What is the current version of Norton Utilities (Mac version)". I'm a DiskWarrior/TechTool guy so my initial response while trying to remember was "ummmm". Turns out I was right, they're a DW shop too.
I also blew an interview once on the basic principle of never badmouth your current^G previous employer. I had just finally realized "Hey, why are DNS, DHCP and NDS all hosted on the wrong side of a saturated WAN link ?". I've actually seen that network diagram on a certification exam (with a WINS server) and got it right when asked what was wrong with it. Then I made the joke about a networking environment that looks like an example from a certification exam. I shoulda just apologized for wasting the interviewer's time and slunk away in shame.
No, I'm not still bitter about that. At least I don't have to support an environment with all services (except for a file server) on the wrong end of a slow WAN link anymore.
Admin
If the interviewer was truly that irrational, well... It's a big world out there and it works both ways. As for wasting the interviewer's time, what are you, accounting? You were hopefully hand-picked to come in, the time was allotted, the interviewer wanted to speak with YOU. Hardly wasted time.
Admin
I remember when interviewing for a position over ten years ago. I had cut my teeth on Linux, and moved on to BSD, and Solaris. Hell, even IRIX didn't cause too much pain.
I made the mistake of telling this to a possible employer, to show that I had (similar, for various views of POSIX and layout) abilities, where they only used Linux. He went into at least a fifteen minute tirade on how FreeBSD was the devil (but had never heard of BSD/OS, which, honestly, was DAMN fast and pretty good, as long as you could code around it), yadda yadda yadda.
I was a bit surprised I didn't get walked out of the interview room in shackles.
I still have a BSD/OS 4.0.1 CD and license in storage, somewhere.
Oh, yeah... and I usually get paid to fix up Debian's shortcomings and f-ups of people who are touching things they shouldn't.
Admin
Actually the question you propose is still correctly answerable with "1". If you weigh any two coins and one happens to be heavier than the other, you can then be absolutely certain that that one is the heavy one.
The correct form of the question would be "Using the balance scale and no other methods of measuring the coins, what would be the minimum number of weighings that you would need to plan in advance to be certain of identifying the heavy coin before actually doing it?"
Admin
I and a friend of mine are probably responsible for making our 5th grade teacher retire. We knew more about the science she was teaching than she did, and we corrected her when she was wrong (for example, she believed that mass and weight are the same thing). She refused to listen to us and then showed concern about whether we were ready to move on to the next grade. That was the year I stopped trusting my teachers.