Re: Reverse words in a string (Another Interview question)



Scott Moore wrote:
> Jaspreet wrote On 09/29/05 09:36,:
....
> Two classic interview stories of mine:
>
> One was a company that gave me a simple C problem about what result would
> be returned from a function. I replied that the program was not valid C.
> It wasn't, the guy was relying in an uninitialized local variable, which
> is a no-no in standard C. He was relying on his on particular implementation
> of C. The interview went rapidly south as you might imagine. I won't lie
> to get a job.

Of course, you had more than two choices. If you had pointed out the
semantic mistake, then immediately proceeded to say, "But on compilers
that initialize such variables to zero, the result would be this...",
you might have gotten the job.

>
> Second was an assembly language job where the guy asked me to describe
> accessing a table in a small microprocessor's assembly language. I
> wrote a solution on the board, and he smiled at me much as you would to
> a small child, then proceed to tell me how with "advanced thinking" you
> could locate the table on a page boundary so that the lower bits were
> zero, and simplify the code by relying on the lower address bits being
> zero. It's a common assembly language technique.
>
> I told him that I knew that quite well, but I don't program using such
> dependent tricks. They usually aren't worth the headache of having to
> always keep that table specially aligned, in trade for an instruction or
> so saved.

Pretty much all assembly is CPU and O/S specific. I don't think using a
"trick" is an unreasonable thing to do, especially unless the boss
indicated that code portability was important. And since a trick shows
your familiarity with the subtleties of the ISA, it's probably to your
advantage to be as clever as possible up front, and THEN say, "But if
you wanted portability, I wouldn't do this, and here's why..."

It's the same phenomenon that make buzzwords a handy thing to put on
your resume, (especially now that most resumes are digital and
searchable for buzzwords).

>
> By the time I left there, he was visibly angry. I didn't mind. I don't
> want a boss like that in any case.

If this is a representative sample, I suspect you've had a lot of
unpleasant interviews. :-/

Most bosses were once technical, but have since chosen to do more
managing and less programming. As such, it's hardly a surprise that
your technical skills are more up-to-date, and probably more in depth.
If you want a manager to hire you, you need to respond to their needs:
in the interview, and later in the job. If you refuse to "play the
game" in the interview, when everyone is on their best behavior, that's
a really good sign that you'll turn out not to be a prima donna after
you're hired, and not a team player, which is what all bosses want.

IMHO, you need to keep your attitude to yourself during the interview
(since you might be working with someone else in the company whom you
like a lot more than this interviewer). Later, you can choose not to
take their job offer. But if you give them attitude up front, the
decision not to hire you has been made before you're even out the door.

Randy
.



Relevant Pages

  • Re: Reverse words in a string (Another Interview question)
    ... >>Two classic interview stories of mine: ... The interview went rapidly south as you might imagine. ... >>accessing a table in a small microprocessor's assembly language. ... It's a common assembly language technique. ...
    (comp.programming)
  • Re: Reverse words in a string (Another Interview question)
    ... > linked list and then try to reverse the linked list. ... When I do interview questions, I let them solve it any way they can. ... He was relying on his on particular implementation ... Second was an assembly language job where the guy asked me to describe ...
    (comp.programming)
  • Re: OT: Thoughts on the Debate Coverage
    ... In Obama's case "underdog" meant that the questions in the debate were ... answer the questions was effective should definitely use her technique ... These debates are something of a job interview. ...
    (rec.arts.marching.drumcorps)
  • Re: Dumbledore
    ... She could say which Dumbledore she's talking about, ... There has been zero mention of a second DD death. ... notice, there is zero point to having an interview, and JK Rowling is ...
    (alt.fan.harry-potter)
  • Re: MK Ghost Rider Book Computer Generated Art?
    ... I was wondering about the technique used in the new MK Ghost Rider book? ... The artist details his approach in this interview: ...
    (rec.arts.comics.marvel.universe)