Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 13, 2012, 09:53 PM   #1
chrono1081
macrumors 604
 
chrono1081's Avatar
 
Join Date: Jan 2008
Location: Isla Nublar
Programming job interview (again). Anyone have any unique questions or advice?

Hi guys,

I'm not sure if anyone remembers or not but I blew an interview back in September (mostly because I couldn't hear the interviewer, and partially because it caught me off guard and I wasn't prepared for the interview).

Well, I have since graduated college, have been working on my programming skill set, and managed to pass an initial interview for an application developer position.

I have a large pool of standard questions I have been practicing, I will be buying a suit this week (I do not have one), and will be doing practice interviews until the interview date.

My question is does anyone have any additional advice for an interview for a programming position? Perhaps a strange question you were asked?
__________________
Mac Pro (2010): 3.33Ghz Intel Xeon (6 core) - 24 GB RAM - NVidia Quadro k5000
Macbook Air (2010): 2.13 Ghz Intel Core 2 Duo - 4GB RAM
chrono1081 is offline   0 Reply With Quote
Old Mar 13, 2012, 10:02 PM   #2
GorillaPaws
macrumors 6502a
 
GorillaPaws's Avatar
 
Join Date: Oct 2003
Location: Richmond, VA
I have never interviewed for a programming position, but I have interviewed candidates for other jobs in an unrelated field. I can say that interviewees that ask me good questions about our company get put in the good stack. I would be tempted to ask them about their coding philosophy, if they use pair coding, or agile practices etc. and why that approach works for them. I'm sure you'll get lots of other code-related answers here too, but I thought I'd chime in to share my (non-coding) perspective.
__________________
How to ask good programming questions: Getting Answers
GorillaPaws is offline   1 Reply With Quote
Old Mar 13, 2012, 11:43 PM   #3
jtara
macrumors 65816
 
Join Date: Mar 2009
1. Start solving a real problem right in the interview. May not be applicable for an entry-level position, though. What I mean is, identify a problem or some future development that they have planned, and offer your solution or make suggestions as to how you would solve or implement it. I've done mostly contracting, so I am hired to do a particular job. I find the most effective interview technique is to act as if I've already been hired, and just dig into the solution. Particularly if the interviewer is a peer, they will at that point forget that they are conducting an interview. It's then just a matter of showing that you're being there is going to make their job easier, because you "get it".

2. Save the suit for weddings and funerals. Seriously, wearing a suit to a programming job interview will actually knock you down a bit. In most places, there will be some concern that you will not fit in, especially if (as is common) there will be peers among the interviewers. Strike some happy medium between a suit and shorts and sandals.

Last edited by jtara; Mar 13, 2012 at 11:48 PM.
jtara is offline   2 Reply With Quote
Old Mar 14, 2012, 04:12 AM   #4
Sander
macrumors 6502
 
Join Date: Apr 2008
You should also be prepared for non-technical questions. Some interviewers like to ask you "Where do you see yourself five years from now" and "Name a situation where you solved a problem using persuasion".

If I'm the one interviewing you, you'd score extra points by just staring at me and saying "... dude." I'll apologize and say they make me ask this stuff, and quickly get back to nested templates and your knowledge of C++11.
Sander is offline   0 Reply With Quote
Old Mar 14, 2012, 04:30 AM   #5
WebMongol
macrumors member
 
Join Date: Sep 2004
Location: Bay Area, CA
Quote:
Originally Posted by chrono1081 View Post
My question is does anyone have any additional advice for an interview for a programming position? Perhaps a strange question you were asked?
Be ready to write code on a whiteboard. It's tough and requires some practice. You can find typical questions in list below. In general, you are expected to come up with optimal algorithm and implementation in 20 minutes. Quadratic run time is not good enough. Usually you need to come with O(N) or O(NlogN) solution.
Good luck!

General
Given two arrays, print all common elements. Small array size is M, and large array size is N (M << N)

Given a list, return the first pair of duplicates in the list

Given an array of N numbers, and a number T, find out whether there are two numbers from the N numbers sums up to the number T. Find out ALL solutions to the problem and analyze the run times.

Given 64K-1 numbers [0..64K-1] find one missing number.

You have unordered array X of N integers. Find the array M containing N elements where M[i] is the product of all integers in X except for X[i]. You may not use division. You can use extra memory. Solution faster than O(N^2)

For a given sequence of numbers print all increasing subsequences.

Given an array of integers (both positive and negative) divide the array into two parts (sub-arrays) such that the difference between the sum of elements in each array is minimum?

