Genuine Question: Apart from maybe the money or a nice resume entry, why would you/do you want to?
Very smart co-workers and the potential to be part of building software that solves a specific problem on a scale that nobody else on Earth has attempted.
How to Ace the Google Interview: Ultimate Guide
221–230 of 239 posts
Re: How to Ace the Google Interview: Ultimate Guide
#222Earlier quoted context omitted.
Very smart co-workers and the potential to be part of building software that solves a specific problem on a scale that nobody else on Earth has attempted.
Bingo. If you actually like CS, instead of just seeing programming as a way to get a fat paycheck like so many seem to, why would you not want to be part of FAANG or some other company building cutting-edge products and work on building some of the most advanced systems in the world?
Obviously not saying FAANGs are quite that bad, but still, this is a pretty shallow reason to work somewhere.
Re: How to Ace the Google Interview: Ultimate Guide
#223Earlier quoted context omitted.
> some perfectly qualified candidates don't have laptops So get one. You can get a good one from the pawn shop for $200. You can afford that if you're interviewing for a 6 figure job. Edit: I'm not kidding. I've bought $200 laptops from the thrift store, usually for travel purposes so I don't worry about losing/breaking it.
How do you afford $200 if you're interviewing for a six-figure job but don't yet have a six-figure job? Personal loan? (Also, that doesn't address the question of getting a working decent setup, if you're not otherwise using it.)
Re: How to Ace the Google Interview: Ultimate Guide
#224It would be nice if an article on how to ace a coding interview did not have incorrect code in it. AFAICT the set-based algorithm for finding duplicates is wrong; the resulting set will contain items in the list that are not duplicated.
It doesn't work. Not just a coding issue either, as the code matches their explanation for this "improved" method.
Yes, I confirmed that by pasting it into the REPL and verifying that it gives the wrong answer for a one-element list. Apparently the author failed to follow his own advice to always test code that you write.
Re: How to Ace the Google Interview: Ultimate Guide
#225Earlier quoted context omitted.
How do you afford $200 if you're interviewing for a six-figure job but don't yet have a six-figure job? Personal loan? (Also, that doesn't address the question of getting a working decent setup, if you're not otherwise using it.)
If I need to advise someone how to come up with $200, he isn't capable of a 6 figure job. If I have to hold someone's hand to set up programming tools on a laptop, he isn't capable of a 6 figure programming job.
Re: How to Ace the Google Interview: Ultimate Guide
#226Earlier quoted context omitted.
Very smart co-workers and the potential to be part of building software that solves a specific problem on a scale that nobody else on Earth has attempted.
Smart (in the usual understanding of smart), or good programmers (in the "can invert a binary tree on a whiteboard" sense)? These are two measures that are basically orthogonal.
Re: How to Ace the Google Interview: Ultimate Guide
#227Earlier quoted context omitted.
If I need to advise someone how to come up with $200, he isn't capable of a 6 figure job. If I have to hold someone's hand to set up programming tools on a laptop, he isn't capable of a 6 figure programming job.
Interesting - why is that? Have you hired such people and found them incapable of doing the work?
Re: How to Ace the Google Interview: Ultimate Guide
#228Earlier quoted context omitted.
> I do think there's some signal in whether a candidate can get the syntax right. I know you're talking about software engineers, not data analysts, but: select from [oops... you're supposed to put an asterisk there] select , count(field) from [holy shit... I forgot the group by] select , case when then else from [oh man, case statements need to be terminated with an `END`] select , from [oh no... SQL doesn't like th…
> > I do think there's some signal in whether a candidate can get the syntax right. > I know you're talking about software engineers, not data analysts, but: (inserts self-pwn car crash here) I've done SQL for ~20 years and I'd say I'm good at it. I don't make as many mistakes as you've described but I know exactly what you mean, and I'd never hold that against you because I don't give a toss about mistakes that the…
As a SQL guy who knows Python, but specifically just pandas/seaborn/numpy (matrix/set operations rather than the underlying constructs which make numpy/pandas possible), as opposed to a SWE with OO skills, could you point me in the right direction to learn how this question should be answered?
>"explain to me what a left outer join does". He shook his head in confusion "Never heard of it". Actually happened! I'm not even exaggerating!
I... I don't even know what to say here. That's absurd to me he would claim SQL knowledge and respond with that answer.
My response would be "that is the same as a `left join`" (then I'd explain what a left join was) and follow up with "I exclusively write 'left join' and never 'left outer join' as my experiences with the DB/MS I'm most familiar with (Postgres, Redshift, MySQL, MSSQL and a couple others) accept the `left join` syntax without specifying `outer`".
Re: How to Ace the Google Interview: Ultimate Guide
#229Earlier quoted context omitted.
Interesting - why is that? Have you hired such people and found them incapable of doing the work?
You're just trolling.
Re: How to Ace the Google Interview: Ultimate Guide
#230Earlier quoted context omitted.
> > I do think there's some signal in whether a candidate can get the syntax right. > I know you're talking about software engineers, not data analysts, but: (inserts self-pwn car crash here) I've done SQL for ~20 years and I'd say I'm good at it. I don't make as many mistakes as you've described but I know exactly what you mean, and I'd never hold that against you because I don't give a toss about mistakes that the…
>Actual example: Show me how you'd represent an arithmetic expression using objects, and how you'd evaluate it in an OO style (was after class hierarchy of (op, leftexpr, rightexpr and .eval method. With plenty of time and pushes in the right direction, he still didn't get it despite claiming good OO on his CV) As a SQL guy who knows Python, but specifically just pandas/seaborn/numpy (matrix/set operations rather tha…
Ok, couldn't find a sample on the web so here's mine. It's not right for brevity and because this is the first python code I've done in ~3 years, so any criticisms welcome. Hopefully can get the formatting right
# super.init omitted for brevity
class Expession: # abstract base class
def eval(): pass
class Literal(Expession):
def __init__(self, val): self.value = val
def eval(self): return self.value
lit1 = Literal(8)
print(lit1.eval()) # prints 8
class UnaryExpr(Expession): pass # base class for unary expressions
class Negate(UnaryExpr):
def __init__(self, expr): self.expression = expr
def eval(self): return - self.expression.eval()
lit2 = Literal(13)
neg = Negate(lit2)
print(neg.eval()) # prints -13
class BinaryExpression: pass # base class for binary expressions
# Note that subclasses Add and Multiply have the same
# __init__ code so I should hoist that into the BinaryExpression
# base class but for clarity I'm leaving it in the subclasses
class Add(BinaryExpression):
def __init__(self, leftExpr, rightExpr):
self.leftExpression = leftExpr
self.rightExpression = rightExpr
def eval(self):
return self.leftExpression.eval() + self.rightExpression.eval()
add2literals = Add(lit1, lit2) # 8 + 13
print(add2literals.eval()) # prints 21
class Multiply(BinaryExpression):
def __init__(self, leftExpr, rightExpr):
self.leftExpression = leftExpr
self.rightExpression = rightExpr
def eval(self): return self.leftExpression.eval() * self.rightExpression.eval()
mult2literals = Multiply(lit1, lit2) # 8 * 13
print(mult2literals.eval()) # prints 104
# now let's make a complex expression, say (7 + 2) * (-4)
# Doing this by hand but a parser would build this from that
# string
expr = Multiply(
Add(Literal(7), Literal(2))
,
Negate(Literal(4)))
print(expr.eval()) # prints -36
Basically it's a tree of objects that you call eval() on the root, and these recursively call eval down, then when they reach the bottom start returning their subtree-calculated values.Make sense?
Re. the left join, I abbreviated it. Full event was that there was 2 interviewers, me + other guy. I said to our interviewee, "what's a left join?". Cue puzzled expression and headshake. My co-interviewer qualified that for him: "what's a left outer join?", getting the response "never heard of it". He claimed 4 years of sql on his CV. No job for you, matey.
This isn't rare either, worked at a recruitment office and overheard a conversation which recruitment agent used to check applicant wasn't clueless. Applicant was applying for C++ job. Q: "give me 4 STL containers". Applicant replied "cin and cout".
If you've done no C++ that's like asking a python guy "give me some python data structures" and getting back the reply "input() and print()"
Edit: to clarify about the expression eval stuff, I wasn't expecting code, just an obvious grasp of a tree of objects with relevant subtypes, and eval(). He knew roughly how to do it procedurally, but blatantly had no clue on the OO style (which, yes, he claimed to have on his CV).
Incidentally, I'm just starting my very first step into Pandas today. Looks SQL-ish!