views:

493

answers:

10

Does anyone think it is silly for interviewers to expect potential Software Engineers specializing in application development or UI to know hexadecimal arithmetic?

+5  A: 

No, it's not silly at all.

Anyone with a genuine, broad interest in software development should be familiar with hex.

It might be true that you don't need to know hex in order to do purely UI development using modern development tools, but you'd need to have a very narrow view of the world, and very little interest in broadening your horizons. I wouldn't want to hire someone with such limited interests, even for a specific role.

RichieHindle
+2  A: 

No. If you don't know the internals, you're at a real disadvantage. Doesn't mean you'll ever need to use them.

Let me put it to you this way:

If you were a professional driver, I'd expect for you to know the ins and outs of your car. Why would programming be any different?

George Stocker
I think your analogy would be better if you said, "If you were a professional car mechanic..." There are drivers who do not know everything about their car. That's why they have teams of people to help them out with that.
JasCav
@Jason They have teams to perform maintenance, but they do know things like power distribution down to the physics of what they do. They have to.
George Stocker
+4  A: 

To be able to decode hexadecimal yes, should know it, to be able to perform arithmetic on it in your head, personally I wouldn't ask for it. There are 101+ more important things in most development.

Andrew
+10  A: 

In my teaching experience there is a correlation between difficulties in hexadecimal arithmetic and difficulties in understanding bit-level operations. In fact, most bit-level code that uses literals is written of base 16 so that is the code students would see.

Bit level operations are fairly common in programming, including for masking and flagging in the UI. Color wheels are often also specified in base 16.

I have also seen many bugs caused by programmers who misunderstood base-16 or base-2 arithmetic and data types, especially in languages like C. Understanding the notions of signed and unsigned numbers (in languages where it matters) is also related to this.

Of course, the required arithmetic skills are typically pretty limited (e.g., add or subtract one, multiply by 2, etc.). I would expect a developer to understand how to map this into base 2 and base 10. I wouldn't expect anyone to do crazy multiplications or divisions in base 16. There's a calculator for that.

Uri
A: 

No. It's part of how computers are manipulated.

Paul Nathan
+3  A: 

If by "hexadecimal arithmetic" you mean knowing how to convert hexadecimal numbers to decimal numbers and vice versa, then yes, that seems reasonable. I expect a developer working on a (G)UI to know how e.g. a hex color value should be interpreted.

Stephan202
+6  A: 

Hexadecimal is fundamental in understanding how computers work ... all programmers should at least be aware of it even if they don't use it directly on a daily basis.

jsr
Well yeah about the hexadecimal number system, but the question is about hexadecimal arithmetic.
Jorge Israel Peña
@Blaenk: hex arithmetic demonstrates understanding of modular arithmetic and positional numeral systems... I.e., you know how to write a routine to set the color of every nth row of a table :-) More generally, you know how to handle wraparound, and you're comfortable manipulating numbers. At the end of the day, we're all just flipping bits. Except EE's. They're bullying subatomic particles :-)
Tripp Lilley
+2  A: 

If you couldn't at least explain why it's useful and how it relates to binary arithmetic, I'd be hesitant to pass you. At a minimum, you should be able to work through an explanation of, say, why 80 is 1/2 of 100 in hex. Personally though, I think there's much, much better interview questions (e.g. algorithm efficiency). As an interviewer, your objective is to eliminate the poor candidates as quickly as possible, as early as possible, while hitting as few false negatives as you can (i.e., brilliant developers who just happened to not know the one thing you asked, but are otherwise competent).

Bob Aman
+1  A: 

I answered an almost identical question (it was binary instead of hex) here

Yes I ask these types of questions in an interview, and yes I believe they are important. Having been interviewing coders for a while, knowing these simple building blocks is definetly a sign of a better coder than someone who does not. Of course I ask these "simple building blocks" questions in conjuntion with deeper questions later on.

Edit: that being said, if someone DIDN'T know how to convert to/from binary/hex/decimal but still tested well on OOP.design skills, I would likely still hire them.

Neil N
I beg to differ on the questions being similar. If you develop software and do not know binary arithmetic, that means you will do a bad job on complex conditional-statements. People like that should leave development to others people. I now believe you must know hexadecimal arithmetic; still, hexadecimal is not a commonly used as binary arithmetic; so the questions differ.
Phil
@Phil, complex conditionals are more along the lines of boolean logic and not binary arithmetic. Two distinct concepts
Neil N
+1  A: 

I've seen recent hires try to do bit manipulation on doubles before. Since then, one of my interview questions I give is now:

Consider the following function definition in C# (or similar):

uInt32 ClearBit(uInt32 startingValue, Int32 bitIndex)

Implement this function such that you clear the bit in startingValue which is defined by bitIndex. You can assume bitIndex is always in the range 0-31.

JP772