396 points · by sharjeelsayed · 9y ago · 229 comments
All the young, beautiful people who wouldn't have ever taken a computer science course if it weren't such a lucrative industry to be in right now.
Maybe with this guide they can pass an interview at a big company where they just twiddle with bits all day. I won't be holding my breath until they can produce something useful.
People used to study DataStructures for a whole semester to get a deep understanding of how these work, and the time/space complexities affect system design. But now we get a pop-culture laced listicle that people will use to ace the interviews and write mediocre software. Does anyone wonder why there aren't listicles like this for Structural Engineering/Thermal Power Engineering/Mechanical Engineering etc?
No wonder we get data-breaches, password leaks, system outages, because we continue to treat Computer Science/Software Engineering as the next fad to make quick buck, and not science.
</rant>
- code quality - software productivity - expected time between failure - tolerance to error - expected life in field - usefulness to users
Because the science and engineering cultures of computing have failed to address these effectively, or even create cultural norms that support their development, a craft culture has evolved instead. Coders are artizans rather like clock makers in the 16th century.
That doesn't automatically make coders 'Artists'. There is a huge gamut of software outside the CRUD world of HN. Software that runs mission critical applications like Mars Rovers, power plants, Public transport systems, etc. We should have a fair amount of rigour to ensure the software being written is rock solid, and taking shortcuts to learn basics of CS is bad.
I understand memorizing data structures does not make a good engineer, but honestly who is still asking for cream of the crop engineers, especially at the entry/junior levels?
Stop hiring shitty coders and you'll stop getting shitty interviewees. Less shitty interviewees means less need for these types of "beat the coding interview" services/blogs.
Honestly a lot of times the comments in these threads amount to "I was a geek and it wasn't cool, I know CS from the ground up, and nobody deserves to have an easy path to being a coder". It's an exhausted form of gatekeeping and doesn't make anything better for anyone.
That's not to say one year of self learning won't prepare you for a lot of programming jobs, or that the person with the four year degree won't be starting at one of those same jobs. But there are a lot of types of software I would only want someone with a real CS degree writing.
(Of course, 1 year of self learning, plus 3 to 4 years of real world coding plus further supplemental self study, could very well get you to the same level as a CS grad's knowledge, or beyond.)
There's nothing wrong with software that only needs code monkeys to write. It doesn't have to be technical masterpiece to be useful, or valuable to business. Just think of all the code monkeys with jobs.
Because last time students were mentioned, they were blamed for picking up unpractical major unlike everyone older in STEM who was supposed to make more rational choices (as supposedly proven by them not picking humanities by passion).
The projection in your comment is unreal: a just world fallacy where only unattractive people can be smart, attractive people are mindless, which was definitely not the point.
Also, I'm quite sure someone could easily come up with comments just as arrogant as yours, about you.
When I saw "Data Structures" for interviews, I didn't think it would be explaining binary to us.
The ironic thing is that this biases toward the most newly-minted programmer; actual experienced working programmers rarely need to implement basic data structures or their relevant algorithms from scratch (they rely on existing implementations), and so move them to dusty disused corners of their minds, while newly-trained programmers with no job experience have been regurgitating these things on exams quite recently.
So even the dismissiveness is wrong -- the original commenter is, to be honest, less likely to pass such an interview without remedial study, compared to the "young, beautiful people drinking kombucha and listening to Spotify" being sneered at, who probably have been taught more recently and have it fresher in their minds.
I got an impression who their target audience is, based on the examples used, drinking kombucha and listening to Spotify.
All the young, beautiful people who wouldn't have ever taken a computer science course if it weren't such a lucrative industry to be in right now.
Maybe with this guide they can pass an interview at a big company where they just twiddle with bits all day. I won't be holding my breath until they can produce something useful.
You don't see any arrogance here? All it needed was an avocado-toast reference to be indistinguishable from a "why millennials are terrible and my generation is much better than them" thinkpiece.
The pricing makes no sense, that or its not obvious what you are getting in the full-course.
The testimonials appear phony. I believe in products when I recognize programmer celebrities or the testimonials link to a github or something to prove they are legit.
The pay box is sketch. Even though its powered by stripe. I'm not dumping my credit card without CVC, expiry and postal code.
There's nothing on here you can't already find for free. The value to me is saving time. I've done this before but forget because web-programming the last 10 years rarely required to commit this stuff to memory.
I'm a different use case I suppose but I want a super abridge version. I just don't want to a spend a week. I want to spend a few hours.
Theres nothing telling me how much time I will spending having to read through this course material.
- People fresh out of college and therefore relatively young. It would be illegal to make this an explicit policy.
- People who really really really want the job. All employers want to filter by this criteria.
- People who will accept the status quo and tolerate absurd bureaucracy.
But then you miss out a lot of brilliant people who "just want" (instead of "really really...") the job, but think that it is not worth to allocate month(s) for preparation.
The amount of programming done in memory constrained apps and for large scale data is tiny in comparison to all programming, most of which is very basic CRUD type work meant for use in resource rich environments at small scale.
I'd find it highly unlikely they could do that while being unfamiliar with core data structures and algorithms. A big reason to learn basic algorithms and data structures is not to reimplement them yourself but to help you design and understand your own algorithms and data structures.
> The amount of programming done in memory constrained apps and for large scale data is tiny in comparison to all programming, most of which is very basic CRUD type work meant for use in resource rich environments at small scale.
Those were just examples. I've seen plenty of cases of code for CRUD apps that had problems handling just a few 1000 records because the coder didn't understand memory usage and algorithmic complexity. I'd certainly want lead/senior developers to have this knowledge even if it's rare they have to step in to help in this area.
Thus, the other article on the front page about the staggering space requirements for phone apps.
I do mostly what's called "systems programming" and did embedded previously but also did some work on "normal" software but in all cases it was useful to care memory, data structures and performance at some levels of the system.
Even if standards were low, the point of an interview is to gauge the standard of the developer. Algorithms and data structures knowledge is important.
How do you become a "senior developer" without knowing this? That was one of the first data structures I learned about when I was 15.
I swear I've interviewed several senior developers who couldn't even vaguely describe what a linked list or a hash table was. I don't know how anyone can say that's not a bad sign.
Judging from observation, people become seniors after being employed for about four months (including part time period).
Not because it's necessary to be able to spell "cat", even, but because the inability to do so might indicate in a bayesian sense that the person is not likely equipped to do the job.
SAT vocabulary questions are chosen to be informative about the test taker's IQ; spelling bee words are chosen to be unfamiliar to everyone. You get a list of words that you're supposed to memorize; they could just as easily be random strings.
What happens if we have the number 256 in an 8-bit unsigned
integer (1111 1111 in binary) and we add 1? The answer
(257) needs a 9th bit (1 0000 0000).
and I didn't read any further. I don't think many interviewers would be eager to continue after hearing that, either. This is called an integer overflow. At best, we might just get an error. At worst, our computer might compute the correct answer but then just throw out the 9th bit, giving us zero (0000 0000) instead of 257 (1 0000 0000)! (Python actually notices that the result won't fit and automatically allocates more bits to store the larger number.)
The article is introducing the concept of integer overflow.1 0000 0000 = 256
Anyone who claims to understand integer overflow from actual experience, rather than memorizing textbooks, should know that by inspection.
I'd forgive that in a CS grad (possibly) but if someone claimed to have been working in C or other unsafe languages for more than a trivial amount of time I'd be very suspicious.
I got through a few chapters and then the author mentions something off the cuff with an assumption that the reader will know what they mean. But of course, I don't, because these books are basically a collection of cheats and hacks. I get frustrated that I don't understand it, so I seek out something that starts with the fundamentals and expands from there.
What I'm trying to say is that I'd rather slog through 900 pages of Sedgewick and come out with a thorough understanding rather than try 20 quiz questions to be stumped by whatever the hell they were trying to get at with question 21 and then give up.
Feedback on where folks get left behind is pure gold to us, because it lets us know what we need to smooth out next. We're not trying to be the /biggest/ resource out there--we're trying to be the /smoothest/.
For this article, do you remember where specifically you got left behind?
We had it in one of those gray boxes in an earlier draft (so you didn't have to click anything to see it). We'll probably move it back out.
It's one of the few dead-tree books I ended up buying this year, albeit after perusing a library copy.
the day someone unironically asks me to "Write an algorithm to print all ways of arranging eight queens on a chess board so that none of them share the same row, column or diagonal" - I will jump off a bridge
You forget what you don't use, and this is stuff that you don't use.
IMHO the big problem is that they're missing the point on why we ask students do do these algorithm implementations - it's not so that they'd learn how to do that (though a bit of general programming practice is useful), we put them there as hands on exercises so that students would understand the usage of these algorithms better.
The implementations are just a learning aid, not a learning goal. Asking to reimplement a red-black tree is somewhat comparable to asking what was shown in a particular instructional video or what practice problems were assigned in that class - checking if you remember the details of a particular teaching instrument.
People that ask these types of questions take the easy way out. It's a lot harder to ask thoughtful questions that really try to gauge if somebody knows what they're talking about because you have to really understand things yourself. For instance, somebody can easily say they setup a pipeline that scales. Sounds great. Asking questions that makes them go into finer detail to make sure they're not bullshitting you is a bit tougher.
Target audience is folks who never learned this stuff, or learned it but forgot it. Interesting to hear you had a different assumption from the title.
If you want something trickier, check these ones out:
https://www.interviewcake.com/question/stock-price
https://www.interviewcake.com/question/swift/find-duplicate-...
You could argue that the others are technically data structures, but I'm willing to bet most people will assume your standard list, map, heap, trie, tree, graph, etc. It's kind of like saying "Calculus for AP tests" and then only covering algebra up to Riemann sums.
Thanks for the links, I'll give them both a shot.
edit: just remembered that Calculus isn't on the SAT :)
Definitely agree that the first half of the article isn't exactly data structures yet.
But I just struggle with calling something "An inroduction to X." Have you ever heard "an introduction" and thought "oh, that's what I need!" I picture a super-dry textbook. Or one of those YouTube videos that promises to teach you how to do a thing but starts off with the person saying, "Now, before we get started..." and talks about nothing for 5 minutes before actually teaching you the thing.
Suggestion: Don't show hints for steps I already skipped. I stopped at "We can do this without destroying the input.", but had to scroll through all the hints before reaching the one I needed.
But then why would they be interviewing for a coding job anyways? Shouldn't a coder know what's a RAM, and that it's different from secondary storage??
And eager to receive any feedback.
Thanks for the post!
Ok, time to rethink the email opt-ins.
My first thought: Whoever designed this is super salty for me not wanting to provide my e-mail.
Out of all of the problems in my life, too much e-mail is certainly one of them. I like to keep it to a minimum. And as an adult, a weekly coding problem falls so down far on the priority list compared to all the other e-mail I'd get.
My suggestion would be to have a slightly cheaper tier (probably no more than a hundred bucks). This mirrors the cost of two-to-three interview books. You could add a custom grading or personalized tutoring option for the full 500, or heck, even more (this is sort of like the GRE/GMAT prep option). Come to think of it .. I wonder why the GRE/GMAT prep crowd hasn't tackled programming interviews?
We've been working on some /tech/ to enable tiered pricing in the meantime. The Site's all custom, and so far there's no notion of a "product" yet...just "paid" and "unpaid."
Share your question re: where's Kaplan on this stuff!
As the guy above was suggesting, that data science site does personalized feedback and that justifies the high price. Otherwise, the way it is now, it feels like it should be priced similarly to CTCI.
Looks like Kaplan is not going to be interested in these things after the recent shutdown of DBC.
I found the newsletter upsell in the sidebar very distracting. I know you're considered a fool if you fail to bash people over the head with newsletter sign-up requests these days, but maybe just keep the ones interspersed in the text and get rid of the one I have to see all the time? Or I guess AB test it or whatever the cool kids are doing for this stuff. I dunno, but it really detracted from what I otherwise thought was great content.
Best of luck to you!
We're really focused on trying to "twist the knobs" only up to the point right /before/ it starts getting annoying.
Some examples:
The integer overflow part has incorrect binary/decimal conversions all over the place.
The example hash function used (summing elements modulo number of buckets) could be dangerous. I'm not generally a fan of showing bad practice or incorrect examples when teaching, even at an early stage when the student isn't ready for the real deal yet, but if you must then you could warn the reader that it's a simplistic example for demonstration and shouldn't be used in reality. It would not make a good impression if a candidate said they knew about hash tables but then produced that function as an example of hashing.
Similar comments apply to the treatment of big O notation. I understand that your style is to try to avoid being scary and complicated, but big O is useful because it has a specific meaning. Even in the longer explanation, you hardly mention that fundamentally it is about scalability and bounds, and you mention the danger of overlooking the constant factor only briefly right at the end. Also, the casual initial characterisation as being relative to the size of the input sets up traps when dealing with more sophisticated data structures, such as graphs where you often need to refer to the number of nodes and/or edges when specifying complexities.
This has gotten me more interview offers and job offers than I can count, and it really didn't take me all that long to learn.
I hate to promote memorization, but honestly, it works. Some people argue that memorization isn't the same as learning, and it's not. But it definitely helps you learn and increases understanding.
For mock interviews, definitely check out:
- http://www.byte-by-byte.com/practice-coding-interviews/
- http://interviewkickstart.com/ (email 'em to ask about mock interviews over Skype)
I got this recommendation about a year ago and tried. The site stated that I couldn't register, but I could sign up for a place in the registration queue.
So I did that. I have yet to hear back from them. I don't quite understand how people keep recommending them, as if it was possible to use the site.
The diagrams are clear and helpful.
Only nitpick: not sure how somebody who is supposed to learn what an array is by reading this is supposed to already know the meaning of Big O notation. So maybe a little intro to Big O complexity somewhere in there would help as well.
Now this is all my own experience, and others may disagree, so don't necessarily go changing things just on my account!
Aaaaand this is why I hate using this as a method for interviewing. I actually care a great deal about people that care about that stuff. I would rather you know all the principles and can reason your way back up, however slowly, than repeat something you've practiced enough for an interview.
I understand the author really only wants to help people, but let me tell you as someone who works for one of the "cool unicorns" that the quality of software engineers is really bad, most likely because of this efficient "gaming of the system".
Here's what a Google lead said in a tweet:
> Hello, my name is Tim. I'm a lead at Google with over 30 years coding experience and I need to look up how to get length of a python string.
DHH:
> Hello, my name is David. I would fail to write bubble sort on a whiteboard. I look code up on the internet all the time. I don't do riddles.
Max Howell:
> Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off.
And yet, everyone is asking these questions about print a string in zigzag fashion or something silly like that.
Engineers are gaming the system because the system is garbage. None of us are looking forward to waking up and solving HackerRank, LeetCode and CtCI problems till the joy of programming leaves our bodies.
I'm absolutely certain that there are many, many engineers who failed interviews because they couldn't write a zig-zag string and could yet come up with good solutions to problems at a real company.
> what do you expect a programmer who can't reinvent a half-decent bubble sort to do
But interviews aren't testing for that. The guy who invented Homebrew was judged by a Google engineer to be not good enough. Heck, I bet the engineer interviewing him probably had his/her entire dev machine setup via Homebrew.
DHH invented Ruby on Rails, which was used at Twitter for what, 4+ years? And yet if he anonymously gave an interview at Twitter they would probably reject him because he can't find a cycle in a linked list in 30 minutes.
> The interview is to convince the other person that you can think logically about programs.
It's supposed to be about that. The modern CS interview is, however, absolutely not about that. It's whether or not you've grinded through CtCI enough to be able to answer something taken from a vast pool of useless questions.
Tell me, is the Homebrew guy just really not good enough? Do you really think he does not know how to think about programs logically?
Seems to me that what interviewers should be looking for is not savants who can whack out particular odd bits of code but developers who can look up some things to use as reference as they go and most important who know how to determine what it is that they need. Proper evaluation and decision making is at least as important as actually writing the code, because those are the skills that can keep you from writing the wrong code.
And to avoid being called hypocritical, here's off the top of my head how the answers would look like (I don't use Python very often either):
1. len(thingie)
2.
def bubsort(arr):
if not arr: return None
for i in range(len(arr)):
for j in range(i+1, len(arr)):
if arr[i] > arr[j]: arr[i], arr[j] = arr[j], arr[i]
return arr
3. def revtree(node):
if not node: return None
node.left, node.right = revtree(node.right), revtree(node.left)
return node
edit: works well for something coded on the toilet: https://gist.github.com/andreis/69a242330617b2a62753ce604e27...Because, you know, they invented Ruby on Rails and Homebrew? Incredible, really. You were so adamant on being hostile that you managed to put yourself over Max Howell and DHH in a couple of sentences. These people have made valuable contributions to the tech industry as it stands today. This is a fact and not an opinion. They invented Homebrew and Ruby on Rails.
Good job, you solved the problems and are more likely to be hired by Google than Max Howell. Except he created the most popular package manager in OSX history and companies still can't see that.
Don't look now, but you just failed every interview I've ever conducted. Maybe consider a field where the skill you've just demonstrated would be useful -- politics, perhaps?
More, many of the interesting proofs that folks know took a long time to develop. Sure, you could probably throw some up on the board and speak to it. No, you are not likely to be able to derive one. And, I highly doubt that without practice would you be able to even get it on the board correctly.
Which brings up a major point. Discuss more in code reviews. Don't polish them trying to make them perfect. Make them part of your conversation with your peers where you are. I personally even feel recommend to throw up straw men sometimes. It can be odd throwing up a review for the team to see an idea on code you don't intend to push, but it can also be a good conversation. And someone else may be able to take that idea and make it awesome.
Which is ultimately what I want from a coding interview. If you have to handwave over parts, fine. Just be up front about it and hide it behind a function call. I may ask you to drill in on that function, but the key is to get valid code. Not necessarily complete code. (Obviously, YMMV.)
From a personal perspective, if I were to decide to switch jobs, I'd break out Cracking the Coding Interview rather than reading papers detailing how best to implement a Splay Tree because it's simply a better use of my time for the task at hand. I'll cheerfully read the latter on my own time, but not in preparation for an interview.
I don't see this culture changing anytime soon. 1) it's difficult to make an industry-wide shift and 2) more crucially, no-one has found a better way of doing it. It'll be interesting to watch though.
Some people definitely do hiring in different ways.
Time will tell if they're actually better.
I agree with you, this method for interviewing sucks.
There's nothing wrong with the latter, btw. Just that if your job is 90% copy pasting from the React docs and 10% coming up with a clever solution based on academic papers, then it's a much better use of your time to hire people who seem like they can get shit done and train & mentor them, rather than trying to hire the ultimate programmer who will ace your amazing question in exactly the time allotted, saying exactly what the interviewer wants to hear.
(the people who read academic papers over breakfast would much rather be at a job where the 90/10 split is the other way around, and will jump ship in the blink of an eye if they've been misled about the job)
Puzzles and tricks are like that are a crutch, because people don't know how to talk and find out about what the other person knows.
Usually what happens if a company becomes successful is they codify whatever they did to get there in stone and that becomes "the golden process" by which everything must be one. If they hired people who knew how invert a binary tree or some stuff like that, they assume they become successful because of it. I would usually think they became successful in spite of it.
At the end of the day there are people who will sit and drill interview questions for months and years and maybe that's what companies want, people who are desperate enough to do that work. Maybe that's what the tests really test for ...
What...
i once interviewed at a prominent company focusing on a certain language. they specifically stated in their job application that they just wanted motivated, enthusiastic, and smart people and that they didn't care if you knew said language. i sent them my resume with some recent code from my job since i had, within a few weeks, learned their language of choice on the job and on the fly for a project. it got their attention since it was decent code for someone new to the language. in the interview, they proceeded to quiz me on the language, including very specific details of how the language is implemented and things that don't even matter in day to day use of the language. and most of the stuff was something you could easily learn over a period of days or a week by just reading. it still boggles my mind. people, even very smart people, have no idea how to interview.
although, i can understand if you have very specific needs for a language and need help asap. but i can also wager that people are missing out on some strong talent if they take too short term of a view. that is particularly applicable to potential employees from other fields. i was a mathematician turned software engineer and brought skills that no interview touched on. i just got initially lucky out of graduate school because of some connections.
and yea, i would consider c++ to be one of the most complex languages around, which is why i don't touch it. haha.
In the off chance that someone stumbles along and blindly copies this into interview questions for his company. Think again, realize what your company needs and tailor your recruiting process for that instead of copying stuff others do.
Thanks.
To show that you're not a complete diva who's willing to put in some work even if it's unpleasant?
The question I ask is not real, either. It's entirely contrived. But I ask it because it's the best way I know to identify candidates who:
1. Can think critically about a data structure.
2. Can communicate with me about how to solve non-trivial problems.
3. Can translate an idea into code without thinking about it too hard.
Given lots of time there are much better ways to test a engineer for these attributes. Given an hour it's about the best I can do. That's not to say everyone who asks these types of questions does it well (I think there's a fair bit of cargo-culting around "The Google Interview") but if you're unwilling to even humour me I think walking out is the best response for both parties.In addition to that, it's entirely possible that the candidate is tired after 5 rounds of interviews and isn't able to think straight. But you're right, I don't think a better alternative exists yet.
Also, I think the better alternative is to ask questions you currently struggle with in your daily work. Just ask around in your department(s). There are always good interview questions to be answered that are close to today's issues.
Second, even when you have those reasons ask questions on actual situations that would occur on the job. You run a large C# code base that struggles with its size and configuration complexity vs flexibility? Ask questions on how he would design a new speculative module for the Platform. What kind of pitfalls would he foresee? What would he focus on? See if his answer include your struggles indicating he understands what his daily job is about. If you search an engineer to speed up your image processing pipeline which is C++, data structures can be fine but don't forget that before optimizing them you probably have to spend a lot of time optimizing the design of the entire pipeline so also ask questions about that part.
My main advice is think before you ask. If you have valid reasons, feel free to ask data structures. If you don't, think again.
They need to know if you are skilled enough, and this is the quickest way to find that info out.
Yeah, this can be memorized pretty easily, but "lets talk about how passionate you are" which is invariably suggested as alternative is even easier to fake for people with good social skills and charisma (and puts actual minority of real geeks at disadvantage).
You ask me to do a linked list--in 2017--and I'll have to start determining whether that smell is "Not Invented Here" or "Cargo Cult". How many languages don't have such lists as part of their standard libraries now (or at least part of a common libre-license or gratis-license library)?
But no... I'll just continue to answer the question as though my CS prof is grading me on it, and just convert my concerns into salary expectations for the negotiations phase. Any company that asks such questions is obviously bad at gauging real technical skill, therefore I should ask for way more money than I think I am worth, and invest all of my limited acting skill into believing that number. They are relying on me to tell them how good I am, so I will game the system, cram for their stupid questions, and tell them I am the absolute best.
Then I can spend all my working hours copy-pasting the answers to already-solved problems from the Internet.
The real genius developers are spending their free time helping lesser developers on Stack Exchange/Overflow for free, because the companies that hired them have no idea how to make use of that level of expertise, and that's the only way they ever get to encounter any fun or interesting problems to solve.
You've never had to choose between an array and a list?