When I examine the ~13,000 hours I've spent programming I find it hilarious that interviews should centre around algorithmic problems. I've been guilty of it myself and failing FizzBuzz is definitely a true negative but it's so little of a true positive it's not even funny.
What I would really love to know about you as a candidate is:
- do you know how to actually name functions and variables well (unbelievably important)
- do you know your chosen languages and frameworks well enough to avoid cack-handedly reinventing them on paid time
- do you understand how to code an application that someone else (possibly just you) will quickly understand on coming to it cold in 18 months time
- do you understand the trade-offs between features and maintenance, the technical debt that features, designs and toys incur and when to invest in them and when to avoid them
- are you diligent and careful and do you check and re-check your code or just chuck it in the mix for other people to fix
- do you actually do real work for at least four hours each day
- do you take the time to write up the things you've done and share decisions and architecture with the rest of the team
- does your addition to the team on average make your team mates become better or worse coders
- do you understand the exquisite balance between too much testing and too little
In 13,000 hours I have had to wrestle with the consequences of O(n) complexity or binary tree search algorithms approximately NO TIMES.
I did not mean to sidetrack Rob's excellent, excellent piece on finding a job in Silicon Valley however I did want to take the opportunity to state the things that I have empirically found as a professional developer to actually matter.
I'd love to have any means of better answering that question than going with "did you pay attention in class/last few jobs?" sorts of questions like "Can you work with this linked list on a white board" simple programming problems, but right now I don't know a better way. So I don't consider programming puzzles meaningless on the assumption that the guy who slacked off won't do well with them while the guy who paid attention and loves to program will know and demonstrate a thing or two.
I know with some potential hires I can review a github repository, but that has similar problems. I've handed an interviewee code from his own github repo where he had fixed a defect and asked him to point out the defect he fixed on the page, and he couldn't find it. Does he just have a bad memory, or is he lying about that being his code? How can I tell?
For the other 98% of companies, there's just no need. I've also never ever had to do strange things with binary trees.
Although not too often (compared to factors mentioned already), but it depends upon the domain too. I worked in embedded for the most part where the liberty of using frameworks, libraries - is far scarce, so it matters which area / programming environment are we talking about in general.
Also, i am yet to run into a good interviewer + programmer (whether more experienced or junior) who doesn't value these things as a good predictor of some one's coding ability.
And we are not talking about only scale of companies like Google or Facebook and in my humble opinion, those might get a bit tooo algorithmic as well.
But you should be able to recognize that a design you did won't scale when you have say 100k or more packets (instances) of inputs thrown at it. It won't be a problem ONLY UNTIL your list of traversal, get big enough, and frankly any software worth being discussed - gets big enough at some point.
Or that your linear traversal should dramatically improve if you could code and use a hash table instead.
Ah - and yes, loved the idea of 'can do serious work for at t least four hours a day', but wonder if there is a way to determine that.
(think parsing and searching monster flat text databases from disk)
- How virtual memory works
- How threads work
- How TCP works
- How ports work
- How ethernet works
- How DNS works
- How a web server works.
And so on. A lot of these things are more important than theory (but I think theory is important, too!).
For all the fear of being "culturally unfit" for a company, highlighting what kind of role you play and how you interact with your coworkers is fundamental.
Are you diligent and consistent with your work? Are you the kind of person that bursts through work in a flash? Do you prefer to work alone or in a team? How do you feel working with people below your position or above it? etc.
These questions have the issue, however, that you rarely ask them in an interview. You just gauge them from a conversation, that really doesnt speak to any of them. If someone is a complete technical ace, but is silent 100% of the interview besides technical points, i still get red flags. A co-worker is not a cog in a machine, its someone you will be spending 40 + hours a week with.
I disagree with hard theory NOT being important. Im a drop-out but i still went through all the algorithms and data structures classes out there and they gave me knowledge to communicate about hard problems, even though Im not the one solving them (we got some phds for that). And above all, at least in our case currently, several of the algorithm questions we do are actual problems we had in our product. In particular i wouldnt even call O(n) "hard". Its maybe the single most important performance computer science knowledge you need, and its not hard to calculate for the vast majority of applications.
That is what I would expect someone who has had to wrestle with big-O problems but didn't recognize them to say. I honestly don't know what you're working on if its actually true. I had a time complexity issue just this week. On front-end code, no less. I probably work on an issue involving time complexity once a month, if not more often.
then maybe you're not solving very challenging problems.
Some companies don't need the latter. Some companies do. The latter companies do want to hire someone who can do both, and not be stuck to a special set of tasks that they can do i.e. they want a generalist who can be assigned to any project of varying complexity.
Personally speaking, many of the tasks I do don't involve the algorithmic skill set. But some do - now without that skill set would I just outsource it to the "brighter" folks in my company or would the company just prefer that everyone who they hire know that stuff ?
Something I learned after the whole process was that people apparently take a month or two to prepare intensively and specifically for interviews with these 3 companies. Luckily I came out of the ordeal with an offer, but I wish I had known that tidbit before.
So far the biggest parallel with your experience is gaining the confidence to even begin applying for jobs. I came to the conclusion that I have almost nothing to lose by applying for jobs and it's really difficult to burn bridges by just sending in a resume or a quick email saying I'm interested in your company.
Some of the interviews so far have been excellent and left me really excited about following up with a take-home coding exercise. On the other hand some have left a really bad taste in my mouth. I found it surprising how much I can get a feel for the type of person a CEO/CTO is over the phone. One of my biggest complaints is when interviewers want me to do spec work[1] for their app. That's a big red flag for me.
My biggest successes so far have come from downloading/signing up for the product or service and spending some time using it. So far interviewers have really enjoyed that and it has led into great discussions about the product and how I would improve it. Furthermore, in remote coding interviews, being honest and saying, "I don't know, could you please show me." is really appreciated and demonstrates character.
Yes, you can work somewhere with free lunches/perks/nerf gun wars. However, you should always ask yourself 'Will working here make me a better person?'.
This could mean providing more financial stability or a huge boost to your resume via gaining expertise in a sought-after area. I hate the argument that 'If I work at Google, I'll be more marketable to future employers'. No...as someone who's hiring, I don't care if you were some guy/girl at google. If you worked on BigTable, awesome you're probably well-qualified for any job in that area and will be paid as much as you want. If you're employee number 70,001 and worked on designing icons for 'Google Trends', you shouldn't expect a huge payout at your next job for being 'Ex-Googler'
Maybe I'm misunderstanding you, but no it isn't. it's O(N) if you have to traverse a list of numbers it's actually constant time if the numbers are sequential.
Congrats to him on the new job and the H1B visa and to Stripe for hiring him. He seems to really deserve it.
I'm wondering how to answer that?
* Get a short and memorizable url.
* When you enter an URL hash it, put it in a hash table and use the hash for the link.
> “If I type https://google.com into my browser and press enter, what happens?”
How would you guys answer this one? I'm not sure I've enough knowledge to do that. I'd say:
* first TLS handshake thanks to RSA to share a key
* then a GET
* then the server sends a cache version of Google according to location/cookies/etc...
* then the html gets displayed in the client's browser
Background: London. Comp Sci. from top 10 worldwide college. 2 years C++, Python, iOS experience in well known company on high profile project. Internship at start up with VC funding before that. Github profile with open-source projects, own projects etc. Started blog etc...basically everything that is recommended.
Studied for 5 months (up to and including interview time) and did projects whenever I could. Applied to 40 companies in San Francisco. Got 12 straight no thank you, 2 interviews and the rest ignored.
Started process on Jan 1st 2014. Had interviews at Yahoo! and Palantir. Former, pulled the plug when the H1-B deadline was looming and they felt it wouldn't be done in time. They suggested a workaround to work out of London and try next year and then they pulled that idea a few days later when they didn't have the team in place to support it. The latter, I did 1 telephone interview which went fine, then on-site where I was quizzed for 1 hour in functional programming (never done any before and job is in Java) and had to code not on paper, or a whiteboard, but the glass conference wall...
Will have to wait another year.
This isn't really accurate. The company is not giving you 0.1% of the company. It is giving you the option to buy the gain on 0.1% of the company above that value at the time you start. If the company never gains in value, your options are not worth anything.
When I last was searching for an out-of-state (albeit not California) job, every company was adamant about arranging all the flight arrangements. It was very clear they did not want me to interview at other companies during the time. Even after I agreed to pay my own way, they still insisted on paying and have me fly out immediately after the interview. The stress of multiple flights during my short interview period definitely affected my performance.
I do a lot of interviewing (at my company). Here's other common misconceptions lots of candidates have:
* Quicksort is O(N^2) -- don't make that mistake.
* There are plenty of "faster than O(NlogN) sorting algorithms, but they're all special cases. (Radix, Merge on multiple processors, etc.)
* Hashing is not a panacea. Collisions are always worth mentioning.
I feel like a coward for being afraid of this stuff.
Anyways, I just wanted to get that off my chest.
Your post is directly applicable to my current situation, and has reassured that I am not "average outsider" and should continue pushing my dreams, despite of being recent graduate in UK.
Huge thanks for sharing your experience and giving advices to obstacles :)
One simple practice is at the end of the interview when you get the, "So what's the salary range you're looking at?" question, I always give them about 5-10K higher than what I'm currently making with the caveat, "But I'm always open to negotiating." which keeps the door open for the company/agency to get creative with incentives or other valuable options to bring you on.
You shouldn't feel bad about asking for extra stuff. 95% of the developers companies are hiring are just taking what they offer them. If you negotiate, companies are more likely to give you some additional extras. You just have to ask for them.
The best way to have leverage to have another opportunity in hand. Then you can say, "I will be fully transparent, and won't play any games with you, but I do want you know I'm talking to someone else too." That lets them know that you are valued. You just have to be polite, and not turn it into a multi-stage bidding war. But it does give you the ability to say, "I love your firm. I don't want to start a 2 week cycle of bidding, but if you could at least close 2/3 of the gap in offers, I won't have to worry about paying rent."
So much of the early 2000s tech interviews were full of brain teasers that either through sheer luck of the candidate or someone who read the popular book "How would you move Mt. Fuji?" would ever have a shot at solving them. Microsoft pioneered it apparently and Google took it to the next level. They even went so far as to post them on billboards for anyone "clever" enough to figure them out.
At some point they went out of favor and the new favorites became these multi-step dynamic programming questions, or quad-trie/kd-tree disguised problems. The unfortunate truth is, if you want to get a job in the valley beyond your first out of school job, you're going to need to study and refresh your brain on those last chapter algorithms. Make sure to practice doing them recursively as well because with 45-60 min interviews you won't have time to do it iteratively. Just like the OP mentioned too, it also couldn't hurt to practice writing code on paper in front of a friend.
The biggest thing I found writing code on a white-board vs. a laptop is that you lose all the things that make coding in an editor so much faster. You can't just erase a line if you need to insert something above it. You need to be extremely thoughtful of your order of operations from line #1. Usually what I found worked for me was writing a checklist of how to solve the problem in English, so as not to confuse the interviewer that I'm writing code/pseudocode. Then I rearrange the steps until I get a solution that works. From there I can quickly write out the actual code that then becomes the easiest part of the interview.
So the BIGGEST tip I can add when doing white-board coding, write as polished as you can. Interviewers always seem to proclaim they won't judge your chicken scratch, but I've never been in a feedback session where someone joked "his handwriting was so messy, but I was very impressed." In fact I've always heard the opposite, "wow, they wrote crap all over the place, even though they figured it out it was very unorganized, so I dunno, it's a maaayybe from me."
Also, when asked one of these questions, DO NOT take your time trying to be clever upfront. Get the worst case on the board, 1) it will give you and the interviewer a chance to to talk about it and 2) they will want to ask you how to optimize it anyway.
I'm currently in Silicon Valley from Canada on a 2.5 day trip, with 4 interviews in that timeframe, and it's quite fun yet intense.
I'd also say that if you're a self-taught programmer (I'm an EE), it's worthwhile to read a book like Intro to Algorithms[1] cover to cover before you start doing technical interviews. There are just too many CS101 concepts that you'll never run into even after years of programming.
[1]: http://www.amazon.com/Introduction-Algorithms-Thomas-H-Corme...
EDIT: Nevermind, I think it means the value of the sum is on the order of n^2
In practice I have learned that being CPU bound will turn things around faster than paging and thus for things that involve a sufficiently high number for n I prefer to avoid hashes and O(1) "speed ups." The less I store in memory the better, especially on servers that handle lots of requests simultaneously, at least for servers that aren't meant to be a memory store like memcache or redis.
Also, complexity analysis/algorithm questions that are asked in the interview setting is not rocket science...
I remember when Buffer "open sourced" their salaries and revealed that they were below the market rates in the Bay area(for Buffer's bay area employees).
Despite the great story of your general interview process, I am quite interested in the hiring process of Stripe. What is its interview like? What do you think probably make you got the offer?
$Xk/year 10,000 options
This is literally equivalent to:
$Xk/year $100bn in monopoly money and bingly bongly bangly boo"""
It is incredibly dishonest and disrespectful when startups job offers hide information about the value of their equity. I know some investors are encouraging this behavior, but please have the courage to stand up to them. Employees have a right to know the fair market value of the compensation they will receive for trading away their time and labor.
Hedge fund interviews are a lot more intense and technically difficult (and you feel good when you pass) but don't come with the VC-fueled, youthful arrogance of a proper Valley company. Hedge funds also don't try to lowball you with insulting junior positions because you're not from California or you don't know the five 3-year-old technologies in their stack in detail. If you pass their interviews, the hedgies take you seriously. Most of these VC-funded companies, on the other hand, don't really respect most of the people they hire. They sell aggressively, but the options offers turn out to be ridiculous (sub 0.1%), relocation pay is nonexistent, and, if you're not a Valley insider, the positions are often pretty terrible, as you discover if you ask the right questions.
If you can deal with arrogance, you can probably get a good job in the Valley after enough time. But you'll have plenty of experiences that leave you thinking, "How is this company alive?"