Had an interview

The first hour and forty five minutes was a big personality test meant to test how well I would "fit" in their group. They even asked what kind of team sized I've worked in before (does it really matter?). 2 of the 3 interviewers seemed to have terrible personalities (one was rude and kept interrupting the team lead, the other was very quiet and just stared blankly at me with a bit of a rough look). These two also could not communicate at the grade 10 level (or maybe worse). What gives these people the right to test my personality? Can the best psychologist in the world test my personality properly in such a short time? I was extra kind, made sure I smiled lightly once in a while, and never interrupted any of them.

Near the end I was quickly given a small technical filter:

First, I was asked to swap two integer variables in C without defining a new variable.

Then, I was also asked to explain the 'static' keyword. I started off by using phrases like "linkage," "block scope," "storage duration changes from automatic to static," "defined externally," etc. but quickly rephrased because I realized they didn't get what I was saying (apparently "globally defined" and "defined inside a function" were things they were waiting for me to say).

I had a third question which was basically a very long C expression devoid of any brackets. This tested how well I memorized the C precedence and associativity for all the C operators (I have a feeling that I could fail all 3 of them if I was allowed to make a similar expression for them to do).

These types of interviews give too much power to the hiring manager. He/she is basically given the power to pick someone he/she wants to become friends with. What's with these personal interviews?

BTW, this was not the HR interview. I had that on the phone previous to this one. This was with the hiring manager and two technical team members. Only people who pass this personal interview move onto the

3rd interview, which will have more interviewers from the team.

To all you hiring managers out there, please stop taking people who can't communicate at the grade 10 to interviews that are meant to be conversational personality tests. That's not to say they shouldn't be hired, because a lot of these people are really good developers - just keep them out of the interview rooms.

Reply to
Kenneth Bull
Loading thread data ...

In message , Kenneth Bull writes

Yes.

You mean you could not communicate with them?

You want a job. They want to see if you fit their team.

BTW one outfit I know does the tests and then takes you to the pub. The "pub interview" over rides al the other tests and interviews.

Yes. Even a moderately good one could.

They have seen your Cv, seen your ability to fit in. If you did not have the qualifications and experience you would not have got to the interview

How "too much" It is his/her decision to hire.

Not quite but they will want a team that works well socially as it will be far more productive.

To see if you will fit in with the company and team ethos and way of working

It is just that you and they did not communicate with YOU. I would love to hear their side of the interview :-)

I bet you didn't get the job?

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris H

apart from:

a = fn (a, b, &b) ;

fn (a, b, *c) { *c = a; return b ; }

which is F-ing stupid, I can't do this.

However, what's the point? Even if I do create an extra variable for this, the compiler wont. It'll just stick the intermediate value in a register, just as you would do if you wrote the quickest ASM solution.

It always annoys me how managers show such little knowledge of how compilers work.

You obviously haven't been on enough interviews. IME this is always the required answer. There are an awful lot of wanabee engineers out there who simply do not know the answer to this question.

At most places this is the most important thing. Once at a certain level I can teach you to 'code my way'. I can't each you to "ft in".

tim

Reply to
tims next home

They were testing for trick-book knowledge, AKA experience. AFAIR:

// NEVER use this for I/O registers. // For general use, you might need a critical section here. // void swap_int(int &x, int &y) { x ^= y; y ^= x; x ^= y; }

The comment lines are there to start a deep and endless discussion on subjects you know all about, and getting you a job.

Regards, Arie de Muynck

Reply to
Arie

tims next home schrieb:

I think they wanted to see this one:

a = a ^ b; b = a ^ b; a = a ^ b;

It's one of the bit-hacks from the useless-category.

Nils

Reply to
Nils

int a, b;

a ^= b; b ^= a; a ^= b;

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

I hadn't seen that hack before, but I worked out this method,

a = a + b b = b + a a = b - a b = b - 2*a

Seems to work for a few sets of numbers i've tried including negative numbers.

--
DaveN
Reply to
DaveN

a ^= b; b ^= a; a ^= b;

Which "works" but violates the clarity clause: Thou shalt never write code so clever that it prompts a "WTF?" response. I believe there's also a corollary that forbids "This is F-ing stupid." ;-)

