What happens when you type Google.com into the address box and press enter
github.com
github.com
Some of the sections are just out of context and become showing offs(like the keyboard part. For a hardware position that is not enough, for a software position that's non-relevant), which doesn't mean more sophisticated, just different interest domains.
I found I often can learn from slickdeals discussion in various topics, which is actually a good way to hear seasoned opinions.
on edit: typo fixed
As a candidate, I loved the creativity in it, and the chances it gives you to show off knowing things that you don't necessarily need to know to do a certain job but will still make you better at it than others. Say, when you're an (average) web dev, you don't need to know much about DNS. But pointing out the difference between an A and an MX record shows you have deeper knowledge than many, or at least that you've managed some systems before.
Look, I'll admit that I too have at some point asked people 'what's the difference between an object and a class'. But that's such a shit question, today I'd only do it after having asked some other questions they completely bombed to check if they know anything at all, or after apologizing profusely for the question and blaming it on 'standardized interviewing procedure' or whatever.
I deal a lot with spatial information systems; here's my favorite question I used to ask back when I interviewed people: consider a matrix A of dimensions M x N. Assume that that matrix represents a height map, i.e. each value represents the elevation at that location of a (discrete representation of) a terrain. How would you go about filling this matrix to make it represent a pyramid, i.e. the center cell having the highest value, linearly going down to 0 (or 1) at the border cells? Start by enumerating the assumptions you make, pick the ones that make your solution simplest, then go from there describing how you'd go about relaxing the constraints of your assumptions.
Then I'd draw a sample on a small 5x5 matrix.
I've had people who couldn't understand the problem no matter how hard I tried; and then I had people who would insist on showing 5 different ways of doing it complete with big O notation (in both cycles and memory) to illustrate the trade offs.
Anyone else have any favorite interview questions they came up with themselves that you think are a good representation of your field?
Wait isn't it still an open ended question with answers that can focus on any part of what happens? Why would the fact that it's "cliche" change that?
You can go memorize that post but unless you really understand TCP, HTTP, networking, DNS etc. it's still going to be really apparent to an interviewer who does by simply digging further into just one of those aspects.
An example of a question that loses its effectiveness because people can study for it is "reverse a linked list"
Either way, I guess we'll just have to agree to disagree. Even for open ended questions, in my experience it makes a big difference whether someone has prepared for it, and a weak candidate can prepare enough to appear (much) better than he/she actually is.
Mea culpa, yes I meant write "rote." Cheers.
I understand the problem you're describing very well, but I had to read the entire problem statement to understand what you're talking about. Making someone understand is a two way street, and half of it is about you communicating the problem effectively.
That's not to say you did a bad job, but for me the signal to noise ratio of that problem statement was low and made me question whether I understand what you're actually asking. If you said 'draw a height map of a pyramid on a 5x5 grid', that'd be far more clear.
I forget terminology. Object is an instance of a class right?
Did I get the job?
23443
34554
45665
45665
34554
Using max_height - (abs(i - floor(M/2)) + abs(j - floor(N/2))) would give the properly-centered pyramid: 23432
34543
45654
34543
23432
Your max height should really be just max(ceil(M/2), ceil(N/2)) for a height of 3 going to 1 at the edges or floor(M/2) for 2 to 0. Using both Manhattan distances gives you an octagon-base pyramid (approximated to the square shape) when really you just want the max of both distances: max_height - max(abs(i - floor(M/2)), abs(j - floor(N/2)))
gives: 11111
12221
12321
12221
11111
But this only works for square pyramids, using 3x5 you get: 12221
12321
12221
If you want a rectangle pyramid, use min manhattan distance from edge (don't need a max height then): 1 + min(i, N-i-1, j, M-j-1)
gives: 11111
12221
11111
or for a 7x10 grid: 1111111111
1222222221
1233333321
1234444321
1233333321
1222222221
1111111111
Python 3 code for those who want to test themselves: N = 7
M = 10
for i in range(N):
print("".join(str(1 + min(i,j,N-i-1,M-j-1)) for j in range(M)))I like your code. very elegant solution with mins and such.
One interesting aspect is that in some circumstances (I don't remember the details - one of my colleagues did some tests 10 years ago) it was faster to do it this way (iterate over all cells in order, so better cache locality) but in some it was better to 'draw rectangles' as it were, ie first put in all 1's, then all 2's and so on. Requires no floating point ops but more cache misses (iirc).
Nope. All border cells are supposed to be 0, but they have different Manhattan distances from the center.
> Object is an instance of a class
Correct.
I realize that this is a contrived testing problem, but to me a pyramid with zeros in the border cells sounds wrong. The area just beyond the border should be zero. Being within bounds of the pyramid intuitively should imply some non-zero height.
A lot of people just don't know how to react to it. I think it shows me what kind of thinker they are, ie do they need to be spoon fed or not? A lot of time, if I ask about some piece of this process, they can answer it. But they can't get to that piece on their own.
If I was asked this question I could probably ramble on for...oh, a half hour or so, if I actually exhausted my knowledge of keyboard interrupts, RAM, the TCP/IP stack (including specific packet headers and data frames and their lengths), hardware switching and routing, DNS lookups, HTTP, the TLS protocol (including which side does which part in which order), HTML/JavaScript parsing and client-side rendering. If I had to, I could talk less confidently about relative latencies and performance for all of those things too.
How much signal does that question actually carry? I can give you a lot of true information, but is it useful for knowing if I can properly code or debug existing software? For example, I could drill down into TLS specifically for another half hour - I probably couldn't actually write a TLS stack without referring to a lot of pre-existing literature, and even then it wouldn't be safe to use and I'd likely make critical mistakes. That's a crypto example but I think it applies to a lot that's here.
This question feels like one that doesn't really know what it's looking for, which I personally feel happens a lot in "open ended questions." If you need to test someone's knowledge of memory and latency, tailor the interview for that. If you need to know how well they understand HTTP and HTML/JavaScript, tailor your questions for that. But this question is sort of unreasonable for a lot of people because I think you'll get a few types of answers, among the set who can answer it well:
1. People who can speak for literally hours about everything that happens and who really know what they're doing, but who give a concise summary in a minute or two because the question is ridiculously underspecified and they really don't know where to go with it (this is worst case scenario, because these candidates might be dismissed for not being able to get to the meat on their own, when really they just recognize it's a gargantuan question and they're not sure how far you want them to go).
2. People who know all of it extremely well (like 1), but who hate the question and parody it by drilling down into mind-numbing detail about one particular part that is minutia for the actual job (e.g. they give you a treatise on multi-process browser architecture that could be a conference talk with some more polish). Ask for another detail and they'll punish you for asking by drilling down into something else that's literally what you meant but vaguely misses the point. Do you fail the candidate on the question because they're being passive aggressive or accept that they know an incredible amount about it and are expressing it's a bad question?
3. People who know one or two parts extremely well and who know the rest to a shallower (but still correct) depth (I fit into this category, in that I know the crypto and networking very well but am fuzzy on everything else more than two meaty question-response cycles down on the topic). Posed with this question, they'll most likely give a good first order explanation of how each part works or just skip it (e.g. people rarely even talk about the keyboard, USB, etc and just skip to the networking, passing over RAM completely), followed by a reasonably well explained overview of whichever part they're confident in.
This isn't to criticize you or the other commenters at all, it's just my bias in the other direction. I don't typically like "open ended" questions because I feel they are underspecified versions of the questions you really want to get at, and a candidate can know the topic really well but sort of flub them. If I was hiring someone to literally work on writing a browser I'd probably ask this question but...that's about it, I think.