Linked Lists

Implement basic operations for singly linked list: push_front, push_back, delete, tail, size, pop_front, find

Implement following operations for singly linked list: count, at, insert_at, insert_after

Reverse linked list in place

Find loop in linked list. Find length of the cycle. (Floyd's cycle-finding algorithm)

Write a function to find the middle node of the a singly-linked list

Write a function to copy list to new list and return pointer to head of the new list

Probability

You have a stream of infinite queries (i.e: real time search queries that people are entering). Describe how you would go about finding a good estimate of 1000 samples from this never ending set of data and then write code for it.

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

Write function to select random sample of size M from a stream of numbers.

Write function to select random sample of size M from a set of numbers of size N.

Write function to random shuffle array a.
WebMongol is offline   2 Reply With Quote
Old Mar 14, 2012, 05:11 AM   #6
KnightWRX
macrumors Pentium
 
KnightWRX's Avatar
 
Join Date: Jan 2009
Location: Quebec, Canada
1- Don't be nervous. The best way not to be nervous is to be in the "they need me more than I need them" or the "Why don't they convince me to work for them" mindset.

2- Over preparing, rehearsing and all that crap will make you nervous, thus fail at 1.

Everything else, just be yourself. Don't study, don't rehearse. Just sit down, let them ask their stuff, then ask a lot of questions about the positions, the working conditions and the salary and benefits.
__________________
"What you leave behind is not what is engraved in stone monuments, but what is woven into the lives of others."
-- Pericles
KnightWRX is offline   0 Reply With Quote
Old Mar 15, 2012, 02:39 PM   #7
chrono1081
Thread Starter
macrumors 604
 
chrono1081's Avatar
 
Join Date: Jan 2008
Location: Isla Nublar
Thanks guys for all the tips and advice

@KnightWRX I actually did that before and it worked wonders! I ended up negotiating a significant pay raise during my interview. They hired me on the spot even though I know at least one other candidate was "technically" more qualified (he had a degree and I didn't).

The other guy I mentioned at the interview was actually a coworker who told everyone at work he saw me at an interview. Good thing I got the job
__________________
Mac Pro (2010): 3.33Ghz Intel Xeon (6 core) - 24 GB RAM - NVidia Quadro k5000
Macbook Air (2010): 2.13 Ghz Intel Core 2 Duo - 4GB RAM
chrono1081 is offline   0 Reply With Quote
Old Nov 1, 2012, 10:01 PM   #8
jenny2765
macrumors newbie
 
Join Date: Nov 2012
I have some questions. I hope it's useful for me.
1.what is the first thing that people notice about you?
2.What are your three BEST life skills?
3.What’s the most important thing you’re looking for in another person?
4.What are 5 things you “can’t live without?”
__________________
103 interview questions and answers ( free pdf download)
jenny2765 is offline   0 Reply With Quote
Old Nov 1, 2012, 10:22 PM   #9
dynafrom
macrumors member
 
Join Date: Jun 2012
Quote:
Originally Posted by jtara View Post
1. Start solving a real problem right in the interview. May not be applicable for an entry-level position, though. What I mean is, identify a problem or some future development that they have planned, and offer your solution or make suggestions as to how you would solve or implement it. I've done mostly contracting, so I am hired to do a particular job. I find the most effective interview technique is to act as if I've already been hired, and just dig into the solution. Particularly if the interviewer is a peer, they will at that point forget that they are conducting an interview. It's then just a matter of showing that you're being there is going to make their job easier, because you "get it".

2. Save the suit for weddings and funerals. Seriously, wearing a suit to a programming job interview will actually knock you down a bit. In most places, there will be some concern that you will not fit in, especially if (as is common) there will be peers among the interviewers. Strike some happy medium between a suit and shorts and sandals.

Is this a joke? Wear a suit to ALL professional interviews.
__________________
rMBP GT650M OC'd +120/+1000
dynafrom is offline   0 Reply With Quote
Old Nov 2, 2012, 12:27 PM   #10
Kranchammer
macrumors member
 
Join Date: Mar 2010
Location: Kahleefornya
Quote:
Originally Posted by WebMongol View Post
Be ready to write code on a whiteboard. It's tough and requires some practice. You can find typical questions in list below. In general, you are expected to come up with optimal algorithm and implementation in 20 minutes. Quadratic run time is not good enough. Usually you need to come with O(N) or O(NlogN) solution.
Good luck!

General
Given two arrays, print all common elements. Small array size is M, and large array size is N (M << N)

Given a list, return the first pair of duplicates in the list

Given an array of N numbers, and a number T, find out whether there are two numbers from the N numbers sums up to the number T. Find out ALL solutions to the problem and analyze the run times.

Given 64K-1 numbers [0..64K-1] find one missing number.

You have unordered array X of N integers. Find the array M containing N elements where M[i] is the product of all integers in X except for X[i]. You may not use division. You can use extra memory. Solution faster than O(N^2)

For a given sequence of numbers print all increasing subsequences.

Given an array of integers (both positive and negative) divide the array into two parts (sub-arrays) such that the difference between the sum of elements in each array is minimum?

Linked Lists

Implement basic operations for singly linked list: push_front, push_back, delete, tail, size, pop_front, find

Implement following operations for singly linked list: count, at, insert_at, insert_after

Reverse linked list in place

Find loop in linked list. Find length of the cycle. (Floyd's cycle-finding algorithm)

Write a function to find the middle node of the a singly-linked list

Write a function to copy list to new list and return pointer to head of the new list

Probability

You have a stream of infinite queries (i.e: real time search queries that people are entering). Describe how you would go about finding a good estimate of 1000 samples from this never ending set of data and then write code for it.

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

Write function to select random sample of size M from a stream of numbers.

Write function to select random sample of size M from a set of numbers of size N.

Write function to random shuffle array a.
Would not work for a company that interviewed like that; that tells you exactly nothing about the skills of the interviewee except that they are good at regurgitation.
They should know the CONCEPTS you described of course, but to expect someone to write optimized code on the spot? Dumb.
__________________
Si vis pacem, para bellum
Kranchammer is offline   0 Reply With Quote
Old Nov 2, 2012, 12:42 PM   #11
karlth
macrumors regular
 
Join Date: Apr 2010
Quote:
Originally Posted by Kranchammer View Post
Would not work for a company that interviewed like that; that tells you exactly nothing about the skills of the interviewee except that they are good at regurgitation.
They should know the CONCEPTS you described of course, but to expect someone to write optimized code on the spot? Dumb.
Totally agree, unless you are applying for a company that develops algorithm libraries.
__________________
iPhone and iPad developer.
Digital White Knight
karlth is offline   0 Reply With Quote
Old Nov 2, 2012, 06:51 PM   #12
AzN1337c0d3r
macrumors 6502
 
Join Date: Sep 2010
Quote:
Originally Posted by karlth View Post
Totally agree, unless you are applying for a company that develops algorithm libraries.
I also agree.

Unless you are applying for a position where optimization is one of your main duties, writing "clever" solutions like this makes for a maintenance nightmare.

As one of my bosses once said:

Quote:
Code should be boring to read. The correctness should be immediately obvious to anyone who reads it.
__________________
rMBP (10.8), 2.6 GHz, 8 GB RAM, 512 GB SSD
Hackintosh (10.7.4), 4.6 GHz i7-3930K, 32 GB RAM, 3xHD7970, 2x240GB Vertex 3 RAID 0 SSD, 2x600GB Velociraptor 10KRPM, Drobo S 5x2TB, 2x HP LP3065 30-inch.
AzN1337c0d3r is offline   0 Reply With Quote
Old Nov 7, 2012, 02:33 PM   #13
jtara
macrumors 65816
 
Join Date: Mar 2009
Quote:
Is this a joke? Wear a suit to ALL professional interviews.
Not a joke at all.

Find out who is going to be interviewing you. It is common to be interviewed by a manager, somebody from HR, and a group of your peers.

The HR guy is to enforce company rules on hiring.

In many cases, the manager is going to take his cue from his team.

A suit generally is not going to be seen as a plus by your future co-workers. The first thing you are going to get when you walk into the peer interview are going to be glances between them and a few snickers. You will be likely be viewed as inexperienced, naive', "trying too hard", and not a team player.

Wear what you would wear to work. And find out what that is first. And get a better description than "business casual". If you can, hang-out in the parking lot on a day prior to the interview and see what people wear. Wear what the other employees wear on a day when they are well-dressed. (Skip the sandals.)
jtara is offline   0 Reply With Quote
Old Nov 7, 2012, 06:54 PM   #14
Persifleur
macrumors member
 
Join Date: Jun 2005
Location: London, UK
Quote:
Originally Posted by jtara View Post
A suit generally is not going to be seen as a plus by your future co-workers. The first thing you are going to get when you walk into the peer interview are going to be glances between them and a few snickers. You will be likely be viewed as inexperienced, naive', "trying too hard", and not a team player.
Whether this is true or not is very heavily dependent upon the type of company you apply for. I've worked for (and interviewed on behalf of) several companies that had a casual dress policy and I still interviewed in a suit, even though I knew the dress policy beforehand. From my experience, not showing up in a suit will backfire more often than it'll work in your favour.
Persifleur is offline   0 Reply With Quote
Old Nov 7, 2012, 08:36 PM   #15
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Just to add a data point:
I wore a suit to 4-5 interviews out of college, got 1 offer, and accepted it. Since then I've gone 1 notch higher than what I understand my potential colleagues wear. I've tried to find out from insiders or a recruiter what the folk interviewing will be wearing. If they're in a polo, go Oxford. If they're in an Oxford with unbuttoned collar, add a tie. Pants... I've gone "nice jeans" (odd, I know. Dark/fitted vs. Levi's) or slacks (I hate khakis).

It's always worked for me. I haven't worn a full suit since the first round out of college. If you're totally comfortable in a suit, that's fine, but if you're not comfortable wearing that every day I'd call it false advertising. I think as long as you're at or just above the attire of those interviewing you you're fine. If you're below or way above then they're going to notice, and you don't need that to be what stands out.

-Lee
lee1210 is offline   0 Reply With Quote
Old Nov 7, 2012, 09:39 PM   #16
Mac_Max
macrumors 6502
 
Join Date: Mar 2004
Pants and a nice shirt and you should be fine at most non mega-corp types. Slacks and a dress shirt for those.

Being bluntly honest, If a suit is not your normal thing and you're forced to work in one, you're probably at the wrong company... unless they're paying you a huge amount of money and you have kids (and are willing to make the sacrifice for them) or don't plan on staying long. You will not like it and there are tons of software dev jobs where everyone wears t shirts, shorts, and flip flops.

I'd suggest brushing up on basic SQL syntax and DB concepts. I've found that people in general/interviewers appreciate basic questions about databases being answered honestly and without too much fumbling.

If you're interviewing at a web company, understand posts v.s. gets and have at least a "10,000ft concept" of what REST & SOAP APIs are (you don't need to be an expert unless you're advertising yourself as one).

Know what pointers/references are in general. Even if you end up working in a language without raw pointers (i.e. Java, PHP, Perl) most people will expect that you know what those are.

Bring a pad of paper to the interview or have one ready if its a phone interview. I've never been presented a white board. Never. But, for the same reasons that whiteboards are handy to have (scrawl out concepts, work through products, keep your thoughts straight), a pad of paper and pen is good to have as well.
Mac_Max is offline   0 Reply With Quote
Old Nov 7, 2012, 11:05 PM   #17
admanimal
macrumors 68040
 
Join Date: Apr 2005
I have had recruiters from big tech companies explicitly tell me before the interview NOT to wear a suit, since no one who works there would ever wear that anyway.

I highly recommend this book:

http://www.crackingthecodinginterview.com
admanimal is offline   1 Reply With Quote
Old Nov 8, 2012, 01:05 AM   #18
milbournosphere
macrumors 6502a
 
milbournosphere's Avatar
 
Join Date: Mar 2009
Location: San Diego, CA
^ You're the second person to recommend that book to me in the past week. I'm going to be picking it up this weekend. I'm about two years out of college with my CS bachelor's degree, and am starting to think about stepping up my career a notch.

I haven't interviewed since my intern days (I was given a full-time position after I graduated), so all this advice is much appreciated. OP, I'm glad the interview went so well.

On the clothing subject...I think a suit would be over-doing it, personally. I would suggest a nice, neutral shirt with a matched tie (simple four-in-hand; a Windsor knot would be too much) and a nice pair of dark slacks. If the company has only 10 employees, you could probably get away with not wearing the tie. It's not a suit, but it's not jeans and a polo, either. To wear anything less would, IMO, show a lack of respect for yourself and the position you're going for. A suit would be going overboard, but I feel that by dressing down, one walks a thin line. I'd rather find myself over-dressed than under-dressed.
__________________
Russian roulette linux style : dd if=/dev/urandom of=/dev/kmem bs=1 count=1 seek=$RANDOM
milbournosphere is offline   0 Reply With Quote
Old Nov 8, 2012, 01:23 AM   #19
admanimal
macrumors 68040
 
Join Date: Apr 2005
I think the general rule is that you should dress the way you would expect the nicest dressed person at the position you are applying for at that company would dress.

In most cases for tech jobs, that is going to mean khaki pants and a nice polo shirt, which is exactly what I have heard most recruiters tell people to wear. A more casual buttoned shirt with a tie is certainly reasonable as well.
admanimal is offline   0 Reply With Quote
Old Nov 8, 2012, 10:21 AM   #20
mslide
macrumors 6502a
 
Join Date: Sep 2007
Oh geez. Please leave the suit at home. It doesn't belong in an engineering interview. When I see a candidate walk in in a suit, it's hard for me not to automatically dock points. They are usually inexperienced or trying to make themselves look better than they are.
mslide is offline   0 Reply With Quote
Old Nov 8, 2012, 10:55 AM   #21
Palad1
macrumors 6502a
 
Palad1's Avatar
 
Join Date: Feb 2004
Location: London, UK
Quote:
Write a function that takes an int N, and prints all numbers x between 0 and N on the standard output. Append "Fizz" if the number can be divided by 3, and "Buzz" if the number can be divided by 5.
You have no idea how many people fail the FizzBuzz test.
Palad1 is offline   0 Reply With Quote
Old Nov 8, 2012, 12:28 PM   #22
notjustjay
macrumors 603
 
notjustjay's Avatar
 
Join Date: Sep 2003
Location: Canada, eh?
Quote:
Originally Posted by mslide View Post
Oh geez. Please leave the suit at home. It doesn't belong in an engineering interview. When I see a candidate walk in in a suit, it's hard for me not to automatically dock points. They are usually inexperienced or trying to make themselves look better than they are.
The last couple of engineering interviews I did, I wore the suit pants and a dress shirt with a nice tie, but no suit jacket. (I wore my university leather jacket). That seemed to dress down just enough while still looking professional.
__________________
.
notjustjay is offline   0 Reply With Quote
Old Nov 8, 2012, 01:22 PM   #23
mikegrad
macrumors newbie
 
Join Date: Aug 2012
Quote:
Originally Posted by Palad1 View Post
You have no idea how many people fail the FizzBuzz test.
im very curious now! since any number can be divided by 3 or 5, im assuming you mean divided with no remainder?

Can you post the solution?
mikegrad is offline   0 Reply With Quote
Old Nov 8, 2012, 02:03 PM   #24
ramy1989
macrumors newbie
 
Join Date: Nov 2012
Ok in two minutes I wrote this:

Code:
int main(int argc, char** argv)
{
    for(int i=1; i<=100;i++)
    {
        bool printNumber=true;
        if(i%3==0)
        {
            printf("Fizz");
            printNumber=false;
        }
        if(i%5==0)
        {
            printf("Buzz");
            printNumber=false;
        }
        if(printNumber)
            printf("%d",i);
        puts("\n");
    }
    return 0;
}
I tried my best to simplify the code, but I need a bool otherwise I shall write a lot of if-else.
It's not hard, maybe they not choose real programmers.
ramy1989 is offline   0 Reply With Quote
Old Nov 8, 2012, 02:26 PM   #25
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Quote:
Originally Posted by ramy1989 View Post
Ok in two minutes I wrote this:

Code:
int fizzBuzz(int maxNumber, bool inclusive)
{
    int start = inclusive ? 0 : 1;
    int end = inclusive ? maxNumber + 1 : maxNumber;
    for(int i=start; i<end;i++)
    {
        printf("%d",i);
        if(i%3==0)
        {
            printf("Fizz");
        }
        if(i%5==0)
        {
            printf("Buzz");
        }
        puts("\n");
    }
    return 0;
}
I tried my best to simplify the code, but I need a bool otherwise I shall write a lot of if-else.
It's not hard, maybe they not choose real programmers.
FTFY =). The receptionist will validate your parking on your way out. =)
Question wasn't to omit the value when evenly divisible, just append. The question didn't say inclusive or exclusive, so I made this an option.
lee1210 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iOS Developer Challenge - Mobile Programmer Quiz and IT Job Interview alexeir iPhone and iPod touch Apps 2 Aug 6, 2013 12:05 PM
Is this a normal job interview? marty1990 Design and Graphics 14 Oct 31, 2012 12:33 AM
Apple store retail job interview! emoneyy59 Community Discussion 14 Oct 6, 2012 04:22 PM
What was your first programming job? pchipchip Mac Programming 34 Jun 20, 2012 02:08 PM

Forum Jump

All times are GMT -5. The time now is 04:31 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC