How to Pass a Programming Interview
blog.triplebyte.com
blog.triplebyte.com
Being a good programmer has a surprisingly small role in passing programming
interviews.
And that just says it all, doesn't it? I agree that interviews should test candidates on certain basic skills, including (time/space) complexity analysis. But do you really learn anything by asking the candidate if they can recite the time complexity of a moving window average algorithm (as I was asked to do by an interviewer yesterday)? What does the candidate's ability to code a palindrome checker that can handle punctuation and spaces tell you about their ability to deliver robust, maintainable code?I don't have the answer, but I just don't see how the questions typically asked in programming interviews give you a good picture of the candidate's actual programming ability. I much prefer "homework" projects, even if they involve me working "for free", because I feel like they ask for actual programming skills rather than the "guess the algorithm" lottery of phone screens and whiteboard coding.
I think this is one of the most inane things to be asked during an interview. personally, I've never found myself in a situation where I truly needed to choose between a vector/map/list/hashmap. Or had to find the O(x^n) and replace it with O(x^2)
Obviously it depends on the application, but many jobs are simply maintenance coding: find bug, fix bug, test fix. Often times it makes absolutely no difference whether you use a list or a vector, or else you'll get the paradoxical "vector-is-always-faster" because of locality of reference.
In my (admittedly limited ) experience, most of the effort is spent simply making it work, not being bogged down because you used a map instead of a hashmap, or didn't know about some esoteric, bleeding-edge probabilistic data structure.
The other thing that really seals the deal for me as an inferior interview question is that you don't need to have a clue what O(x^n) is to wrap some code in a simple time call, see that the code you think ought to run in microseconds is running in seconds, by visual inspection notice stupid nested loops, and fix it. Self-taught programmers may not be able to say "O of exx to the enn" but that doesn't stop them from fixing it.
So... seriously, what good is the question anyhow?
You seem to be confusing "knows how to say 'oh of enn squared'" with "the loop gets slow when I iterate over a lot of things". One is generally a product of education, the other, merely experience.
The idea that a thing can only be learned in a classroom is perhaps in the top ten most pernicious ideas in the modern world, and probably one of the more surprising ones to show up in that list. You do not need special courses to discover that your code runs slowly, and as I've seen often enough, having had those special courses does not confer immunity against writing slow code.
Now, I am also a believer that formal education has its place, and if you are going to get a formal education in computer science, big-O analysis absolutely must be part of it or you are literally missing out on an entire rather important sub-discipline. But the idea that it's some sort of touchstone between Good and Bad programmers is just ludicrous nonsense. Slow code is slow. There are abundant tools that can be used to figure out why. If you can't work out why your O(n^3) loop is running slowly after a couple of years of practicing the art, you don't need formal education, you need a different job.
Then I noticed the test was expressing constraints using time/space complexity, concepts I was completely unaware about for my previous 15+ years in the profession.
So now I am reading about algorithm theory face-palming at the realization I have reinvented the wheel many times during my career instead of just re-using a PhD. researched algorithm.
It's like, yeah, you don't "technically" need to know any 2+ syllable words to be a programmer, but you're really not helping yourself by avoiding them.
Sorry, but this is just wrong.
I can guarantee you that BigO is very often used not "in theory", but in practice, to find real-world performance problems. And not having "situational awareness" of certain commonly occurring complexity profiles can be a significant source for performance headaches and technical debt.
One trivial-seeming, but frequently occurring example: not knowing when to use hash maps.
In fact, many people solve performance problems (including both those where order-of-magnitude performance really is the most important factor, and various other kinds) not by using a profiler but by, you know, understanding the code and thinking about it. Being as profilers, while they can tell you a lot about certain kinds of performance issues, are still generally quite limited in what they can tell you.
Is it the silver bullet people seem to think it is? No.
Of course not, and I've never heard anyone saying that it was, either.
It may be something that's so intuitively obvious to you, that you don't even think about it. So you naturally use the hashmap, where someone else might try a list and then start doing a lookup in a loop. Then while that particular instance might not break things, it'll slow things down, so overall the application feels sluggish instead of snappy.
But I think it's more telling if a programmer knows how to profile his program and find the performance bottlenecks, recognize them for what they are, then fix them appropriately than if they can recall a specific optimization for a specific use case on demand.
What you want the person to identify is that they've made your simple iterative checkout process into multiple unbounded tree traversals with no circuit breaker.
Knowing that searching the tree is O(log(n)) isn't very helpful when your problem is an inability to identify that you've made (n) an unnecessarily huge problem space.
This entirely depends on the kind of product you are working on. When you get to a large scale with any programming project, optimizing computational resources will cut costs, and can often add value to the customer as well.
I'm not saying I'm pro writing-inefficient-code, but if you want to talk big-O during an interview, I"m going to roll my eyes about as much as you asking me who the 19th president was.
Some people really do never advance past a certain point, but a lot of people write someone off as mediocre when they're just still in the process of gaining skill. Also, they only assess ONCE, which is pretty bad if we're trying to establish how good you are forever and always.
If your job is mostly frontend, yeah, you probably won't need to worry about this problem. But if you're hiring somebody to work on graphics? You better be doing complexity estimates in your sleep.
I don't think though you need to know that for example fastsortx is n log n in the best case off the top of your head in an interview situation. You should be able to reason your way through why it is faster than some other sort though.
Or was it a more complicated moving average case (exponential etc) where the algorithm was given and you were asked to determine the complexity?
Figuring out how to efficiently calculate a moving average seems like a good question for basic maths skills to me.
About complexity theory, there is already a lot of discussion about it's relevancy in the comments. My point was meant more along the line that, if you value a basic understanding of complexity theory, the question asked of the GP seems reasonable.
However, this second route also comes with a number of issues. The most annoying of which in my experience is the amount of time investment each interview requires from the candidate.
At least in the traditional technical interview, interviewers and candidates tend to be roughly equally invested in the interview process in terms of time spent, so interviewers have to value candidates' time because failure to do so will end up wasting their own time as well. In take-home projects, this balance in time investment completely breaks down, and thus there's very little left to discourage interviewers from issuing ridiculously time-consuming projects.
I've done a few of these in the past, mostly to get some practical experience with a new framework & ecosystem I'm not too familiar with yet, but I think in the future I'll likely just politely decline any projects that looks unreasonably time-consuming, or at least try asking for certain adjustments to the spec first.
When I went through the their take-home interview process, there were 4 projects to choose from, with only one having anything remotely to do with my area of expertise (it was a multiplayer game, and I was looking to work as a web front-end/full-stack developer). For all their talk on how you should select a practical project to talk about because it correlates better to ability to get real work done, it's really rather ironic just how utterly academic and unpractical the projects they offered were (that game was literally the most practical one on the list).
Now they tell you that you're expected to spend at most 3 hours on the project. This might be true for some of the other more academic projects on the list if you had any expertise in the respective areas, but it definitely wasn't true for the multiplayer game project I chose, which had a non-trivial front-end and back-end component, for which testing alone could easily take 3 hours (Or maybe I'm just bad, which is definitely possible, but I've asked many of my more experienced peers how long they think a project like this might take for them, and the lowest estimate I got was a whole work day of 8 hours).
Now they also tell you that it's OK if you don't finish the project. There was also a second part to the interview where they may ask for extensions to the original project, where they'd give us more time to work on it, so I assumed if we don't finish, they'd ask for us to finish the original spec along with some extensions for the second interview. Since I had already finished the front-end component for the game, and had worked on the project for well over the expected 3 hours, I decided to call it a day and work on preparing for some of the other interviews I had that week.
However, that it was OK to not finish the project for the first interview might have been an outright lie. I won't ever know for sure because I was rejected after the first interview for not finishing the back-end as well as being unable to resolve some performance issues the interviewer pointed out (which at no point in the interview did he even ask for me to fix, so I assumed fixing that performance issue would also be a part of the extension). Incidentally, I went back to the project a while after the interview and resolved the performance issue in 5 minutes flat.
The whole process just left a rather bitter taste in my mouth, which was all the more disappointing because I went in with great hopes after reading all their great blog posts on HN. For anyone else considering Triplebyte, I'd highly recommend going with their traditional interview route until someone at Triplebyte can confirm the process has changed for the better. At least with that route, if you get rejected, you'd have wasted less time in the process.
Yeah, they always say that -- but it's never really true.
They should just be honest and say "If you don't finish the project in time -- then don't feel bad, but perhaps the test isn't right for you, at this time. Feel free to apply again in 6 months."
I don't understand this. No company is so special that I would be throwing away hundreds of hours in pointless meaningless work every few months just to join them! Unless I'm in need of a job again.
And whats the big deal even if I join them after six months, I'd be working to maintain some code, fix bugs and may be occasionally do a big important project.
Its not like they are sending Neil Armstrong to the moon all over again that I would like to be a part of this history.
After being invited twice for Google interviews, I mean really invited by their HR, not me applying for them. On both occasions I failed the process with their stupid questions.
I started replying to their HR, if I am so good to be invited but on their eyes unable to devise a inode search algorithm for unlimited hard disk sizes with a specific set of hardware and search time constraints, over the phone interview, then why couldn't they just please stop inviting me!?
That was the last time I heard from them and I don't care a bit about it.
Curious -- was this problem reasonably related to the kind of work you'd be doing in the role you were applying for?
Or did they just want to find out if, you know.... you had that "spark"?
But thanks. Another data point added to what others have been saying about their hiring process.
I do not know who you are (and would of course not post details here), but from what you say, it sounds like we did not think that you were on track to finish, and has some concerns about the design that you selected (we track whether a number of milestones in the game have been reached). It is totally possible that we were wrong. We much prefer to see a working front-end / back-end combination that has missing features than we do just a front-end or just a back-end.
Again, I apologize for your bad experience. I hope we can make the take-home interview better in the future with some tweaks.
None of them actually tried solving it within the constrains that a candidate is put through.
In terms of project choices, to me, it seems like you guys erred on the side of choosing projects developers would find interesting and challenging technically over projects that are practical and accurately represent the kinds of work most developers will actually be hired to do. I'm not going to post the details here for obvious reasons, but out of the four projects offered, only the multiplayer game was even remotely relevant to front-end/back-end or even application development in general, which are areas that probably account for the vast majority of development work available from startups. I realize there needs to be a balance to be stuck here, but in my humble opinion, as a recruiting firm, you should be erring on other, more the practical side in terms of project choice. I applied to Triplebyte to find a job, not to fulfill my intellectual curiosity (I can do that better on my own time without needing someone to assign projects to me).
In terms of project scope, I'm not really qualified to comment on the other choices, because they were way outside my area of expertise, but the multiplayer game definitely didn't feel like a 3 hour project. As suggested in another reply, I really hope you guys can actually give the project a try yourself and see what level of completion can reasonably be expected from three hours of work on something like that. Take whatever times reported by candidates who have successfully completed the project with a grain of salt, because people will have a tendency to understate the level of effort they spent to make themselves look more efficient (no matter how much you tell them you don't care). Here's another possible idea for making projects that take reasonable amounts of time to complete: just take your traditional interview questions and slightly extend them a bit with extra features, and simply expect better polish, architecture, test-coverage, and overall code quality, etc during the code review.
Anyways, my experience with Triplebyte's take-home interviews definitely didn't leave a great impression, but I still recommend you guys to my friends and colleagues because I do want to support what you guys are trying to do. Hopefully you can take some time to revisit some of the issues people have mentioned and make the necessary improvements. I'm happily employed now, but I'd love to give Triplebyte another try the next time I'm looking for work. =)
Larger projects take up more time and introduce a larger possibility that some matters of opinion or taste will impact the candidate's performance. I don't believe differences in taste are important as long as the candidate demonstrates that he is able to comply with a defined style guide.
The actual test is going to depend on the position at hand, but one of my favorites is a very simple program that asks the candidate to use GitHub's API to display the list of public repositories under a user-inputted username. That's it. I tell them they can use any language they want.
This simple test gives all the information we need about the basics:
a) the candidate is able to go online, provision himself an API key, find docs, and reference those docs to see an external vendor's API format
b) the candidate is able to use that information to craft a program that successfully interacts with the vendor's endpoint
c) the candidate is able to present the information in a concise, desirable manner.
d) the candidate is able to do all of this with a simple 1 paragraph description of the project.
The choices the candidate makes in the process of completing this simple task tell you a lot about his process, style, habits, and preferences, even though the project is very minimal in its actual requirements.
I've had people give me web apps, command-line apps, and GUI apps that accomplish this same goal. Many candidates would go above the requested specifications and many candidates would reply the same day they were given the test, which to me was an excellent signal that they felt their time was respected and that we were doing a good job of engaging them and making them interested in working for us.
As I stated, this test is not appropriate for all positions, but I think most tests should be modeled after those principles. Give the candidate room to express himself and demonstrate relevant practical knowledge.
I hope you'll consider a minimalist project like this over something like "design a multiplayer game ... in 3 hours".
Have you considered requiring a thought process journal as well?
I'm now in a position where I'm interviewing and helping shape my organization's hiring practices. We've debated all the different approaches, some people like projects, some like algorithms, and some don't want to do either to get the job. At the end of the day, I really just want data on a candidate's ability so that I can say Yes.
There probably lies the disconnect. For me, interview projects should assess how well I could perform in the position I'm applying to. And thus, if nothing else, interview projects should be relevant and practical.
It seems to me that Triplebyte's project choices were made based on how interesting developers might find them, and sheer technical challenge. Some might appreciate this, but personally, I'd rather learn new skills and challenge myself on my own terms.
There's also no disincentive for interviewees to spend an unreasonable amount of time on the project. So the test is biased against employed people and/or people with kids.
This can be easily countered though. Send out the assignment at a predetermined, convenient time and require it be returned an hour or two later.
This honestly sounds like a great idea to me, except maybe with a slightly longer time allowance to remove some of the pressure. Definitely hoping more interviewers will start to adopt this method for take-home interviews.
But this method also hinges on the interviewer's ability to design projects that can be completed in a reasonable amount of time and still give good insight into a candidate's skills. I think it's safe to say this will be a difficult task for most interviewers.
It doesn't need to be a time trial. If you're impressed with the code and hire the candidate, worst case is you get someone who takes a little more time but writes great code.
Having a time limit of a day or two is fine if the actual project should reasonably take a couple of hours, but if the project actually takes more than a whole work day to complete, then that's a different story (in my humble opinion, anything that would take more than a couple of hours is an unreasonable demand on the candidates time unless you offer some kind of compensation).
I don't see any problem with this, as an interviewer. The take-home is supposed to be an example of the work the candidate does, they should take however long to do it. I want to see the best-case scenario of the code they write (given the problem at hand, etc, of course). The entire idea is removing the time pressure.
The issue for the interviewer is missing out on good potential hires because your selection process is biased against people with little free time.
I have a family and I'm doing part-time study in the evenings. If I'm looking for a new job, then I can probably find time for 1 exercise a fortnight. If one company tells me they have a "4 hour assignment" and the other a "1 hour", then I'm far more likely to do the 1 hour exercise and pass on the long one.
And if I do the 1 hour test, I'd expect to be assessed accordingly. If you're comparing one person's output after 1 hour with another who actually spent 5 hours on it, then you will be more inclined to hire the person that spent longer on the project, even though that's not really going to corelate with on the job performance.
Except that these places very frequently tend to either (1) misstate the problem in some major or minor way, or (2) wildly underestimate the time required to produce a professional quality, bug-free, bulletproof-tested solution. Which can be easily countered by having one of their own team members sit down and take the test first. But of course, none of these places ever do that.
(Well, not "none." I'm being hyperbolic. I just mean in that in general, they probably estimate the round-trip time on these programming guizzes the way they do micro-projects on their own jobs -- as in, "Oh, I can do that in an hour" -- but in real life, it often takes 2x-3x longer).
At my employer we send out homework exercises, and I personally did the backend developer exercise before we sent it to anyone. I did this specifically to test how long it took. (For the frontend exercise, we didn't have anyone skilled enough on staff to do it, which is why we were hiring a frontend dev).
You have to ask someone with no skin in the game.
It's how the universe works, basically.
Beyond that, I think "a few hours" is a bit too much to ask for, especially since you are presumably following up with an in person interview centered around the assignment. That's a big time commitment, and the commitment on the assignment especially is very asymmetric.
I'm not a big fan of assignments for this reason. They are just so asymmetric. I've been given interview homework that was supposed to take "about an hour" and it was more like 4 to 5 in reality. It felt like an unreasonable time request. I did the assignment, and did in fact tell them it took considerably longer than their resonates. I was invited for an on-site after all that, but declined for other reasons.
(1) It may seem counterintuitive to some, but my own general policy is, when it comes to little stuff ("how long did it take you to do X"), you just have to trust people, to a certain extent. Sure, some people may blatantly or grossly lie. But most likely these people will reveal their slipperiness in other ways, very very quickly.
Meanwhile -- and I think people are quick to overlook this -- playing the "policeman" role in every transaction with the candidate brings substantial negatives. By definition, it's adversarial. And generally there are (nearly always) non-adversarial ways to get the same information about the candidate ("Are they basically honest?") you're looking for. They take creativity (and an ability to read emotions and pick up on other signals), but they're there.
(2) Much bigger -- really, there's no need to sweat about the time to completion at all. Just look at the quality of the code.
It all just comes down to the fact that everything is interconnected: Good people generally turn out good stuff in reasonable amounts of time. When you're looking at good code, there is, I find, an intrinsic aura of ease and comfort which shines through it -- such that you just can't imagine it took them very long to produce it. Everything just flows -- just like it does when you talk to them.
Mediocre (and dishonest) people, on the other hand... never produce good stuff in virtually any amount of time. Sure, they can take the whole weekend to polish off their code... but it will still look bad, or at best, "Meh".
There might be some false positives (or outright frauds) by this approach), but I suspect very few. And those that do slip through, are easy to spot by other means (such as asking them to talk about their solution, for even a couple of seconds).
As to how likely it is that people will lie, given that we've hired several people who did this homework and they've proven to be as competent as we believed, there's at least some anecdotal evidence that some people have not lied.
Isn't asking people to fly out for 6-8 hours of interviews (which effectively takes 3 days minimum out of your life) a much greater burden than spending 2-3 hours on some coding which you can do at a time of your choosing? (Followed by 2-3 hours of video chat interviews spread across multiple days, no flying required).
Also, just to clarify, the homework problem is _not_ something related to our business. The solutions are of no business value to the company.
I am not saying that you are wrong, but applying to Google does sound like it will have many benefits above your average company.
As to how much we pay ... Our pay is very good, and all but one of the positions for which we've had the homework requirement have been telecommuting as well. It's actually a pretty desirable place to work if you like good pay, telecommuting, working at a small company, a low pressure environment (we've been profitable for many years), and various other perks (training budget, flexible hours, blah blah blah).
There were no other limitations put.. "bonus points for stream based input" "bonus points for test cases" ... only a couple people actually delivered a "working" solution (one that ran and outputted anything), none of which had the correct output (one was close enough), and none had any tests.
It was truly something that should take a "skilled" developer a couple hours. And not something that should be entirely alien. To say the least, I was really disappointed with the results. I did the project myself in about 2 hrs, with test cases, 100% code coverage. (before I even gave it out, it was as trivial a challenge as I could come up with for a real world problem).
Why should I have to pay the couple dozen people for their 3 hours, when none delivered a correct solution?
In the end, the person with the closest to correct solution, was the one with the least experience... that person got the job.
And I had someone on my previous team make a point of bringing up this fine point at a meeting, also ;)
Pull down this data from Instagram API and create a tagcloud. Should only take a couple of hours.
Except working out how to register and authenticate Instagram's API took me over two hours, than after faffing about with it I realized I only had some sandboxed version that returned metadata and not the actual data I was looking for.
The task would probably only take a couple of hours if the whole environment was set up, but the set up was the problem.
Hackerrank is even worse. They have strange ways of wording the questions. I have to Google around to work out how to use their input and output (I work with databases all day long, not reading and writing to STDIN/ STDOUT). No step through debugger (which makes a lot of sense for the algorithmic type questions they ask). Cut and paste only works in some browsers.
No one expects you to set up a database and connect to it in that sort of timeframe - yet I would probably manage it better as I do it regularly.
That was my rough estimate for the prevalence of this craziness, to.
...a math PhD told me "hey, I got one more ya..." and proceeded to give me a mis-articulated mathematical search problem which -- going by his own statement of the problem, ended up having as its "solution" -- an empty class.
Maybe the least worst answer is to have people who have been through the hoops before, and can empathize with candidates, running the hiring processes.
1. Show-off quizzes are of limited relevance.
2. Take home work is a huge stressor for people with limited amounts of outside time.
3. Open-source contributions are a) too restrictive as a filter, and b) favor people with lots of time, just like #2.
4. Personal connections narrow the pool that you have, promote nepotism, and tend to exclude people who are already at a disadvantage.
5. Looking at previous jobs screws over lots of junior people and just means you're depending on the last interviewer's shitty decision.
I read it and told them (a) I had no interest in a firm that behaved that way, and (b) I had no interest in a firm that didn't understand what configuration management tools were for.
I had a friend of mine who told me her company doesn't use online programming tests (like hacker rank) because she doesn't think legit programmers would bother with positions that required them.
Having taken a couple of these on-line automated tests, I don't think I'd take them again. Problems which I'm sure I had written correctly, dealing for edge cases and testing in browser; I submit to get like a 6%. Programming simple things in front of people in an interview I do fine.
An hour, I'm fine with. It's less than what I'd schedule for an interview, and far less than I'd schedule for an in person interview (which might include a flight out). On the other side of it, though, I'd be concerned about cheating. It wouldn't be too hard to hire someone to take the test for me, I'd imagine.
Not really true unless you go to your interviews completely unprepared :-)
All in all, it's at least an hour of prep time needed, and that's only counting my time, not the time of the other interviewers, managers and recruiters.
Don't get me wrong everyone takes whatever time she/he needs and comparing results and time spent is hard unless you only look at "does it work" which in many cases does not do the work justice (and may not even be the most important metric in the long run). For that reason take-home assignments may be better than the almost comical interview often described on HN but they have their flaws that make them far from ideal as well!
I think it is hard to judge the true performance of a potential employee in a company team without actually having the candidate be part of the team (and even then it'll take a good amount time before someone settles in). Some folk may not be the best programmers but are good catalysts in a team, smoothing relations between other colleagues and increasing team output overall. Or they might have a habit of happily taking up tasks that are wildly unpopular and thereby, even if they are not the most performant, solving problems colleagues or perhaps a faster candidate wouldn't have solved. I could go on about this but I think it's clear what I mean.
There is a lot more to a role as programmer than just programming and that is often completely neglected in these discussions.
Some companies are trying to answer this issue by signing a potential employee on for a 2 week "trial," where they hopefully get paid. The trouble there is figuring out how long a trial really needs to be to get a good idea of how that person works and fits in with the team -- too little and it's still a crap shoot, too much and you've already essentially hired them.
In the meantime, test trial runs only work for developers currently out of a job; how do I skip my current gig for 2 weeks to go sit at a potential new employer's office? I certainly have no safety in quitting to go do it since I may get dropped after that two weeks, and there's only so much vacation you can take before you run out of personal time.
[Edit: corrected typo]
For example I had one interview where I struggled to complete a WPF test project simply because it was coded in a way i've never done before using controls I've never used and the test was estimated to take 10 min. Meanwhile in my bag on my laptop I had a complex WPF solution i've been working on in my free time for months as a possible product to market and sell which more than showed my competence in the platform. People in my interview didn't even want to see it on pretext that they have no way of knowing it's my code.
It's generally inappropriate for someone to ask you to do more than a day of work for a take-home hiring exercise.
Waste of time also, especially if you factor in a 2 hour commute each way.
They might have a different point of view as to the quality of your work. Or they may have taken other factors in consideration (your portfolio, communication style, etc).
But not contacting you with any kind of a status afterward is definitely shabby, on their part.
And asking you to do a second assignment without taking a moment to evaluate your first (and apparently without bothering to tell you in advance that not one, but two or more "quick" assignments would need to be done), all the more so.
ressource AClass::CopyACriticalRessource()
{
{
std::lock l;
} // Optimization for the lock.
return ressource_;
}
Having a good understanding of every aspect of your architecture, taking your time instead of rushing for blazing fast (O(1)) but hacky solution, always having in mind that someone must have already solved your problem... these are some valuable skills not coverable during a 1h interview in front of a white board. I would like someone googling a solution in front of me during an interview, trying to UNDERSTAND it, check its complexity, compare it with other search hits, adapt it to his problem, ask for my review.The best technical interview being a homework with enough time for a normal human being, requiring tricky algorithms to solve it in a fancy way, a good architecture and great computer-science knowledge in general. Afterwards, a code-review/interview of 1 hour with debriefing on all the choices.
I helped a group within my organization with their hiring process recently, and we had pretty good success with assigning a short "take-home" exercise, vs. trying to haze them with a programming problem over a google hangout interview. A problem focusing on a small part of what that group does, but scoped to be doable with 1-2 hours of work.
"Hey here's a fizz buzz question, if you feel confident answering it now go for it, otherwise we'd be just as happy for you to do it in a take-home fashion?"
Everyone else, this sucks!
Doesn't this have exactly the same problems as homework projects? You can still copy and paste or plagiarize.
With 'weighs heavily' I mean that it influences the criteria for which those methods are good for.
The downside of this is that interviews are more unstandardised, which is a trade-off worth considering.
No -- we like solving problems. Especially those that have a legitimate context (i.e. are explicitly linked to some actual, real, business or social problem). And for which our skills are truly relevant needed (specifically, for which no one has a readily available answer, at the moment).
But made-up "puzzles"? For which the asker already knows the answer, so they sit back and watch us dance?
Not so much.
On the flip side, my experience with take home projects is that they are much more of a hazing/pressure cooker ritual - at the least, the time pressure of a Google/FB/etc. interview lasts only a half hour. Most will expect candidates to spend a huge amount of time, which many won't have if they're actively job searching, or are busy people in general - I prefer to pour that extra time into open source work, since at the least it benefits others. One company assigned a project to me once that suspiciously seemed like implementing the company's whole business model.
It doesn't take long to figure out if someone has the right skills oftentimes if you ask the right questions - candidates shouldn't be penalized for companies' ineptitude in assessing interviewees.
As someone who pushed his company to adopt a "take home" assignment for our interview process, it should be perfectly reasonable to reply with "here's my commit history on a project relevant to what you're hiring for."
I much prefer giving (and taking) take home assignments because it lets the interviewer see _what someone will actually produce on the job_. If you can do that without jumping through our specific hoops, great. If not, that's why we have the assignment.
It also at least somewhat ameliorates the pressure cooker of an interview, which many people cope with poorly. It can be hard enough to communicate clearly when all eyes are on you, let alone get your thoughts together and solve a logic problem. If that's actually analogous to your work environment, well...
Consider this: We need to find the most shared URLs on Facebook in last 24 hours.
I can perfectly see why a lousy coder might achieve this objective better than a kick-ass one. A coder with average skills quickly figured out that Buzz-sumo has a public webpage with that content which can very easily be scraped using phantomjs. Job got done.
Another great coder suggested to me I should buy $10K per month Facebook firehose. He is not wrong and that is a good solution too but he failed to see that we are building a POC and not a full featured product.
Needs of companies are complex, many times if you can pay great salary just having a filter for IQ is good enough. But in most cases I think it is far better to look at an individual and judge.
This method of interviewing has been around ever since, and is going to be around for the foreseeable future. Nobody loves it, including the interviewers, but there just isn't a better way to do it at any sort of scale. Especially when there are much bigger problems to solve when you're running a business.
It's best to take the bull by the horns. I run http://InterviewKickstart.com, which is a bootcamp for preparing for such technical interviews. We do almost exactly what is in the blog post. It works. Spectacularly.
I want to take the time to talk to everyone who is interested in the course. Because the concept is new, people have all sorts of questions. Can't possibly address all of them in writing. I don't have a team of salespeople and haven't spent a penny on advertising.
If you still prefer email, please feel free to send one. It's on the site. It may just take longer to do back and forth.
Thanks for considering!
Then maybe it's not such a good concept.
After all, it's an 8-week intensive course, mostly for CS grads, that grills you hard, and is not cheap. As a consumer hence, I'd highly prefer to talk with someone. Not to mention, all educational institutes have an enrollment process that needs you to talk to a human.
At some point, when it becomes more common and well-accepted, we will condense it, but it feels a little too early to do so.
Pricing is also nuanced based on whether you're an experience engineer or student, whether you're taking the course remotely or on-site. Plus, there are recruiting firms who have access to our pipeline, who return a significant portion of our fees to you directly (we don't take a cut).
And those who are super curious, can always google it :-) In fact, most people who call have already googled for it before calling.
Rest assured, we're a real business, running classes every week. Batch after batch. Those who work hard, are getting their work rewarded.
This is actually a trivially easy question that gets to the heart of whether you understand the point of moving averages or not (that you can update a sum by subtracting out the value leaving the window and adding in the value entering the window).
"Programming ability" isn't one dimensional. Whether or not the above question is useful depend entirely on what skills are important in a candidate.
Granted, by this time, we'd been through a couple of other problems, and time was running short, but I still think it was pretty unprofessional of the interviewer to let frustration or any other sort of negative emotion show during the interview. That, more than anything else, contributed to my own frustration and perception of unfairness in the entire interview process.
However whiteboarding is also terrible.
I prefer getting a real world / work related scenario problem, and solving it TOGETHER with the interviewer: if I'm stuck, as opposed to a hackerank codility challenge, there is a good chance they will let me know and hint in the right direction, and they will also see how I communicate, how I think, how I respond to hints. An online challenge can be easily done by the candidate sitting next to 2 more senior coder friends who help him / her along the way. Unless it is proctored, you can never know. I had people whispering someone answers during a phone screen, people typing my question in Google and reading me the first result (I google it at the same time).
I think that giving you a hackerank or codility take home problem unless this is an entry level job will simply drive away experienced people.
If someone can pass your take home test easily, you will still need to phone screen them before you fly them over in most cases, and if they are that good, they will probably prefer companies that don't waste their time and jump straight to the real person phone screen.
However, some people are more nervous when someone is watching over their shoulder, so here is what I would do: I would ask the candidate what they prefer:
1. work related a hands on assignment with plenty of time (e.g. should take 30 mins but you give 1 hour) and ability to search online and ability to compile use an IDE just like in a real world scenario
2. Skype screen with a lot of small questions on a topic they really feel they know about (no Googling allowed), and a relatively smaller coding challenge (something you can code in 15 minutes)
3. Work related scenario but with a real person, where there is no one best answer to the question, but more of a balance of tradeoffs and more open ended but 100% involves coding (just like most phone screens, but more work related and not just puzzles)
4. The standard puzzle challenge but alone - you have 30 minutes to solve the problem once you see it (Googling is allowed or the test is proctored to make sure you don't, then you get more time)
5. the classic - a cracking the code interview kind of question, but with a real person, code sharing (for crying out loud not google docs, at least have your candidates use something that offers color coding and easier indentation) - some might choose still this
If you let your candidate chose what is best for them, you already made an amazing impression, and you might have much less false negatives.
Just my opinion
The most practical thing is to work with it as it is.
No, but it may be a good question, anyways. A good interviewer probes you about things you might encounter in the job to find the point where you cannot recite things, and looks how you handle that.
Having said that, I don't understand the focus on coding interviews I read on HN. I don't know whether it is cultural difference between the USA and Europe, whether I just haven't noticed how you are supposed to prepare for interviews, or whether I am too smart to need to bother, but when I apply for a job, I look up what the company does, try to figure out what its culture is, but do not prepare for the technical side of things. An interview isn't a one-sided affair of you being quizzed, it is two parties figuring out whether they fit together,
As a developer, I prefer take-home projects. As an interviewer, I prefer a few coding interviews, followed by a take-home project.
This is will allow members of my team (or myself) to get to know the candidate, evaluate the 'wave lengths', and how effective he/she is at finding patterns on the internet/books -- rather than thinking things up.
It also demonstrates to the candidate commitment on our side, and it naturally forces us to find problems of a proper size/effort (as we are spending the effort too).
We would not do it for all applicants, though -- only for once that pass basic screening / competency process (there are no trick questions or exercises there
I have not tried it. But in my next business venture, I plan to actually do
peer programming with the candidate.
As a candidate, I can highly recommend peer programming. One of the greatest interview experiences I had was interviewing with a local shop where the employee and I reimplemented a Set class using TDD and pair programming. The employee sat at the keyboard, so I didn't have to deal with not knowing keyboard shortcuts or the unfamiliar operating system (OSX), but he was very careful to only write the code that I asked him to write, and to let me make my own mistakes.It was one of the most enjoyable, and, dare I say it, relaxing interview experiences I've had. Though I didn't get an offer, I wouldn't hesitate to recommend that company to any of my peers who're looking to make a change. Also, like you said, it was a second tier screen; after an initial screen consisting of a more traditional phone interview where I had to write some Javascript.
I imagine there are tons of false negatives, but it's nearly impossible for
a terrible programmer to get through a gauntlet of programming interviews.
Depends on what you mean by "terrible", I suppose. Yes, coding interviews do a good job at screening out the bozos who just can't program, period. The ones who don't understand the difference between a for loop and a while loop, or the ones who can't handle boolean logic.But I've found that even once you get past the outright bozos, there are quite a few programmers who can program quick one-off things, but have no sense of design or maintainability. They can deliver functionality, but deliver in a way that piles on technical debt and damages the long term health of the codebase. I think the traditional technical interview format ironically encourages this sort of behavior, by encouraging applicants to focus on narrowly solving the problem at hand, as quickly as possible, both in terms of machine time and programmer time, even if that means the code is an unmaintainable mess in the long run.
Put another way, think back to the last time you had to do any sort of whiteboard coding, as part of an interview. Are you proud of the code that you wrote? Would that code pass code review at your current position? If so, then congratulations. You're a better programmer than I. The code I've written on whiteboards has been pretty uniformly terrible. Sure, it met the correct Big-O complexity requirements, and it was correct, insofar as it produced the correct output, given correct input. But there was no error handling. Variable names were single letters. The functionality wasn't broken up into logical functions because writing additional function headers takes more time, and my handwriting is messy enough when I'm not rushing. All in all, it's code that you'd see in a prototype, or a programming contest entry, not a robust system that's usable by customers.
Lately, I've seen more and more such code being produced by new graduates not only in coding interviews, but also as part of day-to-day programming. There's an incipient attitude of, "Well this code would pass in an interview, so it's production ready." I find it deeply troubling, and my concern is that programming interviews are setting up incentives by which this sort of code becomes, if not normal, then certainly more accepted than it was in the past.
This is why I advocate so heavily for take-home projects. When a candidate submits a take-home project, you can be assured that they had enough time to design and code the assignment in a maintainable way. You can see whether they added unit tests. You can see whether they split the code logically into objects and functions, or whether they smushed everything into a 500-line main(). I accept that take-home assignments aren't as scalable, either from the interviewee side or the interviewer side, but I do worry about the long term effects on norms that programming interviews are having.
EDIT: grammar
Then in the rare case they question it, which usually goes something like, "Can you do it in Java? We don't use whatever language it is you're using there." I respond with, "Oh, will I be spending a lot of time at this job coming up on-the-fly with somebody's PhD thesis from the 60's?" To which the answer is always, "No." Which finally ends the conversation with me saying, "Well then you asked me to solve an irrelevant problem, so I'm happily providing you an irrelevant answer."
I have a fair bit of contempt for the pitiful state of technical hiring and assessment process out there. I think that comes mostly from my opinion that hiring is probably the most important thing any company or manager does, and that if any one of these companies/interviewers put even 10% the amount of effort into learning about educational/occupational assessment, psychology, and neurology that they do into obsessing over the dubious idiosyncrasies of the latest framework-rehash-of-the-month, then these terrible interview practices wouldn't endure very long, and we'd all be spared the indignity of the farce on both sides.
So how many of those companies made an offer?
> Being a good president has a surprisingly small role in
> being elected president.An interview is for both prospective employer and potential employee to meet and find out about each other. If you as a candidate notice something you don't like during the interview (including the interview itself), that already is a valuable information for you, as you already may assume things based on it (like, what kind of people you may find past the in-process interview as they all more or less were filtered in by it). So you can always stop and say "thank you" and walk away without wasting more time. You'll allow yourself to stay longer only when the interview's quality warrants it.
Welcome to Silicon Valley meritocracy.
And it's much worse for founders seeking investment, where there are no hard skills to test at all. It's almost purely about being the same class as the investor.
Which is why you get only upper class people funding upper class people, which then hire upper class people. The 99% only makes it in because there aren't actually very many qualified people among the "elite".
From http://paulgraham.com/colleges.html
> We'd interview people from MIT or Harvard or Stanford and sometimes find ourselves thinking: they must be smarter than they seem.
Should we improve it further? Absolutely, but to pretend that this isn't better than other industries is silly.
Silicon Valley is mostly funded by a few elite institutions, so it shouldn't be a surprise that they fund elite VCs, which then fund elite founders (and hire elite employees).
The funding sources in LA and NY are much larger and more diverse, so the elitism is far more diluted. It's a market opportunity that SV investors are so biased. Crowdfunding with equity might totally upset the applecart at some point.
yeah I figured this was how things happened :/
but this is just the reality when you let people feel free to choose and make their own decisions, they are going to find safety in numbers and people similar to them.
This explains the disproportionate lack of African American and Latino Americans in tech and the 'Bamboo Ceiling' that many Asian Americans experience in the corporate and academic world where they cap the number of Asian American applicants in Ivy league schools. Jewish Americans were also capped and barred from attending Ivy league hundred years ago but not anymore so this probably means that change will happen soon (even if it took a fucking century for racist ass mentality to change)
At the end of the day, going to a top university or working at an impressive company is always going to be a huge and relevant signal. It's difficult to see a problem with that.
> for a given level of performance on our credential-blind screen
No. Its more like a club.
Join this prestigious institution X, and then you shall enjoy life long benefits of employment, higher than average salary, bonuses, stock, opportunities to travel etc. Even if the person is actually the worst possible employee, or is barely productive. Merely have X on your resume, guarantees you life long privilege.
To know how worst it is you come see how it is in India. There are people who join IIT(Indian institutes of technology), a sort of a chain of colleges which is supposed to be Ivy league. Who says so? They themselves, because saying anything other wise means putting your own career in danger. There are coaching institutes, who train you just to get an entrance. Doesn't matter what you go and do there, in fact from there on you may do nothing in your life at all. The whole purpose of getting into those colleges is to enjoy lifelong privilege of having access to alumni who will ensure you a good career regardless of your performance.
The day you remove the real metrics of merit and put in artificial flags. People will do no real work and try to gather as many flags as they can.
Tech prides itself in being more objective, more rational than other fields but in reality is no different.
In other fields the effects of class and network are openly acknowledged, in tech you to even address the issue you first have to punch through the mythos.
In other fields the open acknowledgment of these issues has resulted in some action to de-bias the system (see: blind auditions for orchestras, residency matching for doctors). These efforts are imperfect, but nonetheless still way further along than anything we have.
Don't let the perfect be the enemy of the good.
In my last job, I was a Director of Engineering at Box. Every job post we put up, had hundreds of applicants (thanks to job-boards which let candidates apply to jobs like putting in a shopping cart). What do you think we, as hiring managers, are going to do at that point? We'll have to start forming biases. And if we have to start forming one, it's better to start with good schools and good companies. (I'm sure VCs have a more severe problem).
Problem gets worse when you're hiring at scale, and you want to hire before the holiday season nears, because if you miss the season, the company is doomed. At that point, there is almost panic. A resume with brand names on it, naturally gets higher preference.
Homework projects could work well if the hiring requirements are small, but won't work well when a company has to hire say 25 engineers a quarter, which we had to. At that point, the process becomes too long, and it's easy to lose good candidates to a long process.
This method of interviewing has been around ever since, and is going to be around for the foreseeable future. Nobody loves it, including the interviewers, but there just isn't a better way to do it at any sort of scale. Especially when there are much bigger problems to solve when you're running a business.
It's best to take the bull by the horns. I run http://InterviewKickstart.com, which is a bootcamp for preparing for such technical interviews. We do almost exactly what is in the blog post. It works. Spectacularly.
The process of DS/Algos doesn't necessarily find wrong people. It's just the fastest way to find engineers who are good enough.
In some sense, they almost secretly WANT you to succeed, by "standardizing" the process.
I don't go to a top school, but I've spoken with students in similar degree programs who don't do nearly as much as me outside of class to learn. In some cases, my breadth (and depth in some cases) of skills and knowledge surpass what those students have and know.
It would seem unfair to give them a pass simply because they had the chance to go to a "better" school.
Not to judge, but just an honest opinion.
But as soham explained, it's a trade off. You might miss the best candidate, but you will probably find the second or third best candidate spending significantly less time.
It's totally unfair, yes, but it's obvious why it's happening and there's not much that could be done to change it. So while the candidate is losing on this one, the company is (probably) winning.
In my experience it's even narrower than that. In many cases, there is a pre-existing relationship between the investor/founders.
I once met (in a restaurant, because we had kids the same age that were making eyes at each other!) a serial entrepreneur. When we got to know each other he confided that his investors were friends from school (some Ivy league school, don't remember which) that would give him money for some idea, he'd start the company then they'd find a buyer. He'd done this 3-4 times already, and he was about 40.
I know this example is one data point, but I've run across it in other situations, too.
If an elite school is intended to signal competence and brilliance in someone, then those qualities should shine through in a candidate without us having to know where they attended college.
Simply stated: we're hiring you, not your certificate.
If you handle invalid inputs for an interviewer who doesn't care about that, they're going to be a little annoyed by you going more slowly than needed. If you don't handle invalid inputs for an interviewer who does care, then they'll think you're careless.
I know some interviewers may be interested in helping but it's important to note assholes exist, especially at larger companies. There can be head games and assumptions made where they needn't have been. Even when I've been hired it can feel like if I'd done it again I may not have been. Try your best but don't be too upset if it goes badly either. Similar questions often come up too, it's actually amazing how many questions there are about linked list and trees.
Or the other way around: I can imagine someone thinking "this person spent ages on checking for invalid input; I bet their code is always bloated and ugly".
The problem is that programmers do this one way or the other based on personal preference, not because of actual differences in ability. Once you know that, it makes less sense to care one way or the other.
When I interview, I ask for psuedocode - I don't really care what language the interviewee uses, I do care that they can get their point across.
I interviewed quite a bit last year (on the hiring side). I was really surprised by the variation in pseudocode written by the candidates. Most wrote something JavaScript-like, a few stuck to mostly proper Java or C. But then one dumped a giant web of crazy on the board (but still made his point) and one wrote something that looked suspiciously like COBOL - still not sure if he was trolling me.
Thank them for their time, leave, move on to next company.
That's brilliant. Now I have to learn myself some COBOL just for that.
Unfortunately I think Haskell is disproportionately well-suited to these kind of toy problems, so being able to answer interview questions in Haskell doesn't tell the interviewers much except that you think yourself especially clever.
newshipping = oldshipping.select{|i| i % 2 == 1 }.map{|i| i + 0.5 }
My ridiculous fictional writing about shipping widgets is way more confusing than the idea that you can select and then chain right into a map.
This probably looks really weird to a java guy but its not really all that mysterious. I wonder what that looks like in Java.
List<Double> newshipping = oldshipping.stream().filter(i -> i % 2 == 1).map(i -> i + 0.5d).collect(Collectors.toList());
a bit more verbose but the essential chaining idea is there...
Also I'm not sure about the use of floating point here...
[1] http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-sele... [2] https://docs.oracle.com/javase/8/docs/api/java/util/stream/S...
I'd respond to that by drawing one huge semi-colon that spanned all 20 lines of pseudo-code.
The point is, it's much easier to focus on the idea of the algorithm when writing it down in pseudocode, without having to worry about c / c++ details that obfuscate the idea.
Interviews are often based more on what the interviewer knows than the project / resume.
Now what happens when someone asks about a language that you have not used in 3 years? Well it gets fuzzy. Ramping back up on an old language might take a few hours, but that’s meaningless in terms of a job.
We allow interviewees to pick their strongest language. But if you end up picking something that doesn't exist, well, you aren't earning yourself any points.
For example, I couldn't tell you off the top of my head how to test for null in python. I'd assume it'd be if(obj), but after a quick google search it seems like if(obj is not None) would be the correct answer.
Quoting from the article:
> Leaky abstractions mean that we live with a hockey stick learning curve: you can learn 90% of what you use day by day with a week of learning. But the other 10% might take you a couple of years catching up. That's where the really experienced programmers will shine over the people who say "whatever you want me to do, I can just pick up the book and learn how to do it." If you're building a team, it's OK to have a lot of less experienced programmers cranking out big blocks of code using the abstract tools, but the team is not going to work if you don't have some really experienced members to do the really hard stuff.
In areas that I'm just learning or dabbling in (for me, Objective-C), I look things up or reach out to experts. But there are areas where I want to be the expert that others reach out to.
[1] http://www.joelonsoftware.com/articles/LordPalmerston.html
Personally, I love the idea of being a generalist. But at the end of the day, you gotta code and code good, specialist or not.
# the problem is that our query only matches rows where the ID from foo table equals the ID from bar table, but we want rows from foo table that match the first part of our query regardless
This also makes it easy to ask for help, since now you've turned your "it no workie" into a question which you could ask another person on your team or in e.g. IRC for help with. They might then have additional questions, but I've found more often than not that simply getting a few minutes with someone else is enough for them to bring not-your-entrenched-perspective to the problem and hand you the (sometimes super obvious) solution in short order.
TL;DR https://en.m.wikipedia.org/wiki/Rubber_duck_debugging is great
I still think that in general, people who can't be bothered to read important documents, and instead just eyeball them for keywords (and start shooting off questions accordingly) -- aren't my cup of tea to work with, anyway.
I've also had interviewers rip the other pages out of my resume in front of me, but everyone is different. At the end of the day, don't feel too bad about not getting an offer. A lot of it is luck.
Really? That's incredibly rude.
I don't know about your personal interviews, but I'd find this reasoning slightly strange if I were being asked to write computer code on a whiteboard. I'd find it much less strange if I were actually handed a laptop to write a functioning program on.
Expecting perfectly correct code on a whiteboard seems to me to be a slight abuse of the medium. Whiteboards and chalkboards specifically exist to sketch things out in an adhoc fashion, often in a collaborative and easy-to-edit way.
If you're trying to filter for people can be productive in a particular language from anyone else, that's what you need to look for.
If you let the candidate pick their strongest language and they still make fundamental errors, you know they're not going to be immediately productive in any language.
Interview enough people and you'll encounter some that are very convincing until you dig down into details. So you have to dig into details.
for i in range(len(items)):
do_stuff_to(items[i]))This is kind of the point, right? Most places I've interviewed are far more interested in your communication skills, logic and thought process than writing perfect code on a whiteboard.
Many of my friends have failed to see this is actually the reason they have you write code on a whiteboard.
You should not be expected to write syntax-error free code on your first pass while solving a problem , without machine assistance
Nevertheless, the interviewer was gracious and replied, "Fair enough" and stopped nitpicking my brackets and semicolons.
I was told they thought I might be difficult to work with.
Being able to discuss things on a whiteboard is a necessary skill for working in a co-located office. This includes pseudocode.
That could go horribly :)
For a while, we had a non-typical interview strategy: A take-home project. We would give the candidate a week or so to work on a smallish project, the requirements of which we would specify. After they completed the project, we would do a group walkthrough with them.
We've hired five engineers over the last three years. For the first two, we did the take-home project. But, then I started to wonder a bit about if it was reasonable to ask programmers to work a weekend on a project. There were a bunch of persuasive comments in HN threads on the subject saying it was unfair -- a job seeker would have to spend an incredible amount of time on each application. And one candidate that I really liked aborted the interview process once I told him about the take-home test.
So I changed the process to something much more typical, with live, in-person coding exercises. We hired three more engineers under this system.
So, how did they compare? Well, the engineers hired when we were doing take home projects have worked out INCREDIBLY well. They are independent and very resourceful. They are excellent.
The engineers hired under the more typical system have not done well at all. We had to let go of two of them, after months of coaching, and the third isn't doing that well.
Random chance plays a huge role here, I'm sure. Maybe we just got lucky with the take-home project engineers. But personally, I think it makes a lot more sense to have the interview process match the work. /shrug
Mostly, we want to see how well the developer can explain their decisions throughout the process. Maybe they made a shitty decision. If they know it, and explain why it was shitty, that's a pass.
When I joined the company, the exercise took me about 3-4 hours. I don't think that's a ton to ask, especially if you make the onsite interview less intensive (which we do).
I am more interested in whether or not I can read the person's code, follow their logic, and if they think about logging, unit testing, etc.
Coding skill, while important, is a very small part of whether or not I am interested in a candidate. Soft skills are a much stronger part of the equation IMO. I could care less if a person can write a recursive function or if they don't know the performance difference between different ways of doing things.
Though my current company doesn't do them, I was hired for a previous position from a take-home project and generally support them. As an engineer, I'd rather put more effort into a smaller number of take-home projects than a larger number of live coding sessions...
It doesn't matter how many books I read or questions I practice, I just can't work these kinds of problems. If I had an inkling of what it was like beforehand, I would have switched majors or dropped out. Half a decade of hard work, tens of thousands for tuition and a useless degree at the end.
I don't know whether to laugh, cry or jump off a cliff. Maybe all three.
There is a real need for people who understand programming, even if they aren't heads-down, programming geniuses themselves.
System design, user interface design, HCI, software engineering (methodologies, management, architecture), infrastructure, etc that don't lean as heavily on the algorithmic side of CS as they do other aspects.
I know that while interviewing where I work, a candidate's attitude and enthusiasm for programming are much more important to me than their ability to solve some riddle in half an hour. It's not the solution I'm looking for, it's how they get there.
In particular, anything involving a Tree was never very intuitive until I tried implementing a script to search for files by name. Suddenly both the recursive and the iterative approaches made sense. I understood the trade-offs because they applied directly to my work. That opened the door for more complex algorithms, like a Huffman Coder (which I wrote in C, as part of a CS class).
The other thing that helps me in interviews is to just talk through everything I am thinking. It feels like I'm stating the obvious over and over, but a good interviewer will be able to follow your thought patterns and help you along when you get stuck. Also it just helps to hear yourself say things outloud sometimes. If you just stand there silently decoding a problem in your head, the interviewer can't help you and has no idea how you'd approach a real problem on the job.
Part of the problem is that the overlap between "concepts used in technical interviews" and "practical things I would actually implement" is very small. So to take your approach, I'd have to go out of my way to implement something that, in the end, would have no utility to me.
Granted, there are developers out there who do take on really technical projects for fun. It seems like every language has at least one implementation of the GNU `coreutils`, which I'm sure requires at least some algorithm expertise. And there are, of course, jobs where the technical is really important (systems-level, research divisions, etc).
But for the most part, the types of interview questions they ask in no way correspond to the actual on-the-job requirements. I find it strange how common it is to interview web developers (or, engineers whose job will effectively be web development) as if they are C programmers.
This.
Most important thing for me as an interviewer is for you to talk out loud about what you're doing and what you're thinking.
Just let it flow - all of it.
Programming is often a solitary thing - we go through a lot in our own heads when writing code; e.g. say I ask you to write some code to iterate through some website log files and build a site-map from the URL paths in the log entries. I bet that your mind - even as just a reader of this comment - has already started working out some of the steps to do this ... "load the files, iterate through line by line, some sort of map or DB to store the files, some way to handle duplciates" etc. You might even already have some questions lined up about number of files, frequency of running, shell-scripts vs "real" code etc. Great - but I need to know that you thought about that stuff and I wont unless you talk about it out loud.
Standing silently at the board is not giving me the interviewer as much to go on. Even if you get stuck and/or make a mess of it and dont have a working solution at the end, if you've talked out loud about what you're doing, why you're doing it (and why you're NOT doing something else etc) might be enough on its own to get you pass that interview despite your solution not working (everyone has off days, but show me your thoughts!)
There is a huge amount of randomness in interviews. I usually say this as a bad thing, but in your situation now, it can actually be a good thing. Interviewers look for a WIDE variety of traits. Most ask algorithmic questions. But if you do enough interviews, you will find a company that values the skills that you have (I am assuming here that you can program productively). Smaller companies particularly have more variance in what they are looking for. I encourage you to just treat this as a numbers game, and get applications out to as many small and medium companies as you can.
This sucks. But it can and does get better. After you have a few years of experience under your belt, companies will look at you in a very different light.
EDIT:
Also want to add that we made Triplebyte to help people like you. We'd love to have you apply.
If you do want to work as a professional programmer, try just typing through solutions and understanding them. After lots of exposure, you'll start picking up patterns. Dynamic programming and greedy algorithms are taught so quickly that I'm surprised students generate intuition for them! Feel free to get in touch if you're struggling. Best of luck.
I've been in almost a dozen programming interviews and maybe only 1/3 of them have taken the shape of programming whiteboard problems.
Many just asked general technical questions or questions about my particular stack with no whiteboard problems.
The remainder of them hardly asked any technical questions at all beyond asking about my experience and background.
I'm not saying that those companies gave good interviews, but there is a lot of work out there for people who can't pass whiteboard interviews.
Thank you! This is a good write up and just like it concludes it's far from ideal.
I'd love to see more interviews based on real-world type things like maybe code a project, come in and explain the architecture, reasons for your data structures, performance questions, etc. Shows how you code and communicate and even better: work with others and maybe walk someone through extending your project or something similar.
Honestly though my biggest issue with interviews is the lack of response with a negative result. For instance one of my last interviews I spent literally months with the company interviewing on and off on the phone and in person. I never heard a SINGLE negative thing from anyone, always answered every question correctly, shot the shit with many of them and everything seemed perfect. Even the team lead asked me not to go after something else because he wanted me. Then I was ultimately declined with the only reason given was "lack of experience". But I had over 12 years of experience, all of the interviewers told me I went above and beyond, said they agreed and liked the solutions I came up with, that I talked through them well, etc etc. I was never able to get anything else out of that.
If something is wrong with a candidate and they don't fit that's perfectly fine. But please give them accurate and detailed feedback where possible. This leaves me absolutely nothing helpful and instead of possibly improving on something I'm left thinking they made a mistake or everyone just simply lied to me during the entire process. I was even exchanging some texts and emails with the lead up until I was given the negative result and then nothing.
Honestly though my biggest issue with interviews is
the lack of response with a negative result.
Exactly mine too. However: If something is wrong with a candidate and they don't fit that's perfectly fine.
But please give them accurate and detailed feedback where possible.
Detailed feedback is hardly ever possible. Not only because of a fear of litigation (which is a big factor too) but also because the hiring decision is a matter of balancing so many different points.You're right but if a candidate is going to spend hours or days working with your company I think it's the least they deserve. If there is a legitimate reason for not hiring them I'd like to think litigation would be rare.
I mean when you work with a sales guy to buy something and ultimately don't buy you usually tell them why especially if you've been working with them for days. The inverse is true as well if you decide not to sell a product to someone. It just seems weird to me that a person can spend so much time with a company and possibly not even get a good learning experience out of it (when you're left with the impression that everything went as smooth as statistically possible and then you're declined without any useful data how do you know how to improve if at all? Hell maybe someone was just better than you or they decided they needed something else for the job; telling the person could save them so much trouble).
If you want someone to spend hours or days trying to join your company I feel like you should be able to give them feedback. I don't like the trend of big companies not giving anything. Interviewing is a two way street but there is just a weird stigma or legal worry preventing feedback.
But you're right. I wonder what the statistics are for interviewing; are more people interviewing while they don't have a job or do have a job and are looking. I feel like it has to be the former like what you were suggesting but I haven't seen data either way (not even sure on the logistics on collecting that in a good, representative way).
We're doing this differently at Triplebyte. We give everyone we don't work with (who does our final interview) a several hundred word personal email, with an explanation and advice on how we think they can improve.
I don't have a problem with pushing someones limits and see where they stumble but a lot of these interviews seem intentionally trying to screw you over with the abstract way these questions are asked and the brain teasers they give you.
What company, do you mind if I ask?
I remember the best interview I had was at a company offering open source software. For the coding components of the interview they give applicants a task (they cherry pick one of the easier ones) from their JIRA backlog and told applicants they've got two weeks to come up with a patch. It didn't matter if the applicant could fully solve the bug/feature, since it's not particularly fair to expect the applicant to be familiar with the ins and outs and gotchas of the system they are working with, but what did matter is that they A) submitted something, and B) could talk their way through their thought process and how they arrived at their current solution.
This sort of process really clicked with me. Obviously it's not as straightforward for some organisations that may offer proprietary software, but the process could certainly be adapted for a lot of organisations, in my opinion.
Edit: I missed where you said open source company. Though I still think this thought for a closed source company that uses open source pieces (like a web framework) could be useful.
"Please arrange these colors in complementary, analogous, and triadic color schemes". This is color theory 101 -- something every visual designer should now.
> Why is red font on blue background bad, please justify?
Again, a valid question. It all depends on the brightness/saturation of the colors, and how much contrast is between them.
Edit: Obviously these are ridiculous and unnecessary interview questions because frequently a designer provides a portfolio of work that demonstrates their skill. This may not be possible in a programming interview if the candidate has been not been working on open source code or side projects.
It's a totally broken perception, and it needs to end. We're one of the few professions that are routinely asked to prove our abilities in every single interview we attend. It wastes so much time on both ends and there needs to be a new way.
The handful of people I've had to interview I always checked the interviewees portfolio ahead of time if it was available.
On a related note, I love the story about the Homebrew guy getting rejected by Apple because he couldn't invert a tree or some such thing. Even if it was sensationalized (or plain false for that matter), we aren't even surprised by headlines like that anymore given the current interview climate.
Real-time coding during the interview shows me how good a candidate is at collaborating when solving a problem. One good indicator is asking follow-up questions to make sure requirements are clear. Other things to look for are, e.g. TDD, which can help solve a problem with predictable correctness and pace. I have interviewed quite a few candidates who throw a bunch of code into the editor and start pseudo-randomly tweaking the code to try to make it work -- this is not a recipe for successful problem solving. Some aspects of code quality can be evaluated during the interview as well, which probably explains why many interviewers don't bother looking at code samples.
It's important to ask for a solution that can be easily deduced -- trick questions are bad for both parties, because the candidate is often stumped, and the interviewer thinks they are bad because knowing the trick makes the question simple. Many classical algorithmic questions are "tricky" in this way.
The questions also have to be "real world". Like you mentioned, you can be a successful engineer and not know the specifics of inverting a tree. If you can correctly recognize the need for the algorithm and implement it from pseudocode, you have solved your problem, which is what engineers are paid to do.
I definitely look at open source code of job applicants, and sometimes a part of the interview is asking them about it.
Of course that has downsides too, like anything.
I discovered their interviews and mine are largely the same. Technical questions, some time-management questions, and some soft stuff to make sure they'd fit in the team.
The list includes things like Big-O analysis. While, formal analysis is certainly not a day to day occurrence of most programming, knowing what the runtime complexity of the code you are writing is almost always important.
While, I generally don't care for most algorithmic problems, I am honestly concerned when someone can't tell me that something runs in O(n^2) and good probably be optimized.
EDIT: I should note, I'm not necessarily looking for them to use precise term here, but they should be able to clearly articulate it.
If you're expecting the candidate to produce performant code, they may need said knowledge.
I am a strong believer in looking for strength in an interview. Someone really rocking complexity analysis is a strong positive (shows that they are smart and pedantic in a good way). But so does clean, smart code and great loose coupling.
[edit]
Also, I care far less about whether they can solve some problem on paper about asymptotic complexity than if they have some sense of what it means. Someone with little formal training who discovered the classic python "Add to the end of string" algorithm is N^2 and figured out a working knowledge of N^2 vs. N is better than someone who memorized a bunch of math but can't apply it because it went in the "math box"[1]
1: http://zenoferox.blogspot.com/2009/10/deep-inside-math-box.h...
But the VAST majority of the programming work out there does not require any
Big-O analysis.
Your point is simultaneously valid and irrelevant. The vast majority of programming doesn't involve any Big-O analysis. But if you can't do Big-O analysis, there are problems where you will be stuck. Your code will be running slowly and you won't know why, and all the micro-optimizations in the world can't make a O(n^2) algorithm run faster than an O(n) algorithm on even a moderately large data set.To make an analogy with driving: the vast majority of driving doesn't involve parallel parking. But you still need to know parallel parking to pass a driving test.
Honestly, I don't think calculating the O(f(n)) is ever worth it outside of academia. Intuition is only slightly worse, and it is just so much time-cheaper.
Honestly, I don't think calculating the O(f(n)) is ever worth it outside of
academia. Intuition is only slightly worse, and it is just so much
time-cheaper.
Sure. I've never been asked for a formal mathematical proof of the Big-O complexity of my algorithms in an interview. And, as an interviewer, I've never asked. Intuition is exactly what interviews are looking for. If an algorithm has a nested for loop, and the inner loop is traversing the full data set, you should be able to say, "Oh, yeah, that looks like O(n^2) time complexity." If an algorithm is storing every element of a data-set in memory, you should be able to say, "That's O(n) space complexity."Big-O notation, in practice, is a handy shorthand for talking about various classes of algorithms, and ranking them in order of how much time/space they take.
This may be a result of the domains I have worked in, but I have never encountered a situation where I could change the order-of-growth on an algorithm. In fact, most algorithms I have worked with have been defined by non-computational performance.
I don't know formal complexity analysis, and personally think the resolution of Big-O is far too coarse for practical analysis anyway. I can still look at any piece of code and give you approximate polynomials for its runtime, memory requirements, and other computational features.
The whole point of the argument is the difference between what's on the test and reality, though. And simply "being on the test" doesn't make it valuable.
Needing to parallel park on the driving test has little relation to you being a good driver. In reality, your actual ability to park is hardly relevant, because you could avoid those parking spaces, or even half-ass it by driving in forward, or whatever.
Ever hear the expression "tools, not rules"? Using big-O analysis while coding is almost the textbook definition of what makes someone a bad developer.
That's of course not true if you're developing some foundational tool meant for other developers like Redis or whatever, but for the average developer doing complexity analysis at work is probably a red flag that they're prematurely optimizing their code, using company time to work on a side project, or otherwise doing something that's not contributing to the success of the business.
That's actually incorrect. Not knowing Big O does not prove that you do not know how to optimize an algorithm.
However, it does mean that you don't speak the common language of computer science, that would allow you to easily communicate the effect of your optimizations to other programmers.
I just don't agree with this. Maybe it's true for people doing strictly front end web development (i.e. pure HTML and CSS), but basic algorithm analysis comes up all the time when writing any kind of real code.
I think your attitude is actually part of the reason software sucks so bad nowadays. People act like efficiency doesn't matter at all and Big-O is useless and then turn around and act surprised when browsing a website causes Firefox to use 800 Mb of RAM, or their top of the line server only handles 50 connections a second. There's a connection there.
Edit: Anyone want to explain how I'm wrong rather than just downvoting?
Edit 2: Understanding a N+1 problem is the equivalent of understanding the difference between O(1), i.e. fetch all data with a constant number of queries, versus O(n), i.e. the number of queries scales linearly with the number of elements.
* Principles and patterns of object-oriented (or functional) design
* Relational (or NoSQL or analytics) database design
* Unit, integration and system testing
* Logging, profiling and debugging
* Source control (e.g. branch/PR/merge flows)
* Deployment and devops
Do these subjects really not come up in some programming interviews?
"You've been assigned to implement feature X in our product. Assume that the specs are clear and you have a pretty good idea what code you are going to write. Also, assume that your teammates Joe and Jane have been assigned features Y and Z respectively with roughly the same due date as your feature. Ideally, describe how you would make your changes, test them and coordinate with your teammates to get all three features merged into the master source code."
Obviously a lot of details are missing, but they can be fleshed out in conversation (during which the interviewer should also describe the current process used on the team the candidate is being hired for). This would give both parties some insight into experience and expectations.
Something like a garage class that has properties like numberOfCars, maxAmountofCars, maxHeight and methods for insertCar(), removeCar(), isGarageFull() ?
I knew a college recruiter at Large Semiconductor Maker. She had been around the company many years, starting out as a mask designer. She knew nothing about engineering, but had worked with engineers on a daily basis for 10 years. She was great as a recruiter for new-grad engineers. One of her favorite questions was: "My back yard is 60 feet wide, and I want a brick fence across it. How many bricks do I need?" You would be surprised how many people never said another word, worked out a numerical answer, and told her the number. boggle. The point of the question is to find out how good the candidate is at uncovering and understanding the customer's wishes and what the customer's vision is of the desired end result.
Somewhere along the line there has evolved a group of people who never learned how to interview job candidates for problem-solving oriented jobs. A quiz-show lottery is a lousy way of finding out if someone can flesh out under-defined problem statements, replace a stupid problem statement with a better one, and creatively explore the dark corners of a solution space.
Let's stamp out the quiz show now.
Well, I say this as someone who was apparently blacklisted on TripleByte despite ostensibly getting a perfect result on the programming taks, getting an interview would have been a start. Or at least getting told what and why it happened, instead of trying to request a pre-screen phone interview without result over and over until I "got the message".
I understand the TripleByte team is perceiving problems that exist in the programmer hiring process, including the fact that interviews are not necessarily designed to gauge a candidate's qualities as a programmer. I also understand that you probably can't change the status quo in that space without first establishing yourself firmly in the existing field. But my own experiences make me skeptical about how transparent TB really wants to be.
Just like everyone only hires the best, they only hire people who are "passionate" about <blub>.
I take issue with that recommendation. You should use whatever language you feel most comfortable with. If it's C, use C. If it's Java, use Java. You don't have the luxury of an IDE or anything like that, so you need to have enough of the language in your head to write a program without looking something up.
One of the reasons, I think, is that the language itself is "small" enough you can actually hold most of it in your head.
That, and for certain problems it gives you the opportunity to demonstrate understanding of things like pointer arithmetic that you wouldn't have if you used Java. I remember an interviewer at a Java shop being impressed a few years ago when I used C and pointers to reverse a string in place (I wasn't very comfortable with Java back then).
All that said, I'm getting old and cranky and whiteboard interviews are starting to get really annoying.
Where we can really save time is focusing on the matching process of candidates to companies. Interviewing is tiring and we find candidates often stop talking to companies they were initially excited about because they're exhausted from interviewing (usually after 4 on sites) and just want to accept an offer
We wrote before about how much hiring preferences vary across YC companies (http://blog.triplebyte.com/who-y-combinator-companies-want). By using data we get from the Triplebyte interview, we can send you to the companies where you've the strongest likelihood of passing the technical onsite. The result is getting the best set of offers to choose from, rather than picking from what's available before interview burnout sets in.
Just focusing on interviewing time, if you're talking to 3 or more companies that's approximately 3 hours of technical phone screens (usually repeating similar problems). With Triplebyte, you interview for 2.5 hours and save 3 (or more as you talk with more companies).
You can schedule the interview by first taking a simple quiz for like 15 minutes and then selecting from a calendar, you don't need to negotiate with a person, go back and forth, etc.
I believe in the future point 3 will be especially helpful. The hardest parts for me were trying to figure out how appropriate it was for me to be rambling as I coded (something I'm not used to doing at all), and trying to understand what was and wasn't appropriate to ask the interviewers about my code.
Time to brush up on breadth-first search and hash tables!
It gets better.
Hash tables
Linked lists
Breadth-first search, depth-first search
Quicksort, merge sort
Binary search
2D arrays
Dynamic arrays
Binary search trees
Dynamic programming
Big-O analysis
I guess it depends if you are going for a job that REQUIRES these techniques then yes it is important, but for web application development - even sophisticated web application development - not needed.Then if I feel they are worth a second interview, I get them back to sit with me and my team for the day to see how they fit in with the team. Then all being well I offer the job.
Imagine if prospective dates gave you a 4-hour take-home test before making eye contact. That's actually the way many employers like to start of the conversation process with candidates, these days.
Spend several hours perfecting a profile to increase your odds?
I shudder at the thought of ever having to do another programming interview. Well, alternately shudder and laugh. What a joke!
Companies who aren't finding people like this are missing out on many of the best.
Not sure why you think this is the case. It is really easy to end up with a worthless network (I managed), and many larger companies insist on forcing every applicant through the HR hiring funnel for compliance reasons.
I've never had a job that involved whiteboarding or any sort of coding test.
Drilling someone to do tree traversal or various Big-O exercises doesn't exactly come up in the real world. Yeah performance and understanding data structures is important but that's why you give them something real, see what kind of data structure they come up with and why and go from there.
Well at least in my opinion. I've interviewed a lot of people and have been interviewed myself. I've unfortunately haven't been able to gather the data to see how effective my method is BUT I like it a hell of a lot better.
one objection to this I've heard is that it disproportionately disadvantages people who don't have the free time to do it
I'd like to try it and attempt to gather data in either case.
As far as these take home assignments go, I find this a disturbing trend as well. Especially egregious is telling someone there is a time limit on your working for free. If you're going to pay me for my time awesome lets talk, otherwise lets maybe look at some code I've already written.
This industry seems to get more up its own ass every day.
We help programmers find great jobs at Y Combinator startups. No resumes, just show us you can code.
* Our Company
We believe hiring should be about what you can do, not what you say you can do. Our mission is to build the world's best technical hiring process.
We don't care where you went to school or which companies you've worked at. We only care if you can code. If you can, we'll do everything we can to find you the best startup to work at. *
That mission statement plus the blog post means that they are recruiters for financially unstable companies (aka startups). Makes the blog post that much harder to believe since startups are beggars not choosers when it comes to hiring.
I actually just cruised through this course and found it super useful. Edit: By cruised I don't mean did it easily but instead just watched the videos, because I was cramming whenever I could fit time in.
https://www.coursera.org/course/algs4partI
It covers Binary Search Trees pretty well and some other things on the list. I also really like this teacher.
https://www.hackerrank.com/domains/algorithms/warmup/difficu...
I personally also like to do problems on hackerrank, SPOJ, or Code Jam, but are probably overkill (especially Code Jam) as they're much harder than what you probably should expect in an interview. Still, I find that it helps my nerves when I solved harder questions because then the interview questions seem much simpler so it might help you too.
You can choose your languages and it's all wrapped in a nice leveling-up game style. You pass and rank up based on your solutions to predefined community problems, and have a test-driven approach enforced in the editor.
For a refresher on algorithms and data structures, I also like the Harvard CS50 videos up on YouTube. They walk through sorting algorithms and cover the bases of various data structures.
It is SO random, a lot of useless questions, small startups having a long hiring process harder than the big 4.
Just one example: I've received an offer from one of the big 4 after going through their process. I was lucky in the questions - things I had studied.
I also applied for around 40 start ups / small companies. I made through the final on-site interview in only 5 of them. Lots of white boarding, silly technical questions that don't proxy to day-to-day work and etc.
I really think that passing in a process in a company like Facebook and not passing in other companies working in a much less complex environment says a lot.
Another thing that annoyed me a lot was that in some companies, when I froze upon a problem and was in a dead end, instead of them trying to help me or give constructive advice they would just keep adding pressure. It's craaazy. You're in a white board in a position of someone judging you in a on-the-fly-absurd-problem and the guys is trying to talk you down instead of help.
Crazy stuff.
When was the last time you had to implement bsearch() in a real project?
It is certainly false that if you are able to get CS basics right, you will NECESSARILY be any good at deep engineering.
There are people who get the basics right and are good at deep engineering. The question is whether one predicts the other.
On the other hand, many so-called real world questions measure only how well you are able to recite from API documentation of interviewer's favourite framework or at best the language specification.
It also establishes depth and breadth of familiarity with a variety of fundamental topics demonstrated through exams and large programming projects: program design, networking, operating systems, security/cryptography, team software engineering practices, algorithmic techniques and analysis, etc.
You fundamentally cannot assess this as well as my alma mater can because my alma mater has 4 years of me working under realistic conditions (laptop, internet, colleagues, deadlines on the order of weeks) and you have, what, 5 hours of me standing at a whiteboard?
Credentials are seriously underrated.
CS programs are not created equal. If you find that candidates from a particular school aren't necessarily competent, then you should value candidates from better, harder schools. If you find that candidates from well-respected schools aren't necessarily competent, then you should respect them less (US News isn't always right) and respect other schools more.
Coding interview is just a baseline that everyone hired is expected to exceed. In most companies it does not really matter how well you did in coding interview - the only thing that matter is that you passed it. After that coding interview results are not really considered when choosing level (other than for junior engineers). Nobody expects senior engineer to be much faster when coding simple loop but he sure should be able to code it.
On the other hand design and behavior interview results are often have much more influence on final salary and level.
I don't think that is quite right. Interviewers claim coding interviews are necessary to weed out the large fraction of our industry that cannot write code at all. If they cannot code, then they did not successfully complete a good undergraduate program's worth of coding projects (they cheated, rode on the coattails of group members, were graded way too easily, or something). Otherwise they can code.
>Strong filtering on credentials harms companies who miss good programmers, and harms programmers who can't get jobs.
On the other hand, strong filtering on whiteboarding unnecessarily filters out people who don't do well under that kind of pressure but may be great programmers given a computer and a more realistic deadline. They also privilege people who have optimized well for whiteboard interviews but may be destructive in the longer term.
Which is why the optimal solution seriously considers both factors. (I'm arguing with you because you called credentials influencing hiring a "bad" thing).
The other stuff is harder to crack. I'd really like to see interviews that are more tightly anchored to real work/layer complexity by building on themselves, etc etc.
Why the heck the needs for special lessons to do what the candidate has been doing successfully for years?
Interviews are artificial, stressful situations which in many cases do not resemble what you will actually be doing at your job.
Like well-known blogger Steve Yegge once commented about Google's interview process, sometimes it gets so bizarre that two interviewers in your queue wouldn't have hired each other! Focusing on the details one interviewer likes will make you lose points with the other. He calls this phenomenon "the interview anti-loop".
I guess being well-drilled about common questions and tricks helps counterbalance some of the pitfalls of the interview process.
Gee, I'm glad I'm programming, for my own startup. Wait while I ask my founder, CEO if my programming is good -- got an answer back right away, my programming is fine!
I don't understand your irony. No-one is saying that. We're saying that programming interviews are often not ONLY about programming, and unfortunately the parts NOT about programming tend to overshadow the parts that are. Therefore, interviewing requires preparation.
Are you bitter that programming interviews are like this? If so, fine. So am I.
Are you saying that programming interviews are NOT like this and do not require training for? You are mistaken. It's a fact of the world, whether we like it or not.
Or are you saying you lucked out and didn't have to go through this hell? If so, congrats! It's known to happen. But still, it pays to be prepared for the average case of difficult, stressful interviews.
People with obviously high qualifications are being rejected for no good reasons.
The situation was not always so.
Apparently the people doing the interviews are more interested in being nasty than hiring people to get more work done. For this situation to hold, there has to be not much demand and a big supply. So, the process is free to descend into totally silly games. It's the Queen in Alice in Wonderland and "Off with their heads".
When I hear folks complain about programming interviews, I point to that.
The month I spend gearing up for coding interviews usually guarantees me a job, that offers at minimum a $10k raise. I consider that a very good use of my time.
Ho, but there is a solution to walk around the problem of job interviews being unable to select good developers: so let's avoid investing in being a good developer and fix the problem at hand and just be good at interviews.
Problem solved.
Brilliant!
Are not interviews kind of de facto selecting scammers by giving them an unfair advantage, then?
Is it not causing a problem of credibility of the profession, hence the of the value of our earnings?
Growth is shrinking, recession is coming. Will they keep people whose values are uncertain when time will come to get rid of the fat?
Of the developers you hired, how many nailed the interview process, then went on to being classified as a bad developer?
From my experience hiring candidates, the typical software interviews that I have been a part of, tends to produce very few false positives, and instead do produce false negatives.
Care to guess what we're looking for in screens and interviews?
Some of our best performers were poor interviewers. Likewise, we've had interview aces not pan out. Rather than expecting the world to become interview clones (and make our hiring decisions even more difficult), we're learning how to be better interpreters of people to get to the answer of our real question -- is this person an engineer we'd like to have on our team?
It's still a work-in-progress and we're nowhere near perfect, but we're simply not going to outsource our decision-making to the status quo of technical interviewing in 2016.
A good programmer must be able to survive mediocre colleagues and terrible managers. How to check for that in an interview?
If one wants to switch from a completely different domain - like working in investment bank tech or embedded development, there is no way one can have prior knowledge to tackle the design of a Google Docs style system.
It seems like something that can only be gained through on-the-job experience. Is there no hope for newbies?
If you're a career programmer, and you've never bothered to hone these skills, don't be surprised when you can't easily find work in 10 years. The cheaper guy or girl who comes with less risk will beat you.
I can explain very clearly how I would go about solving a problem, maybe whiteboard it, flesh out a design, ask them some key questions to show I'm a thinker and not just a follower. That kind of interview usually goes well for me.
As a result, I usually end up with jobs where I have a lot of creative latitude, where I can think up new product ideas and prototype them out, where I can solve problems my own way.
I wish I could pass those Google tests, though. It would be nice to have it all. But some of us just have limitations, I guess. Luckily, it hasn't held me back from having an enjoyable and relatively well compensated career.
Probably today the thing is to have a couple of apps on the Android or Apple appstore, a Github page with some interesting toys and experiments, some open source contributions, and of course the old-fashioned networking that is how many of us still get our best jobs and most successful business relationships.
I create a "real-world-lite" task like "connect to this simple JSON API I built and implement a recursive product category browser on top of it". I've done this task myself already with a timer and am confident that it will take about an hour to implement. Then I ask the candidate to share their screen and implement it in Xcode while I watch. As they develop, I can get a sense for how they attack problems (quick and dirty, slow and methodical, stack overflow copying, etc), and afterwards I can ask questions about their thought process.
If they did well in the first one, we block out a second one for another hour, and a third for another hour after that, each one testing different skills.
This avoids the time imbalance inherent in take-home projects, because I'm spending just as much time as they are. And it avoids the painful "implement a red-black tree" whiteboard questions by focusing on real-world work in their own dev environment. It also means I have a decent sense of their skills before I ever invite them to an on-site interview.
Well, actually, most companies I have interviewed with care about core CS fundamentals and nothing else.
Of course, it may that a bit of craziness may be involved and they'll ask ridiculous little or big problems but someone with a reasonable amount of can answer those.
Or it may be that a lot of craziness is involved, things veer into bit-twiddling assembly, top management steps in unannounced to shoot random questions, suddenly syntax or whether you are "server side oriented" or whatever matters a lot - "we want the absolute best programmers on the market and we cement their loyalty by paying well under market rates..." etc.
Now, the more craziness appears, the less you'll actually want the job. But markets being what they are, you may need the job. By the end, there are no easy answers. Keeping is probably the main advice.
White boarding a simple data model of a real world scenario was surprisingly difficult even though the interviewers were very cordial. The exercise was used to gauge my question asking skills (interviewer was acting as subject matter expert) as much as data modeling and SQL. It was kind of fun as I used it as an opportunity to expand my ability to problem solve in stressful environments.
What's so great in Y Combinator startups? I mean why do they narrow only to such startups? Wouldn't it be better to just say they help with finding jobs in startups?
They are meant to weed out older programmers, in favour of younger cannon fodder...I mean candidates.
My first one was with a Java company and the hiring manager wanted me to draw UML diagrams, which was the only thing that I learned in the software engineering course in university.
Another one was about programming a game. Nothing much, but it needed a few 2D transformation I knew nothing about, so I failed miserably.
Most jobs I got were just "talks" about what I can do.
"You know web development? HTML? Nodejs?" - "Yes" - "You're hired!"
Not to have one at all!
This obviously doesn't apply to people just starting out, but I've found the easiest way to get a job is to have worked with someone at the company in a similar role. Many of the issues that interviews are designed to highlight (attitude, flexibility, stick-to-it-ivness, culture fit) simply are non issues if you have someone on the inside who has experience with you.
At highly targeted companies such as Google, Facebook et al, I'm sure that if they have a dryspell of good candidates in a given month (can't think of a reason why), then they revert to things like: "We don't care if you don't get the 'trick' immediately, we'll give you hints" and "we just want to see how you think and how you code" and "just talk through the problem" and "you should not learn specific problems and if you see one you know just tel your interviewer" or "cracking the code interview type of questions are banned".
But the reality is that people who apply to Google (or Apple or Amazon or Facebook or Microsoft...), are very smart, and want to work there very much, so while they can probably do well without preparation, due to the fact they will have competition with all this year's new Stanford / MIT / CMU graduates on a limited amount of positions, they take no chances. I have a friend who has a masters degree from a target school and it took him 4 attempts to get into Google. He is smart, he probably did well in the interviews, but you are being compared to others, so until he went and worked on those pretty useless skills of: practicing writing fast on a whiteboard, getting interview books and practicing tricky problems, doing a lot of online judge problems, he didn't get in. Why? because if you have two candidates, both smart, one has practiced whiteboard coding for all of the problem sets on geeksforgeeks / careercup / glassdoor, and one haven't, then even if both are presented with a new problem, most chances it might be a variant of one of those other "usual suspects". e.g. after I solved the famous water trapping problem (tough one if you don't get hints), the idea for the largest water container problem just pops to mind, and if you know that you can find the only non duplicate number in a list in O(1), then the problem of finding if an unsorted list of numbers is an arithmetic series with just O(1) memory is practically the same trick.
So think of two developers, both are awesome, both know CS and both are fast coders.
One practiced whiteboard coding and knows the XOR trick for duplicate numbers, his code for such a question will be written in 1 minute
public int findDupe(int[] nums){
int dup = 0;
for (int num : nums){
dup ^= num;
}
return dup;
}
The other guy, who didn't see these kinds of problems will probably use a hashmap and x2 more lines for the same problem.Both are O(N) time an O(1) complexity, but the hashmap guy might accidentally say it's O(N) memory (common mistake for frequency maps)
Bottom line, both are good candidates, and the only reason the first one thought of the XOR solution in 1 minute without a hint is that they either saw it before (it's not that rare) or a real genius (statistically less likely, but still possible)
If you don't have enough good candidates, you might have the time and energy to really see which one of these will perform better at work using work related questions other than tricks like this.
But if you have unlimited good candidates coming in, the one that will solve it in 2 minutes will be the one that will stand out from the crowd, there is simply no other good way to filter out so many people. I'm sure they have tons of false negatives. (and probably also a few false positives, but I doubt it's too many)
So the system is broken, but also SATs and GREs are broken. Popular schools, popular jobs, will have to put filtering systems that are not only directly related to the ability to do the job. Someone at Google is simply writing CRUD apps for a living all day, I'm sure. But I'm sure his interview tested him on a much harder set of problems.
int [] nums = { 2, -2, 0, 0 };
int dup = findDupe(nums);
System.out.println("dup="+dup);EDIT
The given code works to find the only non-duplicate item in a list (perhaps that was what was intended)
but it is nice that people got what I said through the lines!
it should have been called findNonDupe and the var should have been called nonDup.
Hope I'll do better in a real interview ;)
Wait why is it O(1) memory for the frequency map? As you keep adding elements doesn't the hashmap have to resize to prevent too many hash collisions?
> finding if an unsorted list of numbers is an arithmetic series with just O(1) memory
Is the strategy to solve this to first find the common difference `d` with one pass through the array (by finding the largest and smallest) and then sweeping through one more time xor-ing each element a[i] with a[i] + d and checking if the result is equal to the (minimum) xor (maximum + d)?
> Wait why is it O(1) memory for the frequency map? As you keep adding elements doesn't the hashmap have to resize to prevent too many hash collisions?
Presumably because you'll have a constant number of keys (I'm not sure what the exact problem he's referring to is).
I'm not sure how you would have a constant number of keys. I mean I guess if you consider a worst-case hash table with bucket for each integer you would have 2^32 keys (which is technically O(1) space since the size remains fixed regardless of list length).
But using Big-O in this case is clearly disingenuous since the space allocated is far, far more than the one for xor solution.
In the char variant, the worst case number of keys in your hashmap is the total number of chars in Unicode. You can't have more than that no matter how big is the input.
So both cases are a very, very big constant, but still a constant.
Time complexity however is theoretically unbounded as you can have any size of input, but again, this is limited to the max size of an array, so TECHNICALLY the time complexity is an integer in Java at most 2^32 as well.
But I would not risk saying that in an interview, O(1) memory will pass, saying O(1) time because the size will never be longer the the max array length sounds more risky.
if it's an int though, it's an O(1) and O(1) memory if you really want to be technical. So are all interview questions involving an array of integers I guess :)
And what was the intended solution for finding if an unsorted list of numbers is an arithmetic series in constant memory? You say it's the same xor trick, but I don't see how it's applicable. Do you xor all the values with all the values shifted over by the common difference?
Safe to say, we don't interview with whiteboard hazing. We do a phone screen mainly for personality and to see if the candidate deeply knows about a project they recently worked on. We dig in a bit there and look for the spark of passion. Then, if we are moving forward, we give a take-home project in a private git repo that is relevant to the role and tell them to spend 4-8 hours on it depending on their availability and ask them to time it and be honest. They choose the scope of work they want to accomplish. If the code looks reasonable we have a video conference where we do a code review and dive deep and ask "why" a lot.
We have been really surprised at the difference in quality of these take home projects. Some people can barely get started and struggle to produce anything. Others build full on, useful, applications.
Obviously we are screening for people that are self-starters, so being able to choose scope and regulate and make larger decisions is important to us.
An example project for a full stack c# developer:
Feel free to search around and work on the challenges as if you were on the job. Let me know when you think you can have this stuff done by. Please do this on your own time, with your own equipment and tools, and not your employer's. We don't want any lawsuits or IP ownership questions. Also, for the code, you can retain copyright if it's something you'd like to publish on GitHub, etc.
Clever Code Can you send me a code snippet in the language of your choice of something you have done that solves a hard problem in an elegant way?
For instance, here's one of my snippets from a few years back. It solves the complex problem of transactional optimistic concurrency control using ~30 lines of code. The usage of lambda expressions in C# and generics makes it succinct and expressive.
http://blog.jdconley.com/2009/01/functional-optimistic-concu...
Production Backend Question Let's say I have a very popular consumer facing service with 10 load balanced front end web servers running the latest asp.net mvc and averaging 100 simultaneous requests each, appropriately sized ms-sql servers, and a heavily used memcached cluster of 4. Everything is running great until we do some capacity planning and double the number of web servers to 20 and experience a 25% increase in simultaneous requests. Suddenly load shoots up on the ms-sql tier with far more transactions per web request than typical, overwhelming a ms-sql cluster that should have handled twice as much web traffic. Web server requests start timing out and throwing 500 errors to the clients, and the system practically comes to a halt. There were no code changes. Describe how you would troubleshoot this and what you think might be a few likely causes.
Failure Tell me about a project you have worked on that failed. What was your role? Why did it fail?
The Challenge This is meant to be a practical exercise, and is representative of the types of challenges we face. We want to see if you can make reasonable product choices under time pressure as well as write code. You get a lot of ownership here. Please use any frameworks/services/etc you want. We suggest using something you know very well. Feel free to search Google, go to the library, call a friend, or whatever you need for research. Please write all the code/copy/etc yourself. The output can run on whatever OS or PaaS/SaaS provider(s) you want, but it should be something we can also easily run. Please try to limit this to 4-8 hours of your time.
If you want to keep the repo private, please share it with me: https://github.com/jdconley
Create a web site with the following characteristics: Make the hackathon/minimal/proof-of-concept version of some popular consumer web app that you think could use some love. Craigslist, eBay, reddit, whatever...? Site must be responsive, gracefully scaling down to smartphone resolutions and up to full screen desktop displays. It does not need to be beautiful. Supports all the way down to IE8, with appropriate feature degradation as needed. Lean toward implementing things in-browser rather than in back end code. Bonus points if you do a Show HN and your implementation makes it to page 1 on hacker news.
I have interviewed 100+ candidates so far. I'm doing interview less and less recently simply because I found those coding/design questions less meaningful to judge how good a candidate is.
With websites like leetcode.com/lintcode.com that collect interview questions and provide online judge, all you need is to put enough time practicing. 10-years ago we use "reverse a linked-list" and nowadays we maybe use questions like "topo-sorting". The latter is significantly harder than the previous one -- but if candidate saw solution beforehand, it's actually easier to implement.
Great advice! The list provided in this blog post is an excellent description of what you should know, cold, before you go into an interview. The reason you need to know them "cold" is that you (probably) won't be simply asked to code up mergesort. Instead, you'll be presented with a problem that can be reduced to mergesort. You need to know it cold so that you can reason more abstractly with it.
While this is great advice, it also demonstrates why people eventually develop interview fatigue over a career. I'm not talking about fatigue from your third interview this week, I mean, I mean fatigue that sets in over decades.
See, a year ago, just before I interviewed at google, I could have done all this "cold". I could code up a BFS, mergesort, find the shortest path between two nodes, print all permutations of a set, and so forth. Cold. And you know, I think in many knowledge-intensive fields, most practitioners are required to do stuff like this cold. But I probably wouldn't be able to do it all cold now. I could figure it out, but not in 45 minutes at a whiteboard, and certainly not in time to reason abstractly. I wouldn't be able to do this with partial differential equations or shakespeare's plays, two other subjects I was highly prepared for exams in a couple of decades ago.
See, people in other professions have to do this, but they do it once. Actuaries need to know vector calc and linear algebra, cold, to take their exams. But they don't have to remember how to integrate by parts when they are interviewing for a Sr Actuary position 15 year later. Physicians need to know Organic Chemistry, cold, at some point in their lives. But an experienced anesthesiologist isn't expected to answer whiteboard questions about undergraduate oChem.
I don't have an easy solution, since I actually do completely understand why tech employers rely on these exams. But I do think they take a serious toll on the field, and are a major contributing factor to attrition (as well as aversion among people who never go into the field at all). We, as developers, really do have to re-load complicated undergraduate coursework into exam ready memory over, and over, and over.
I'll finish the way I always do: if you interview like this, that is your choice, and you should feel free do do so - I really mean this. But why then do these employers act mystified that there is a "shortage" of developers? It seems to me that aversion and/or attrition is a very natural outcome for the way we do things in software. "No thanks, I'll do something else" seems like a very reasonable response to an industry that hires like this.
This method of interviewing has been around ever since, and is going to be around for the foreseeable future. Nobody loves it, including the interviewers, but there just isn't a better way to do it at any sort of scale. Especially when there are much bigger problems to solve when you're running a business. And a lot of other reasons.
It's best to take the bull by the horns. I run http://InterviewKickstart.com, which is a bootcamp for preparing for such technical interviews. We do almost exactly what is in the blog post. It works. Spectacularly well.
This is a different skill [1].
The [1] is inside an <a> tag, but the tag doesn't contain an href attribute, so it doesn't link to anything.I certainly hope they aren't interviewing anybody under duress.
> 2. Study common interview concepts
lol
well at least that has been my experience so far trying to get a job and I'm coming up dry every time. I technically have no work experience because I've been holed up writing a big data mining SaaS tool for a few years and since I was self employed it seems to mean jack all for credentials.
I don't know I'm in a bit of a jam. Starting a complex SaaS product from scratch that thousands of people have used is simply useless against a fucking sorting algorithm that will be used heavily on the actual product.
Like I feel like I'm living in a bizarro world sometimes...I have all this experience and knowledge in this one area, building shit and getting people to pay for it, and it's going to waste as I'm half heartedly applying for jobs I know I will not be able to pass the second round of interviews when the technical algorithm questions begin....I'm sure if I wanted to learn more about the different variety of sorting algorithm I would've fucking consulted stackoverflow already....come on man I just wanna solve real world problems with real world product experience not write fucking code on a whiteboard. I'd be happy to architect out an entire stack powering your product in to the future on a white board but fuck man if you want help on your sorting algorithm just google stackoverflow.
my 2 cents.
If you're talking about PHP being better than JavaScript in a startup interview, you're not going to be hired most likely. Startups typically use new technology, and you clearly don't.
I think it ultimately boils down to confidence. To use the dating analogy, nothing drops the proverbial panties (or boxers, if you're into that sort of thing) faster than having confidence. Being physically attractive (i.e. fit and in shape) doesn't hurt either.
Take my analysis with a grain of salt, though. I happen to be hilariously bad at interviewing, and don't get me started on dating.
Those statements aren't advice they are platitudes. And some people, despite people who are naturally good not understanding, need actionable advice about what to do exactly.
I remember when "having a Github" was a signal, as soon as word got out everyone had one, but most were zero or near-zero original content.
Or is it "we need to know how you handle the stress of critical bugs that are existential threats to our client relationships", which shouldn't exist in the first place if the company is run well? If yes then I guess you know what I'd say next...
Seems to convey the subjective experience quite aptly.
But I laughed.
Do you have a source on this?
I guess it is, if you read it literally. But I don't think people mean it literally when they joke about it, nor are they making a serious comparison between the two experiences.
I could never calm down and think but the interviewers wanted to test how you would code on a whiteboard under duress
The root comment wasn't off-topic, but it wasn't helpful either, because of the snarky second sentence. It's typical for such a comment to nudge the thread in the wrong direction.
A sufficiently experienced and knowledgeable person will be doing things similar to what's in the guide because they've learned to do so through experience, not because they read it in a silly guide.
People seeking out the guides are typically the same ones who don't have the experience to back up what the guide tells them to do.
If you have aptitude and talent, brush up on your algorithms and try to have fun with the interview. If you don't, then I'm sorry, but maybe you'd be happier doing something else.
Thanks!
Are they really? I mean, maybe, just maybe, the expectations are too high for whatever basic CRUD app you're producing.
If "most" companies are overwhelmed with having hired bad programmers, how does any work get done? Where are all the good programmers?
And you know that...how exactly?
It's the false negatives that are harder to detect...