Hacker News new | ask | show | jobs
by emehex 1170 days ago
I found myself interviewing with a hedge fund last year because they liked some of my open source stuff (and approach to API design)...

I had about six conversations with a bunch of the team and a conversation with the CEO to sell me on the position. The last step was a seventh “conversation” with the Chief Data Officer to figure out if this was something I really wanted.

The CDO had different ideas… he joined the Zoom, started sharing his screen (with no introductions), opened a Google Doc and told me we were going “write some code together”.

I was pretty confused and flustered but tried to roll with it. He first asked me to “reverse a string”. OK. My lil Python snippet was fine but he didn’t like that it wasn’t “the most memory efficient way to do it”. He then asked me to write a function to approximate “e”. I just ended the interview right there.

6 comments

I came into this thread to comment about a similar experience. Had a call set up with the company founder for a consulting role, for me generally this means an informal chat where they share the pains they're experiencing, I share my background and thoughts related to fixing those kind of pains and, if we both determine we can see it working, I put together a proposal.

However, instead of the founder, an engineer ambushes me in the zoom call and starts a full on technical interview. In retrospect I should have ended the call there and then but I had already committed the time and it was only 30 minutes so I did my worst technical interview ever.

I'm still annoyed at their behavior, the company ended up folding so that's the silver lining.

I had a small consulting firm for a few years, and spent a few years as a solo consultant as well... what you describe is probably above all else what drove me away from that business model. Often I would walk in as "the sales guy" and they would want to turn it into a full blown technical interview. Disrespectful and a waste of everyone's time.
Isn't it just great? In my experience it's often the in-house technical team that ends up being overprotective about their turf.

And I kinda get it, I've been in-house tech leadership for companies where consultants have been pushed on me because they're someone's cousin or because they're a big company and therefore immediately trusted. But it can be frustrating...

I’m sorry that happened to you. Do you think that the engineer that ambushed you felt threatened by your candidacy? I’ve been around a bunch of engineers who hate hiring to “raise the bar”…
It's possible, I have also seen that, especially in small companies where everyone is very protective of their turf. I also had a terrible interview experience years after that where I was being interviewed for a CTO position by the company COO and the CTO that was leaving.

The CTO was really harsh in the interview, he gave me a bunch of brain teaser questions, followed by some algorithms questions where he was expecting one correct answer and would interrupt me if I was going a different way. We barely had any of what I would expect would be proper questions for a CTO interview (eg stakeholder management, people management, technical architecture)

It was so bad that the COO sent me a personal note apologising after the interview, but said that they had to go with the CTOs judgement on who was better qualified to succeed him. That was a pretty surreal experience and I think it was because the CTO already had someone in mind to replace him.

That’s not bombing the interview in my book, that’s just being thrown in front of a bus. Seems like they have terrible hiring practices.
The whole process was pretty informal as I never actually applied (they reached out because of my code!)

I’ll never know exactly what happened, but it I had to guess I think the CDO felt undermined by the “rogue” employees who sourced me as a candidate and pushed me through the process without his consultation…

Still sounds like a terrible hiring practice. You can have an informal hiring but still do it proper; at least make sure all the stakeholders are aligned.
Probably bullet dodged
presumably regarding the string reversing: they probably wanted a reverse in place (then making sure you handle the even/odd edge condition). however, Python strings are immutable, so you'd have to use a bytearray, but if you have a huge string, converting it to a bytearray, reversing the array, and converting back to a string would likely take longer than having python's string reverse function allocate a new string and write the reverse into it (I would have written both implementations, a timer, and test with increasingly long strings, assuming coderpad).

For the 'e' question: I mean, we learned functions to approximate e in high school. There's a summing series you can do to approximate it- were they expecting you to remember that off the top of your head (if so, you probably dodged a bullet). Otherwise, e*x is its own differential, so i wonder if you could write some terrible routine iterating from a random value to the right one by computing finite differences of various values.

If I remember correctly e can be defined as the limit of (1+(1/X)^x as x approaches infinity, so could simply plug in a very large x to approximate. Super simple, but something you have to know, and not very useful in the typical se job. these kind of trivia maths questions are really obnoxious.
> For the 'e' question

They were just expecting exp(x) = \sum_{i=0}^{\inf} \frac{x^i}{i!}.

Depending on the role it might be useless trivia, but it's not exactly an impossibly high bar tbh.

It's a rather stupid question because there are plenty of libraries that can do it better than you could come up with. It's the kind of thing that if I saw a developer wasting their time with at my company, I would immediately fire them, it's akin to rolling your own cryptography.
That series is the definition of the exponential function, literally high-school math.

As I said depends on the role. Normal SWE? Sure, it's trivia and a rather stupid question. For a more science-y or finance role, I'd be very concerned if the candidate doesn't know it.

What about a finance role requires one to know how to inefficiently produce approximations of known constants?
The real question is what else you don't know if you don't even know that...

The power series definition of the exponential function is basic mathematics, and is widely used in financial modeling. This cowboy attitude towards math is just depressing.

An alternative closely related interview question that's a favorite of mine is "please compute the monthly payment for a $200,000 mortgage over 20 years at 3% yearly interest".

You shouldn't be allowed to graduate high school without knowing how to do that, and you'd be surprised how many self-described economists can't answer it.

jesus christ, similar experience.

this kid wanted me to sort an array without using array.sort method in js.

that was the most stupid thing i was asked to do in my life, i had to end the interview.

i went as far as telling the founders they made bad hires. other red flags was overengineered web app, too buggy, no seo, no ogp, shit in mobile responsiveness.

their startup was defunct within 6 months, no wonder.

What is your approach to API design?
I'm curious to how you ended the interview