Click here to Skip to main content
15,884,010 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
W Balboos, GHB23-Sep-20 5:37
W Balboos, GHB23-Sep-20 5:37 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer23-Sep-20 6:12
professionalDaniel Pfeffer23-Sep-20 6:12 
GeneralRe: Thought of the Day Pin
Sandeep Mewara23-Sep-20 8:23
mveSandeep Mewara23-Sep-20 8:23 
GeneralRe: Thought of the Day Pin
DRHuff23-Sep-20 9:21
DRHuff23-Sep-20 9:21 
GeneralRe: Thought of the Day Pin
Stefan_Lang23-Sep-20 23:15
Stefan_Lang23-Sep-20 23:15 
GeneralRe: Thought of the Day Pin
Johnny J.23-Sep-20 23:48
professionalJohnny J.23-Sep-20 23:48 
GeneralRe: Thought of the Day Pin
Rich Leyshon23-Sep-20 23:35
Rich Leyshon23-Sep-20 23:35 
General25 years of programming reduced to a question. PinPopular
Jeremy Falcon23-Sep-20 2:33
professionalJeremy Falcon23-Sep-20 2:33 
Does anyone else think coding interviews are fundamentally broken? So like, literally I've been doing this (programming) my whole life. We can all go through our accolades I'm sure, but suffice it to say I've done some things over the years to help rebuild departments in large corporations to garner the attention of regional VPs, etc. as we all have. But, I say this because, two days ago, I had an interview with Unnamed Company That Rhymes With Acelook. Don't get me wrong, they were super friendly, and it was a great chat. But I was asked questions like...

Are you comfortable with writing APIs on the backend?

That's a generic question, so of course I say sure. To me this indicates the interviewer doesn't realize the best way to interview. No real probing... just questions like that. Ok, cool. Still was a great, super friendly chat. But, then the tech portion of it came up. I was asked this...
JavaScript
/* given an array of random numbers, push all the zero's of a given array to the end of the array
for example, if the given arrays is [1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0], it should be changed to [1, 9, 8, 4, 2, 7, 6, 0, 0, 0, 0]

Example:

Input:  [1, 2, 0, 4, 3, 0, 5, 0];
Output: [1, 2, 4, 3, 5, 0, 0];

Input: [1, 2, 0, 0, 0, 3, 6];
Output: [1, 2, 3, 6, 0, 0, 0]; */

Ok fine... I get how this game works. So, let's get cracking. The first solution I start with used two arrays. Cool, no biggie. But then the interviewer asked for me to do it in-place. Ok, fine. So, I write some code that is like a bubble sort that brute forced it (ie, nested loops). We all know that it sucks to have nested loops. Anyway, the interview was cut short and that was that. I look up the "official" solution online, and it's no better than my first attempt. In fact, my first attempt was quicker due to only one loop. The one I linked to was using two loops that just weren't nested.

So, not only did my original solution avoid two loops (using more memory though), but I found a more elegant solution online and I just know if that interview wasn't cut short I could've tried something like this the third go-round...
C++
void moveZeroes(vector<int>& nums) {
    for (int lastNonZeroFoundAt = 0, cur = 0; cur < nums.size(); cur++) {
        if (nums[cur] != 0) {
            swap(nums[lastNonZeroFoundAt++], nums[cur]);
        }
    }
}

But since I didn't try something like this first, I got passed on.

Does anyone else think that's a fundamentally broken way to find a good programmer? Let's be real... once you get the job how often to you spend your day doing algorithms for a typical LOB app? Never. No questions about how well you handle problems, how do you deal with other developers, how do you scale, etc. Not to sound sour, but to reduce a 25 year professional to that... something is wrong with the industry. Imagine hiring a lawyer and turning him down because you Googled something online that's obscure and never used.

Anyone else agree this is fundamentally broken?

[Edit] This is not a bash management or people that conduct interviews type post. My recruiter was fantastic. The interviewer was friendly and knowledgeable. I'm just pointing out the broken process we all put ourselves through. [/Edit]
Jeremy Falcon


modified 24-Sep-20 7:59am.

GeneralRe: 25 years of programming reduced to a question. PinPopular
W Balboos, GHB23-Sep-20 2:38
W Balboos, GHB23-Sep-20 2:38 
GeneralRe: 25 years of programming reduced to a question. Pin
rnbergren23-Sep-20 2:49
rnbergren23-Sep-20 2:49 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 2:54
professionalJeremy Falcon23-Sep-20 2:54 
GeneralRe: 25 years of programming reduced to a question. Pin
W Balboos, GHB23-Sep-20 3:02
W Balboos, GHB23-Sep-20 3:02 
GeneralRe: 25 years of programming reduced to a question. Pin
Jeremy Falcon23-Sep-20 3:11
professionalJeremy Falcon23-Sep-20 3:11 
GeneralRe: 25 years of programming reduced to a question. Pin
W Balboos, GHB24-Sep-20 5:06
W Balboos, GHB24-Sep-20 5:06 
GeneralRe: 25 years of programming reduced to a question. Pin
Bruce Patin24-Sep-20 3:20
Bruce Patin24-Sep-20 3:20 
GeneralRe: 25 years of programming reduced to a question. Pin
RDM Jr23-Sep-20 2:57
RDM Jr23-Sep-20 2:57 
GeneralRe: 25 years of programming reduced to a question. Pin
Daniel Pfeffer23-Sep-20 6:16
professionalDaniel Pfeffer23-Sep-20 6:16 
GeneralRe: 25 years of programming reduced to a question. Pin
Mike Winiberg23-Sep-20 20:03
professionalMike Winiberg23-Sep-20 20:03 
GeneralRe: 25 years of programming reduced to a question. Pin
RDM Jr23-Sep-20 20:53
RDM Jr23-Sep-20 20:53 
GeneralRe: 25 years of programming reduced to a question. Pin
Mike Winiberg23-Sep-20 21:30
professionalMike Winiberg23-Sep-20 21:30 
GeneralRe: 25 years of programming reduced to a question. Pin
Member 787811624-Sep-20 5:03
Member 787811624-Sep-20 5:03 
GeneralRe: 25 years of programming reduced to a question. Pin
Member 1454164824-Sep-20 2:21
professionalMember 1454164824-Sep-20 2:21 
GeneralRe: 25 years of programming reduced to a question. Pin
raddevus23-Sep-20 2:50
mvaraddevus23-Sep-20 2:50 
GeneralRe: 25 years of programming reduced to a question. PinPopular
Jeremy Falcon23-Sep-20 3:01
professionalJeremy Falcon23-Sep-20 3:01 
GeneralRe: 25 years of programming reduced to a question. Pin
Martin ISDN24-Sep-20 8:11
Martin ISDN24-Sep-20 8:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.