Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I take interview for my company. During interview I've faced many candidates having 1 to 3 years of experience in their field. Typically, they had experience in C#, Java, J2ME, iOS and similar platform. Few had working experience in C and/or C++. I'm a C++ programmer but typically I don't ask very C/C++ specific questions during interview. I test their ability to write and understand programs.

I did observe that many candidates have basic knowledge about programming. They understand and can write easy programs in their chosen language. They can solve most of the problems I ask. To my surprise, most candidates fail in specific type of question: bitwise thinking. They fail to write a code that swaps MSB with LSB of a 16 bit integer (like, given 0xABCD, make it 0xCDAB). They fail to write code that toggles a bit in an integer. Etc. If I show them the code involving bitwise operation and ask them to write what the code does, they fail to answer, given that I tell them to ask me if they've any question about syntax.

I found that they fail to understand that inside computer memory every number can be thought as decimal, hexadecimal, binary, or in any other base. Some of them got scared if I show an example in binary.

There is no doubt that when we'll hire these candidates, they won't be working with bits - at least directly. They don't need to solve any bitwise problems while working in our company. And their performance is promising at what they do. But I can't think about a programmer who can't think bitwise.

Should I discard these candidates? Or give them a chance?

share|improve this question

marked as duplicate by gnat, MichaelT, Bart van Ingen Schenau, GlenH7, World Engineer Apr 8 at 0:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

