On Secretly Terrible (Old) Engineers
techcrunch.com
techcrunch.com
You're a 55-year old engineer who graduated from school in '81. You're being interviewed by a 24-year old engineer who graduated 2 years ago. You're asked, in an "algorithm interview", to explain some detail of the implementation of an AVL tree.
In reality, despite the fact that they're covered in CS courses, virtually nobody uses AVL trees in industry. In fact, people barely use balanced binary trees at all, and when they do, they use red-black trees, and they use someone else's implementation, because they're a bear to debug.
The 24-year old has an advantage with this question because they were recently taught about, and perhaps had to do exercises/homework/tests based on, AVL trees.
That this happens is stupid, because it's very unlikely that conversance with AVL trees is going to make much of a difference to your on-the-job performance. Almost all the narratives you can come up with about this involve reading tea leaves and are shot down easily by better selection/hiring/interviewing techniques that answer questions more directly.
This line of questioning can go too far; I don't, for instance, think knowing the big-O characteristics of an AVL tree is unreasonable (it's a balanced binary tree, and you should have the complexity of operations on those in resident set throughout your career).
(AVL trees are just the first example of algorithmic trivia that came into my head. Substitute Kruskal's Algorithm, or k-means clustering, or whatever,)
[1] edit: that is to say, it has a factual answer if you ask the question and then fall totally silent. Which would be evil, of course, so in practice you and the candidate will naturally turn this question into a back-and-forth repartee, and it will reduce to the same exercise of unconscious biases as the vague question is.
You won't get the job, but that's the correct answer nonetheless. :-)
Interviews suck and we should all stop doing them as much as we possibly can. There are much better ways to handle this problem.
O(1) is a leaky abstraction [1]. It's O(1) amortized assuming you have enough buckets and a good hashing algorithm that minimizes collisions. I think that distinction important to keep in your head, and good to mention/look for in interviews, since those details matter when things go awry.
[1] http://www.joelonsoftware.com/articles/LeakyAbstractions.htm...
I had an programmer that didn't know that. I went to the whiteboard, explained it, and now she is perfectly competent at it (and the rest of her job). What's the problem?
Where do we get the idea that if someone doesn't know some arbitrary fact that they are incapable of learning it? Hire people that are smart, have good work ethics, and play nicely with others, and everything else will take care of itself.
Having built technical teams numbering in the dozens this is literally the ONLY strategy that delivers long term success in my experience. Unfortunately experience is discounted nowadays...
* Tell me more about the problem are you trying to solve.
* There are well tested and tuned libraries for search trees, like the JVM TreeMap. What requirement prevents us from using it?
* The JVM TreeMap uses RedBlack trees, which are basically BTrees, and likely easier / faster to implement than AVL.
Now, you might not get the job because the dude might feel threatened. You just dodged a bullet, the job would have been shitty anyway.
"Why do you want to do that" might be appropriate when actually working, but not in an interview.
I'm not looking for personality, self-confidence or slickness. I just want a person to directly answer the question.
I've done a lot of job interviews. It's not as simple as "candidate gave wrong answer, ding them and move on". If you're taking your job seriously, you're somewhat nervous too, and have to ask yourself if the answer they're giving is better than the one you're looking for. So now it's a debate, and now you're influenced by more than something you can look up in a book for the right answer.
Now if I had asked for a good way to construct a map, and the answer had been that hash maps are good on paper but have high overhead, then I would have to consider their answer carefully. But if I ask how an AVL tree works and the answer is "why do you want to know that" then they have just avoided the question, and I have to insist they answer it.
Imagine that our interview goes like this:
---
Q: Can you implement a red-black tree?
A: I don't know. My Ph.D. is not in CS and I never actually seem to get around to reading the copies of Knuth and CLRS that I optimistically keep on my shelf. Nobody really wants to pay me to read about trees. So mostly I just use other people's trees, particularly the ones that are hiding inside Postgres and MySQL.
It would be fun to try to figure out how to implement a binary tree by asking you twenty questions -- it's one of my favorite party games -- but it will take a bit of time, and I'm in an interview and feeling nervous, so I'm not sure my odds of success are that high.
I did read on Wikipedia the other day that operations on balanced binary trees are O(log N) which makes intuitive mathematical sense, given that a branched structure with n levels will have 2^n leaves. So I guess balanced trees are pretty fast.
---
What do you do next?
I presume that, given that I've failed to answer the specific question, and demonstrated a degree of "slickness" and "force of personality" in the process, that you will ask me if I have any questions, shake my hand, send me out the door, inform your colleagues (including the one who referred me to your company) that I'm a NO HIRE because I couldn't remember the algorithm for constructing a red/black tree, and send me a polite rejection letter the next day?
Perhaps that strategy would have the virtue of being fair. But could you please get it over with during the phone screen? Better yet, could you make sure your recruiters never even email people who don't explicitly advertise CS degrees? Because I'd hate for you to waste a single minute thinking about me, and vice versa. Time is precious. If I find enough of it, I might even get around to reading Knuth!
This is why I believe that you, the interviewer, cannot interview someone above your "experience level" without some kind of objective test.
"Work sample test" is the traditional name for what you describe.
Exceptions are things like you have to iterate through elements in some order, a very high ratio of inserts/deletes to queries, etc -- the obvious stuff.
Much more importantly, vectors are almost always the wrong answer (with a handful of exceptions). Consider a perfectly balanced tree with even 1k elements -- it will have height log2(1k) ~ 10, so approximately 11 reads, almost certainly from main memory, to access an element.
Exceptions are things like you have to iterate through elements in some order, a very high ratio of inserts/deletes to queries, etc -- the obvious stuff.
This is the worst argument ever. You basically said, "trees are the wrong answer, except for when you want to do tree stuff." Want to have a priority queue? Or want to search through your collection without sorting it first? Or insert into your sorted collection? Trees are your friend. They're a tool, just like hashmaps.And no, that's not what I wrote. Trees are an associative data structure. Hashmaps are a better associative data structure, except when you need the few capabilities trees have that hashmaps don't.
ps -- if you run that quote through fold -s -w 77, it won't be so wide...
My apologies. But, I maintain that trees have their uses. I would never use a hashmap to implement a priority queue, and i'd never use a tree to implement associative arrays!
The irony was, I'd just spent the preceding 2 years writing multicast link-state routing code. I could have coded a decent C++ Bellman-Ford in a couple hours, but couldn't pull it out of my head on the spot in an interview without babbling. (I tried to dodge by describing link-state LSP forwarding and then Djikstra, but wasn't given credit for knowing the more sophisticated algorithm).
Algorithm interviews suck. We should stop doing them entirely.
Read the book, and do whatever exercises you can from the book on the whiteboard. Talk out loud, the way you will in the interviews. After a few weeks and 60 hours of doing this, you'll be ready to blow the minds of the people interviewing you.
When you go to your interview, you will bring your own markers. Then you don't have to deal with the fat, half dried out stuff you encounter during the interview. Also, warm up for an hour or two before you go to the interview, by doing problems from the book on the whiteboard, out loud. This helps you leave nothing to chance, and be ready for whatever they throw at you.
Yeah, it's a waste of time. But you have to play the game. Similarly, when they ask you why you left your last job, lie and tell them you'd accomplished all your goals there, got everything lined up and nailed down, and you're ready to make something happen somewhere else. Don't tell the truth if it's because your managers couldn't care less about doing what's best for the business. If you want to work at the circus, sometimes you gotta jump through some hoops. Big deal, you'll be ok!
Yes, the interview process is broken, but you can actually work at it and do well, even if you're old.
Buy this book even if you're not planning to take my advice and study. Even if you don't study, this should become one of your most treasured books. I myself was amazed at how many things turn out to be graph problems, and had a great time going through this book.
[1] http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/...
This is fantastic advice, for everyone.
Preparing for interviews isn't wasted time, because ultimately the goal is to land a job that furthers your own personal goals in some fashion.
I wouldn't recommend lying. If you're leaving a job, you should stand by your convictions. In my market, it's small and everyone knows everyone, so claiming you nailed everything down is easy enough to verify. Just remember one simple truth: "You are the only common link between all your failed jobs."
Curious what the "right" answer is?
Instead, lawyers "speak colorably"; If one takes the pure white light of truth, and puts it through a prism, all of those colors in the spectrum of truth, while not 100% of the truth, still contain a very strong thread of it.
for example, I was in court recently settling a criminal charge for someone about two months ago, and that someone asked the crown prosecutor (during the hearing) why the crown has gone silent on the civil process settling the charges. The crown, unable to lie, or even acknowledge a commercial default, stated colorably that the paperwork was "not necessarily valid" in a criminal case. not only was this true, but this kept the prosecution in honor, the court in honor, and the defendant in honor, all while allowing him his "Section 11" remedy (canada criminal code).
I'd suggest using colorable language any time you feel the need to lie.
TL:DR - In the eyes of the law, telling a spectrum of truth is still considered telling the truth.
Algorithms by Dasgupta, Papadimitriou and Vazirani:
http://www.amazon.com/Algorithms-Sanjoy-Dasgupta/dp/00735234...
And Elements of Programming Interviews by Aziz, Lee and Prakash:
http://www.amazon.com/Elements-Programming-Interviews-Inside...
We need to have a conversation about working with people of different experience and talent levels. We need to address our industry’s lust for shiny (i.e. young) over reliable. For in the process of that conversation, I believe that we will begin to address the odd inequities that plague our industry.
Wow.
And there exactly is a perfect example of the bias that older engineers complain about.
By using the same argument for older technologies and older engineers he conflates the two, implying that older engineers are really better off working on older tech.
Though I think Stonebraker's VoltDB supports SQL as well.. ;)
The worst are interviewers who refuse to accept a correct answer. "Oops, I didn't expect the person to have the answer so I better make it more complicated." It's so ridiculous that it's hard to believe people would sink that low. Until you've experienced it though, you won't believe. I think it suffices to say anything that deals with distribution of money, which employment does, is going to have lots of bullshit.
I've been on more than one interview where I know that I've hit it out of the park, and I swear that the lead dev torpedoed my prospects out of fear that somebody might know enough to call him out on his BS.
Even in the best of scenarios, I think that this type of questioning has little value. Unless it is the most basic of questions to determine if the candidate actually knows the languages that they've listed on their resumes, what value is there in testing if someone knows something can be easily looked up and/or researched in a relatively short period of time if it was really important for the task at hand?
Please don't take my comments as minimizing the high level of detailed technical knowledge necessary for some tasks... but for most I would take a humble hacker who can quickly inhale new knowledge over the goofballs who end up doing these interviews, hands down.
I actually laughed.
Look, we really really really don't want to be taking anything from those folks. The hierarchies are rubbish, the talent questionable, and the egos immense. At least in software we can show that code does or doesn't work irrespective of who wrote it.
You don't want a doctor's salary? And her level of respect from society at large?
I also don't believe that the industry-wide talent level, or quality-of-work level, is lower in medicine than in private-sector software. In fact, I'd be shocked if it were the case. Look, there are some very smart people in our industry (as in theirs) but there are also a lot of idiots.
The nice thing about software engineering is that we don't have to spend ten years getting educated enough to deal with customers that don't want to take our advice...we can basically start there.
Do doctors have the problem that the stuff they worked on 5-10 years ago is considered obsolete now?
No, you only hire people who apply, get through the process, and accept your offer. That's the best you can do.
People who interview a lot are going to be good at interviews. People that spend years at places will look at a job offer and see the process of proving themselves to new people. And that's a giant hurdle.
A part of me wants to do an interview, just to throw the interviewer a technical question back at them. I have a few good ones in my back pocket. When they start with whatever challenge they have, I stop them politely and say:
"Wait a minute. You invited me here, so before we go any further, I want to see if your company is worth my time."
And hit them with my question. Oh, that would be fun.
Your entire business could be staffed with SGE's, and you would never know it.
(And yes when I was young and early in my career I never really paid much attention to it and shrugged it off, but now it's my friends and I see myself getting up there in age now, it is so very obvious, and a lot more prevalent than I ever noticed.)
When someone has nearly 20 years engineering experience (not talking about me, I don't) it is ridiculous to make them jump through some of these interviewing hoops. Sure, some kid fresh out of college might pad his resume - because there's not much to it. But an older veteran with a long resume, not so much. Experience does count. The ins and outs of the latest technology might vary slightly, but the patterns repeat. So much of engineering goes beyond the code on the screen anyway.
That said, it's interestingly telling to push "STE" as "secretly-terrible engineer" rather than "self-taught engineer." The author's ideal is for the negative case to be the soundbite, but then again: techcrunch.
Working instead from an assumption that the whole is greater than sum when it comes to groups of people - I'd be far more interested in what a candidate is like to work with and what unique qualities they bring that we don't already have and which can act as a multiplier for the organisation.
1. Anything related to trees 2. Big-O trivia and errata 3. Reinventing the wheel 4. Bit-twiddling operations
Seriously. If I go into your interview and you ask me to reverse a string, and it's not <string>.reverse(), I'm not taking your stupid job. I don't care if you want me to know the tricks for an in-place string reverse with no temporary variables, that just shows that you don't have a clue how to interview.
Good interviewers? The best I've found so far:
1. Ask people to do real-life problems 2. No "gotcha" questions 3. Let people use the environment they'll be using for the job -- this means an IDE, the internet (including stack overflow), and any library they want.
What I want to see when I'm interviewing is whether or not you have the ability to solve a problem. I'm going to look at how you abstract and break down problems, how you solve them, and at what point you say, "I think this is done."
Yes, I expect good engineers to know when to use a tree or a list or set -- but if you're explicitly quizzing for that, you're probably filtering in more terrible developers than you're filtering out.
Google does none of what you prescribe for "good interviews" and they have interviewing down to a science. Yes they've admitted they err on false negatives, but that is acceptable because they have little to no false positives.
From what I gather you want an easy interview. What you wrote is impractical (though I agree gotcha questions can be a bit much).
As a candidate, I get 1-hour with you and I need to accomplish the following:
1. Does your resume reflect your experience?
2. Can you code?
3. What is it like to work with you to solve a challenge?
4. Sell you on joining us.
Real life problems may fit in an hour, but may not.
There are so many resources on programming interviews that spending an hour or two during the week prior would pay off dividends in a candidates success rate.
It was actually one of the more terrible interviews I've been a part of, and I was not disappointed by the negative result. Google certainly believes they have interviewing down to a science, but I suspect that belief is itself not scientific, and instead just the usual bullshit and collective delusion.
A few years ago, I submitted a code sample that was ranked among the top 3 submissions ever-- I worked hard on that fucker-- only to receive a junior-level offer with <0.05% equity. So what was the point of doing the code sample?
On age and the quality of engineers, I generally find that older engineers are very good. That said, I'd be skeptical of someone who did "regular old" corporate engineering for 20 years. Why didn't he get out? I completely understand not wanting to move into management, but why didn't he look for an R&D job or move into an architectural role or try to become a consultant? (He may have good reasons, like wanting to stay in Ohio with his family, and therefore having fewer career options; I'd just try to figure out what they are.) Corporate engineering has a low ceiling and anyone good is going to have at least the desire (some may not have the ability, like someone tied to a geographical area) to break through it.
The cult of neoteny-- Agile and open-plan offices and the all of the other subtle signs of an age-discrimination/permanent-junior culture-- is somewhat of a self-fulfilling prophecy. Mainstream engineering, in most organizations, is a user-story ridden ghetto, a backlog-retrospective meeting that never ends. By 35 or so, the good engineers have either gotten out of it (possibly moving into R&D, data science, management, or independent consulting roles) or left the industry entirely. The culture of short-termism, open-plan offices, and business-driven engineering provides no exit. You don't get to escape it, in most companies, by being good at your job-- unless you become a manager.
What's happening is that tech's "thought leaders" are creating conditions that are hostile to older talent (which is necessary if you want your technology to be any good) with "Agile"/Scrum micromanagement and bullpen office layouts, then saying, "See, no one over 40 is any good". (In fact, there are a lot of good people over 40; they just don't want to work for jackasses.) This is congealing into a pernicious cultural assumption, based on shitty data, when we should actually be blaming the VCs and the mediocre middle-managers-I-mean-founders they fund instead of "old programmers".
Nah, scratch that. You're too honest for politics.
It's annoying, for example, to have good ideas or strong viewpoints written off as useful exuberance--and that happens too.
Not everyone can get an R&D job. Sometimes you have to get a job maintaining CRUD software, even when you're ridiculously overqualified. I don't see myself ever getting a job that doesn't suck unless I successfully bootstrap my own business.
So if qualified older engineers are undervalued, start a business, hire good people older than 40, and crush your competitors. One reason this does not happen in VC-funded startups is that the goal is to get something mediocre out quickly, hype it a lot, and then cash out.
1) Questions that rely too much on background knowledge. Knowing the exact properties or implementation of the more complex algorithms in the canon of undergraduate CS knowledge is not a particularly useful skill in itself.
2) Questions that have some trick that you either get or don't get. These aren't always terrible, but they give a big advantage to someone who has seen the question before.
So what is a good algorithm based question?
1) Implementing something basic but non-trivial, like N-Queens with backtracking. Basically, something anyone should be able to do.
2) Something that mixes in domain knowledge. E.g. problems calculating probabilities than can be solved with dynamic programming.
3) Pure domain knowledge, but in programming form. E.g. how to implement k-means clustering.