DEV Community

Discussion on: You're not worth hiring unless...

Collapse
 
walkhard13 profile image
Phillip Smith

I was asked to convert from decimal to binary on a whiteboard. It's not a difficult algorithm, but it makes no sense to expect someone to have that algorithm memorized. What possible use would I or anyone else have for being able to regurgitate that during a real project?

Collapse
 
segflow profile image
Assel Meher • Edited

I would not hire someone for a developer/engineer position if they cannot do this.

This is not supposed to be an algorithm you memorize. It's just very basic math, not even computer science. To understand how binary numbers are represented is a MUST.

People tend to see being asked to work on similar problems, or being asked how a sort algorithm works, is ILLOGICAL and BAD, while knowledge in such fundamental concepts is what differs a candidate A from B.

Anyone can learn how to USE technology X or Y, and by the time they will be experts in that specific technology, but strong fundamental knowledge goes ways beyond that. Being able to solve a problem in a technology-agnostic way is what truly matters.

Collapse
 
ogamita profile image
Pascal Bourguignon

Ten times programmers can do that, and even with much more complex algorithms! :-)

Collapse
 
walkhard13 profile image
Phillip Smith

πŸ˜‚πŸ˜‚πŸ˜‚

Thread Thread
 
jacobmgevans profile image
Jacob Evans

I am only 9x .... :(

Collapse
 
witalyiwanow profile image
witaly-iwanow

There’s nothing to memorize, it’s very basic math. Though I can imagine self-taught web/UI developers having no idea about math and doing there job just fine. So in my opinion it would be a very good thing to ask from someone applying for C/C++ job involving writing fast and efficient code, but if it’s like integrating 20 year old 5M line PHP monstrosity with Cassandra, then it’s useless indeed

Collapse
 
avalander profile image
Avalander

On the other hand, most C/C++ developers don't spend a big part of their day writing algorithms to convert from decimal to binary and anybody can easily find the algorithm online, so I wouldn't expect even someone who's been working with embedded software in C for the past twenty years to necessarily have the algorithm memorized. I still think it's a worthless interview question.

Thread Thread
 
witalyiwanow profile image
witaly-iwanow

it's not about that particular algorithm, it's about weeding out devs who cannot come up with something as basic as decimal-to-binary conversion. A former boss of mine used questions like "What year did the First World War start?" to cut, well, not enough intelligent people off - worked pretty well actually

Thread Thread
 
walkhard13 profile image
Phillip Smith

I disagree with either of these types of questions being used to measure a person's intelligence. Lack of knowledge is not the same thing as lack of intelligence. As a thought experiment: What if Leonardo DaVinci were asked to answer either of those questions? He would not have access to our knowledge of history and most likely not the mathematical experience converting numbers to different base systems. I don't think most people would consider his contributions any less significant or that he was less intelligent because he didn't know some random tidbit of knowledge.

Thread Thread
 
skhmt profile image
Mike • Edited

A former boss of mine used questions like "What year did the First World War start?" to cut, well, not enough intelligent people off - worked pretty well actually

Why would a history quiz be on a programming job interview and be used to judge intelligence? I consider myself pretty well versed on history and I don't even know the answer to that. Why would the year Franz Ferdinand was shot be relevant at all to the job?

Thread Thread
 
witalyiwanow profile image
witaly-iwanow • Edited

@phillip What makes you think Leonardo would be a good software developer? :)
@mike It was just a quick test if the person was actually learning something during his high school years. Also it was in Russia, for the US you might want to replace it with something more culturally relevant as people born/raised outside Europe are usually pretty hopeless at European history (unless there was a movie or music band)

Thread Thread
 
rachelsoderberg profile image
Rachel Soderberg

Oof, history was never a good topic for me. That's why I got into tech and not studying history. That'd be a great way to weed me out of wanting to work for a place, asking me history questions during a technical interview. lol

Collapse
 
chadladensack profile image
Chad Ladensack

I bet you're fun at parties.

Collapse
 
derickhess profile image
Derick Hess

Sure it's basic, but if you don't do it all the time or had to do it all the time it might not be obvious to you. I saw this a lot in college. I double majored in EE and CS so I got to see the CS stduents struggle with very basic EE stuff in some classes and EE students struggle with basic C coding as well.

As an EE major converting between binary, hex, and decimal as well as understanding things like registers, low level memory management etc was easy for me when it came up in CS classes, but it was all new or not so easy for the CS majors since it isnt something they had to deal with all the time.

Collapse
 
k2t0f12d profile image
Bryan Baldwin

Good job Phillip. Now erase the board and do it again in Cobol.

Collapse
 
cullophid profile image
Andreas MΓΈller

I have failed this very same assignment

Collapse
 
aarmn profile image
Aryan The Limitless

I wrote a code for all base to all bases converting but negetive bases with fractions and i know Bubble sort, so Im worsy?

Collapse
 
e4emre profile image
Emre

That's just half a dozen lines of code at most. I never wrote decimal to binary converting algorithm before but I can fart one up in a few seconds, it's something like:

digitstring append character (number mod 2)
number = number divide by 2
if number >= 2 repeat else return digitstring

and the 2 can be replaced with any integer value to give the base-n expansion for any number for any base. If you have trouble figuring out how to generate the binary expansion of a number then don't worry, you're not alone: you're like 90% of coders and most hiring managers don't know the difference. Just memorize a bunch of random algorithms and hope that one of them turns out to be the one the interviewer asks you to regurgitate.

Collapse
 
rossdrew profile image
Ross • Edited

You're not supposed to memorise that "algorithm", you're supposed to be able to solve a problem in a very familiar domain.

All that is needed to solve this problem is to know binary is base 2 and decimal is base 10

Collapse
 
rossdrew profile image
Ross • Edited

It's nice that Jose Vargas has also continued to respond called me "condescending and facetious"...

You can't however, understand what a developer job actually entails.

Says a contract react developer with all of 5 years in the industry to a full-stack developer of 20 years, most of which hiring successful developers.

You either have a superiority complex or a daft mind

Interesting claims from someone making ad hominem attacks in the same sentence.

if you were asked to whiteboard an algorithm to balance a matrix you wouldn't be able to, stop kidding yourself

...argument inflation and conjecture to win a nonsense straw man you have created...

I bet you would fail a decimal to binary conversion in a whiteboard interview

...more ad hominem attacks...

literally everyone can figure it out with google in a few seconds

Once again completely missed the point of the entire thing. I'll repeat it for you in the most condescending way possible; It's not about remembering an algorithm. At the interview you can ask what it is, or even Google it the task is to code it. That fact that you cannot listen and understand very simple statements is showing me why you are so against performing very simple tasks.

This pettyness needs to stop. If you are not interested in my views or my responses, stop responding to me.

Thread Thread
 
seveneye profile image
seveneye

Maybe because you also cant understand our argument.

It is about remembering the algorithm! Unless you would lecture your interviewee about binary numbers then let him formulate the formula from there. But you wouldnt do that in an interview. You just tell him convert binary to decimal and he should be able to KNOW it. How can you convert that if you dont event know how the base system works. Sigh

Again what does this prove? If you dont have prior knowledge you cant come up with the conversion

Thread Thread
 
rossdrew profile image
Ross

Read the thread before you respond please.

Collapse
 
sleepful profile image
Jose Vargas • Edited

Yeah I'm supposed to be able to solve it...with the internet or at the very least a manual or a book. I haven't had to worry about D to B conversion in years, you want me to think about it on the spot? You are out of touch with reality. Why on Earth would I want to worry about that when I could just lookup the formula online? I would have to come up with the algorithm on the spot, which is incredibly difficult to come up with, but extremely easy to just use if you know it. Like...come on, I understand the concepts, coding math algorithms has nothing to do with understanding the concepts.

Thread Thread
 
rossdrew profile image
Ross

I haven't had to worry about D to B conversion in years

Neither have I but it's such a trivial problem it's crazy that people are so against it. This would take about 30 seconds of my interview time and show me that the candidate has basic coding skills, what their foundation in CS is, how well they ask questions, if they can admit they don't know something, and most of all if they are willing to get something done in 30 seconds rather than spending 5 minutes discussing why it's not relevant.

would have to come up with the algorithm on the spot, which is incredibly difficult to come up with

Incredibly difficult? High schoolers could likely do this without much mental effort.

I understand the concepts, coding math algorithms has nothing to do with understanding the concepts.

No? So if I asked you do do a temperature conversion program or a program to add 10 numbers it's not relevant? Math has nothing to do with programming...mental. If you can go two weeks in any coding job without using any math I would be dumbstruck.

Thread Thread
 
seveneye profile image
seveneye

You think because its easy for you then its should be easy for others. Oh my I would not like you to be my senior or my manager. ahaha

Thread Thread
 
rossdrew profile image
Ross • Edited

No, I think if you are applying for a software development position that you should be able to perform very basic software development tasks.

You wouldn't like me to be your senior manager because I would expect you to be able to understand a one line problem statement and creates 10 lines of code? Having been asked such a simple task and responding with personal attacks and calling things "stupid" doesn't make you seem like an ideal employee either I'm afriad.

Thread Thread
 
sleepful profile image
Jose Vargas • Edited

temperature conversion? I look up the formula. Add numbers? It sounds like the only things that you are good at are being condescending and facetious. You can't however, understand what a developer job actually entails. You either have a superiority complex or a daft mind, if you were asked to whiteboard an algorithm to balance a matrix you wouldn't be able to, stop kidding yourself. Actually, I bet you would fail a decimal to binary conversion in a whiteboard interview. But you know what? We'll never know, because you, me, and literally everyone can figure it out with google in a few seconds, so why does it matter? Oh yeah, to you it matters because it's one of the few ways you can stroke up your own very large ego.