14  
So you want us to tell you whether or not to reject people based on your personal biases? You already sound like you have it out for them. Does your company write anything that really cares about bit-level operations? You know that writing software is a lot more than just that sort of low-level thinking? –  birryree Feb 23 '12 at 4:16
8  
They don't think it, because it's generally not relevant. Why don't you think at the atomic level? Sounds absurd doesn't it? –  Aaron McIver Feb 23 '12 at 4:23
3  
I developed line-of-business applications for years without the need to perform a single bitwise operation (other than flag masking, which doesn't really count when you can copy-paste code). I do use them a lot at my current job, but not all jobs need this. –  Robert Harvey Feb 23 '12 at 6:08
2  
Given one +ve vote, as I don't agree that this should be -ve voted. –  Manoj R Feb 23 '12 at 6:09
3  
@Monoj - likewise. Just because the answer is "no - don't discard these candidates and don't ask them irrelevant questions" doesn't mean this question is a bad one. The downvote button is not an "I answer no" button. It's also not an "I disapprove of your actions" button. –  Steve314 Feb 23 '12 at 7:12

8 Answers 8

up vote 25 down vote accepted

You've mentioned that solving bitwise operations is not a skill that people at your company will need to do their jobs. You should therefore not even be asking about it.

share|improve this answer
2  
So, programmers don't need to understand binary/bitwise operations to be a programmer. 100 years from now, programmers will write programs, but won't understand how their programs get compiled, how they're run by OS, how OS works, how computer works... Am i overthinking? –  Donotalo Feb 23 '12 at 5:25
3  
@Donotalo. You may be thinking too narrowly. OS developers obviously need to know how an OS works. Database front end folks, maybe not so much. The field is fractionating, and none of us can know everything. How much of the software stack that you use everyday do you understand at a professional level? –  Charles E. Grant Feb 23 '12 at 6:40
2  
@Donotalo. You seem to think that low-level operations are some sort of measure of intellect. This is wrong. The concepts are not particularly difficult to grasp. It may be the case that many programmers do not know them, but this is usually because it is not relevant to their work, not because they are incapable of learning. If, in the future, programmers can bring value to their business without knowing how operating systems or compilers work, then why would it matter if they know these things or not? –  MatthewKing Feb 23 '12 at 6:43
1  
@Donotalo, 100 years from now? Heck, today most programmers dont know a lot about whats going on down below at the compiler and bit/byte level. That doesnt mean they arent programmers, it just means they specialize in other programming topics. –  GrandmasterB Feb 23 '12 at 6:46
3  
I thought understanding binary is very basic and all programmers should know that. I need to change my mind. Thank you. –  Donotalo Feb 23 '12 at 6:52

I don't think you should discard applicants just because they are not well versed in bitwise operations, but you might want to pay more attention to why they aren't well versed in particular skills you may take for granted. A fifteen minute talk with them about their programming experiences and training (possibly including college courses, but only if relevant) may explain more about why they know what they know, which in turn could lead you to better understand exactly what they know and whether they could be relevant to your project than asking arbitrary questions that you would expect "a typical programmer" to know.

It is not surprising if a person has been an industrial Java and .NET programmer all their life (possibly a music major in college, missing out on system architecture, and OS theory), and didn't know how to swap variables in place using bitwise operations. It could be OK, and possibly even better, depending on your needs.

share|improve this answer
1  
Oh, now I see why everybody seems to be angry at me. I never asked anyone to 'swap variables using bitwise operators'. I don't look for that sort of skill. I don't like them to memorize every tricks. What I ask is fairly simple, you can re-read my post. Yet, people at programmers are thinking that's exactly what I asked! –  Donotalo Feb 23 '12 at 5:55

The candidate who can answer this could be given extra edge, but the candidate who can not answer that should not be neglected altogether.

If there is a candidate who do not know bitwise operator but knows the time complexity of heap and hash, i will consider the candidate. This is what he/she will be doing on daily basis, and I expect him/her to be proficient in that. I may ask bitwise operator questions just to see the thinking pattern. But will give less weight to it.

It may be useful if you have two very similar candidates, and have to choose only one. Both answered all the questions properly. In this case may be this can be helpful.

share|improve this answer

Software development is a huge and diverse field now. For some jobs, not knowing bitwise operations would be completely disqualifying. For others it is close to irrelevant. My personal mantra is that you must understand at least one level of abstraction beneath the level you usually work at. I write bioinformatics code in C and C++, so you can bet that I know about bit level operations. However, if your line of work is writing web front ends for databases, then the bits and bytes may be less relevant, but you'd better understand HTTP and the relational db model. This is particularly true for folks who have only been working for a few years.

One of the best programmers I ever worked with was a SQL guy who'd gone to a trade school. Once day in conversation, I was stunned to learn that he had no idea how floating point numbers were represented on computers. You probably don't want him writing your financial modeling software, but then you probably don't want me designing your databases.

When you are hiring junior people (and 1-3 years is still pretty junior in my book), don't just try to clone yourself. Try to come to an honest appraisal of whether they can do the job or not.

share|improve this answer
1  
For someone not to know about mantissas and exponents etc because he knows better than to use floats for financial calculations and so has no interest in the representation makes a lot of sense to me. Someone who knows in detail how floats work, yet works entirely on financial code - I'd suspect they're using floats where they really shouldn't be. Why would you still know a lot about something you never use? There are no doubt financial calculations that need floats, but most of the time you should count in integer pennies/cents/whatever rather than pounds/dollars/whatever. –  Steve314 Feb 23 '12 at 6:59
1  
@Steve314 that's why I referred to financial modeling rather than financial record keeping. I was thinking of stuff like Black-Scholes and Martingales. Believe me all that stuff is done in floating point. –  Charles E. Grant Feb 23 '12 at 7:23
2  
Using a 64 bit int to represnt cents still leaves in the order of 100000 trillion dollars of representation. - it will be a few years before anyone needs mrore than that, and by then well be uing 128 bit systems –  mattnz Feb 23 '12 at 7:25
    
@mattnz, maybe it would have been clearer if I'd written financial engineering rather than financial modeling. The sort of software I was trying to allude to has nothing to do with tracking pennies, but rather expected earnings on a bond given some sophisticated statistical model of fluctuations in the bond market. Stuff wall street hired physicists to do, rather than accountants. –  Charles E. Grant Feb 23 '12 at 7:44

For me, it's like someone applying to be a baker who can only make cake from a mix. Maybe that's all you need for the job, and maybe you're very good at it, but you've intentionally neglected some foundational aspects of your profession, which says something about your devotion and aptitude.

I also presume you ask your developers to occasionally learn something completely new related to their job. Learning from your colleagues is a critical part of our job description. Therefore, even if they have not used bitwise operators before, I would expect someone to be able to learn them in an intelligent manner with some coaching. Our software doesn't use exceptions at the moment, but that doesn't mean we will never use exceptions in the future, and I'd expect an applicant to be able to muddle through in an interview with some coaching. If you don't have a rudimentary understanding of a concept, how will you know to brush up on it if it ever turns out to be the best tool for a task?

I'm not just one of those people being harsh who has never been in a position like this. I interviewed for a C++ job once with very rusty knowledge of the syntax for specifying classes and their relationships. I was asked some very tough questions along those lines, which I didn't know the answers to, but I got the job because I demonstrated I could figure it out with some coaching. It's not too much to ask.

share|improve this answer

Understanding a high-level framework has many useful applications, and if your employees are doing development knowledge of various frameworks is an asset.

I would say it depends on the job. If you need cutting-edge people on a blazing hot start-up then you want people who understand the theory behind all that sugary syntax. Bits are important whether you like it or not, and I'd sooner hire a programmer who is fluent in character sets and memory allocation than one who is not.

Look at it this way: you want somebody to be on your team for years to come, and you want somebody who can adapt. If someone understands the complexities behind other people's frameworks they are more likely to be able to develop their own frameworks in an elegant and concise manner.

In such a fast-paced volatile field, you need people who are on top of their game and not just riding the latest language bandwagon so to speak. Certain individuals have a great deal of comprehensive, in-depth, understanding that supersedes the trivial. These individuals get snatched up by Microsoft and Google unfortunately, and you will most likely hire an object-nut, or architecture astronaut who can develop excellent solutions for a company your size.

share|improve this answer
    
TLDR; programmer =/= JAPH But I anyone who claims to be the latter will know what a bit is, and how to manipulate them. Therein lies the issue with asking such a question in an interview, since most higher-level conceptual stuff is considered because it interests us (money isn't a factor in advancing a scientific community) –  Eric May 31 '13 at 18:45

Solve the following systems of equations for X, Y, and Z. No googling.

2x+2y+4z=48

2x+9y+7z=105

x+4y+z=37

Not something that comes to mind right away? But this IS something you've done before, right? Way back in an old math class? Even if so, given the problem's complexity, and the fact that you hardly ever need to do things like this each day (except in a some ranges of professions) you'll tend to forget those things over time. A logger gets very good at chopping down trees, but if he spends 5 years fixing pipes, then he won't be much of a logger when you ask him to.

share|improve this answer
1  
Not relevant to the question, which specifically states: "They don't need to solve any bitwise problems while working in our company." –  user16764 May 31 '13 at 19:26
    
Similarly, hardly any professionals are solving systems of equations often. Even if they understood the practice back when they learned it in a programming class, as long as it hasn't had actual utility in their day-to-day work, they'll probably forget the relevance. Even though I've made DirectX10 games, by now I've forgotten many common C++ pointer operations, since my work has taken me far from C++. But yes, I do tend to get a bit metaphorical. –  Katana314 May 31 '13 at 19:57
    
Could you please rewrite your answer so that it's a more direct answer to the question? –  user16764 May 31 '13 at 22:04

Should I discard these candidates? Or give them a chance?

You hit upon what might be the hardest thing in interviewing programmers -- finding a way to demonstrate how they react to an unknown. You should write down this question as standard interview practice, and come up with an alternate for how you can test the minority that are familiar with bit fiddling.

For the batch you've interviewed, though, you should just measure them based on how they reacted to a topic they didn't know about. Did they admit their ignorance and ask for help? Did they try and bluff their way through? Did you offer help to those that asked, and were they then able to perform as expected?

Knowing the limits of one's own knowledge and how to seek out and accept assistance when said limits are reached is far, FAR more important than knowing any particular programming idiom.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.