None, really. One has either seen this trick somewhere along the way or one does it using the typical (and clear) approach using a scratch variable (with which the compiler is free to have its way).

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

Probably, because they are idiots...

Personally I would want to hear that the candidate knows of the triple xor 'trick' but would never use such obscure code which prevents the compiler from recognising and producing optimum code for the desired end result.

Has anyone got a compiler (optimisation on) which generates better code for a triple xor rather than swapping through a local temporary?

Reply to
nospam

Try working with a uC that has a total of 64 bytes of RAM. Swapping two variables without using a third increases the available memory by 1.7%.

Still, it's not a great interview question. It would be better to show them a code snippet with a fencepost error and a syntax error and ask them if they see any problems with it.

--
Guy Macon
Reply to
Guy Macon

In message , Guy Macon writes

Actually it is irrelevant.. The compiler will probably look at those three lines and optimise them by using a register :-)

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris H

First: How can the hiring manager have too much power? It's his job to hire good people, he should have the final, if not all the say. A business is a place to make money, not a place to be jolly and carefree.

Unless the hiring manager is judging you by some criteria that's illegal in your country (in the US your gender, color, and willingness to have sex with the hiring manager would all be in that category) then he should be free to make whatever decisions he wants, subject to the above constraints and any laid on him by his boss.

Second: You've just been given a superlative view into the company that wants you to come work for them. The workers are surly, poor communicators with odd notions of competence, the managers engage in practices that you don't approve of. So this is your chance to balance the desirability of having this job with the alternatives. If it's as bad as you make out, have _they_ passed the interview?

So, what's the big deal?

--
Tim Wescott
Control systems and communications consulting
 Click to see the full signature
Reply to
Tim Wescott

What is the problem? This is you who begs them for a job. Employment is slavary. Contracting is whoring.

:-)

VLV

Kenneth Bull wrote:

Reply to
Vladimir Vassilevsky

Not in 25 years, no.

It seems that this makes me a crap engineer :-(

tim

Reply to
tims next home

So the word "job" is misplaced. They typically are after someone to "fill a position", and the work is meaningless anyway.

I have not written a CV in my life, whenever I have taken jobs (last time I was on someones payroll was 15+ years ago) I typically I have been chased, a contact has sufficed. If someone does need my services, he will locate me.

The "wanna be important boss" type drives me sick. What drives me even sicker is the aforementioned type who thinks what he does matters.

I could agree with that, I guess.

Well, let's say whoring is contracting :-).

Dimiter

------------------------------------------------------ Dimiter Popoff Transgalactic Instruments

formatting link

------------------------------------------------------

formatting link

Original message:

formatting link

Reply to
Didi

I don't think I'd blame that. It's a cute parlour trick but I'm not sure it amounts to more than that. Has anyone actually seen this in production code? If so was it actually justified?

Robert

** Posted from
formatting link
**
Reply to
Robert Adsett

Even in uCs with very few bytes of RAM, I have never seen it. The usual techique in such cases to keep the data where it is and have the code in ROM switch where it looks for the data.

--
Guy Macon
Reply to
Guy Macon

XOR!! XOR!

I once lost marks years ago...

MOV AX,0 took something like 2 ticks. XOR AX, AX took 1 tick.

Assembly language programmer here btw.. I'm at one with the machine.. Well, something like that. And my interpersonal skills are awful, I don't do chit chat, except when paraletic in the pub.

There comes an age where you can get hired WITHOUT a CV. Just from your reaction to things. HR, "We need a CV." Me, "Sorry I don't CVs." And they actually do think that I care about their piss pot company.

Reply to
Aly

ANY code which is difficult to interpret, or which when you come back to

6-months later, is useless.

The purpose of a high level language is to be understandable and obvious. Tricks and gimmicks are really a bad thing. When you need things like this, then you use assembly language.

It really is a man's world.. Worrying about gimmicks rather than just getting the job done. They need a woman!

Reply to
Aly

Yep.

Nope.

It was commented out and a more ordinary sequence replaced it. The original comment (with the XORs) at least said "Swap A and B" or something to that effect. The later code was also commented. Whoever made the change wrote something like "Swap A and B (understandable version)"

- Bill

Reply to
Bill Leary

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.