Thread Thread
 
seveneye profile image
seveneye

Since when did converting binary happens in software development tasks?

Maybe we dont just like each other then because I'm not an elitist when it come to my profession. I know what is needed and what is not. I just don't get why you need to go low-level when everything being done today is to make things simpler.

Thread Thread
 
rossdrew profile image
Ross

Elitist, low-level? Dividing by 2?

make things simpler.

Than a program to divide by two in a loop?

Thread Thread
 
seveneye profile image
seveneye

Yeah so instead of having the freedom to look it up on google, I need to remember that 10 years after graduation. Its "low level". Again, when did you have that as development task. Unless you are working on "low-level" stuff, then this interview question might be valid. But for the general software developer roles where you can just look up trivial tasks, this prove nothing.

Collapse
 
louy2 profile image
Yufan Lou • Edited

Taking both your point and OP's, I think yes, the decimal to binary conversion is a representative of the data wrangling problems developers are asked to solve all the time, but the process should include giving the specification of decimal and binary numbers, so that prior knowledge of them is not required.

I still think the decimal to binary conversion is a problematic test.

Decimal to binary is a required problem taught to Computer Science university students, but not so pervasive outside of universities. University students will likely solve it simply by memory, while other people may have to figure it out by themselves. That makes the test:

  1. unfairly skewed towards those who can afford a university degree
  2. less able to differentiate within the university students
  3. not closely related to the domain of the employer

A similar data conversion task taken from the domain of the employer would give the prospect employees an idea of what the work will look like, prefer those who are more familiar with the domain, and test the problem solving skills of university students as much as those of others.

Thread Thread
 
rossdrew profile image
Ross • Edited

I'm worried that you think exposure to the concept of binary and decimal for people working in computer science/development is limited to those with degrees. Anyone with basic math or comp-sci knowledge should know this. If someone applying for a comp-sci/dev position managed to completely skip a pretty basic and core concept in the field I'd wonder about the quality of their knowledge and worse still if they didn't know and couldn't ask for gaps in their knowledge to be filled in on site (which would take all of 10 seconds), I'd worry that they are going to be terrible at a job that is 90% about asking questions to things we don't know.

A similar data conversion task taken from the domain of the employer

You think that binary is beyond people without a degree but specialist domain knowledge isn't?

Thread Thread
 
louy2 profile image
Yufan Lou

is limited to those with degrees

No, I do not think only those with degrees know of binary and decimal. I merely assert that those with degrees have a far higher chance to know of binary and decimal than those without. Please don't strengthen others' proposition unilaterally.

You think that binary is beyond people without a degree but specialist domain knowledge isn't?

No, I do not think binary is not beyond people without a degree. Rather, I think domain specific knowledge is beyond both people with and without a degree. As you say the job is

90% about asking questions to things we don't know

Then for those with a degree you are not testing this at all, since they know binary already.

Thread Thread
 
rossdrew profile image
Ross

The test is supposed to -in 30 seconds- show basic coding skills. NOT test knowledge of binary.

You are focusing on the wrong thing and creating a straw man.

Thread Thread
 
louy2 profile image
Yufan Lou

My focus is

test the problem solving skills of university students as much as those of others.

So you think that is the wrong thing to focus on?

Thread Thread
 
rossdrew profile image
Ross

I still think the decimal to binary conversion is a problematic test.

^ That is the wrong thing to focus on. Mentioning disparity between university CS and non-university CS is another level of irrelevant. I provide the test, candidate can ask "how do you do that" I say "you divide and mod the number by two, the division gives you the next step the mod gives you the first output" then they write the algorithm down in code.
Whether that problem is binary to decimal, decimal to binary, fizzbuzz or reversing a string, the thing to focus on is that it's an easy problem to explain, it's ripe for asking questions and it leads to a small amount of code that is representative of a candidates basic coding skills. What you get from that 30 second to a minutes worth of effort is:

  • Can this candidate analyse and understand a simple problem statement
  • Does this candidate have good CS basic grounding
  • Can the candidate admit that they have gaps in their knowledge
  • Can the candidate ask questions
  • Does the candidate have a basic grasp of loops, variables, operators, state
  • Can they converse in a clear way from a technical focus

It also has the added discussion routes of

  • How does the candidate understand optimisation
  • How does the candidate understand clarity of code
  • How would they unit test this
Thread Thread
 
louy2 profile image
Yufan Lou

We agree on many. We likely agree on more than you think.

But man, this whole thread started about the binary to decimal test. That's part of the topic. How can talking about the topic of the thread be "wrong"?

Thank you for the list of considerations. I like it. But let's cut it here.

Thread Thread
 
seveneye profile image
seveneye

I think the test is stupid. I have BS CS but I vaguely remembers how to divide and get that binary stuff. You need knowledge on how to convert it.

There are also self thought developers and this test will prove nothing.

Collapse
 
anivajain profile image
AnivaJain • Edited

isn't this just basic math? 2^N?