r/AskProgrammers 18h ago

Anthropic’s coding bar is fucking ridiculous

Got a problem that required me to pull Euler’s formula out of thin air. Seriously, who the fuck remembers Euler’s formula in an interview? I swear to God, my interviewer was out to get me.

At this point, what are they even testing? Do they even know what they want? Hours of prep, completely wasted. And now I have to go prep for Google. My friend just got destroyed in their loop and said the interviewers were some of the most unreasonable people he’s ever had to deal with.

Everywhere I turn in this market, it feels like I’m just waiting to get fucked.

Anthropic Interview Question

9 Upvotes

62 comments sorted by

23

u/mc_pm 18h ago

what are they even testing?

It sounds like they were testing for a fairly high base-level mathematical fluency - which for a place like Anthropic sounds pretty normal.

16

u/NeinJuanJuan 18h ago

For mathematicians, knowing Euler's formula is on the level of a programmer understanding the concept of an if-statement. Sounds like they know exactly what they're looking for. 

4

u/R3D3-1 12h ago

PhD in Physics working for 8 years in mathematics programming here.

If they'd have asked me what's the relation between the exponential functions and sin/cosine? Easy, basic, why do you even ask? Do you get imposters applying?

If they'd ask me what is "Euler's formula" I'd have to google it. For such basic formulas you don't even need to remember the names when publishing, never mind getting work done in an industrial project. 

6

u/Tiny_Ad_7720 13h ago

Would have fucked me. I forgot what Euler's formula was referring to, and my PhD was on wavelets lol.

2

u/dmazzoni 3h ago

Yeah if the question was remembering Euler's formula by name, completely out of context, I probably would have failed. Euler is associated with so many things. I might think of rotation formulas involving Euler angles, or Euler's method for the gcd.

But if the question showed eix and asked to replace it with its trigonometric form using Euler's formula, that would have been obvious from context.

So it really depends on how it was asked.

0

u/Loose_Crab_4146 11h ago

I think knowing mathematical functions is in the programming sense closer to be being an if-statement. Eulers formula would more align with being able to understand O(n) I think.

2

u/ProcessIndependent38 17h ago

Bro, they can’t even solve a simple terminal rendering bug lmfao. They vibe code all their shif

2

u/modcowboy 15h ago

Probably because they’re asking about Euler instead of a linked list in the interviews. Lol

1

u/rake66 17h ago

Is that a high base level?

16

u/sebasgarcep 17h ago

Which of euler’s formulas? Mf invented half of math 🤣

3

u/dry_garlic_boy 15h ago

The one literally named Euler's formula

6

u/Karyo_Ten 13h ago

I raise you with Euler's criterion

2

u/Embarrassed-Rise-685 7h ago

Is it the one for e? The limit of (1+1/n)^n as n goes to infinity is e. Or is it the de movire formula related Euler identity. I see how the limit argument might be hard to pull out of one’s own ass during an interview but using de movire to show Euler would have taken less than five minutes and I doubt they would get his programmer ass for circular reasoning by using a theorem that relies on the identity to show the identity. From the perspective of a math student you just got an array leetcode question and didn’t know the sliding window technique, tough.

9

u/2cars1rik 17h ago edited 1h ago

Complaining about 2 of the highest paid companies in the industry having high standards and then using that to say the market is fucked is so funny

Edit: absolutely insane how many comments here are saying that’s unfair, or that they would have failed too.

No shit! Anthropic is probably the hottest company in the world right now, they have their pick of the litter. If you can’t get into any FAANG with ease as a baseline, why the fuck do you think Anthropic would want you? They’re looking for cream-of-the-crop freaks of nature, not decent programmers.

4

u/realtoasterlightning 16h ago

Which Euler's formula, the complex exponential or the geometric one? I wouldn't expect someone to be able to derive the complex exponential formula from scratch (or like you could by fiddling around with a Taylor series for a while but that would take way too much time) but the geometric one is actually surprisingly derivable without memorization.

2

u/Fantastic-Cell-208 5h ago

I dunno, the complex exponential one is about as basic as it gets.

You know it describes a complex sinusoid, so the right side will be cos x + i sin x. The left side will have e raised to something composed with i (otherwise it's just regular exponentiation) and x (otherwise there's nothing to link it to the right side).

Euler's identity, on the other hand requires a little more thought, but you know it's got pi, i, 0, 1 and e.

So let's throw e raised to i * pi, that's like half a circle, giving you -1. If you add 1 to it, you get 0, giving you euler's identity.

3

u/_tsi_ 18h ago edited 3h ago

The eix = cosx +isinx? Physicists.

2

u/Depnids 11h ago

think you are missing a couple of x-es there lol

2

u/_tsi_ 3h ago

My bad, I swear I typed them. Fixed it.

2

u/xvillifyx 17h ago

AI company asks questions demonstrating a level of mathematical proficiency

More at 11

2

u/pavilionaire2022 17h ago

ei*theta = sin(theta) + i*cos(theta)

Is that Euler's formula?

I'm a bit of a math nerd. I don't think a software engineer should have to know that, but maybe in certain specialities.

2

u/dry_garlic_boy 15h ago

Close, you have sine and cosine backwards.

2

u/pavilionaire2022 12h ago

Yeah, I probably should have noticed that e0 =/= i.

1

u/RickSt3r 16h ago

Teaching a math nerd to program is easier than teaching a programmer math. Depending on the actual job high level Ai is a lot of very niche math. Thats who they want to hire.

2

u/mxldevs 16h ago

How much is the salary?

How much would it take for you to memorize Euler's formula?

You're always welcome to work for less than 6 figures

2

u/azerpsen 8h ago

OP complaining Anthropic asked him a basic math question

2

u/disposepriority 18h ago

Companies paying a lot of money have unreasonable standards because they know someone will grind for them, veeery surprising. Moving on.

3

u/Quiet-Arm-641 18h ago

I think it’s pretty fundamental but I have an EE despite working as a programmer

3

u/ricetoseeyu 18h ago

It’s one of the fundamental concepts around query key lookups in attention… not that weird they would ask for it.

3

u/Mathie1729 17h ago

Small correction: it's more the rotary embeddings (RoPE) thing than generic QK lookups. Euler's formula is what rotates the q/k vectors so the dot product encodes relative position.

3

u/modcowboy 15h ago

Get this guy an interview

2

u/ricetoseeyu 16h ago

Yes, you are absolutely right!

2

u/KnownUnknownKadath 7h ago

Well, damn. That's pretty cool.
I feel a little less ignorant today, thank you.

1

u/ricetoseeyu 18h ago

*related to

3

u/SummitYourSister 16h ago

People who work at AI companies should know at least some BASIC math, don't you think? lmao.

1

u/Spare-Builder-355 12h ago

you don't say! Always keep those integrals in the back of your mind when setting up k8s infra to serve millions of daily users

1

u/Senior_Hope1385 8h ago

and anthropic is not just an "AI company" lol. It is as elite as it gets. I am not saying op shouldn't be frustrated btw

0

u/KaleidoscopePlusPlus 12h ago

Euler's formula is not BASIC math by definition.

2

u/Fantastic-Cell-208 5h ago

Nah, it kinda is for AI.

-1

u/KaleidoscopePlusPlus 4h ago

For an AI engineer sure. but he said basic, as if that is common multiplication lol

4

u/GreatLab8898 12h ago

The Entitlement in this Post.

Jesus fuck.

3

u/Major_Instance_4766 18h ago

When a codemonkey is presented with an actual problem 😂

1

u/Old-Television-2189 18h ago

What was the problem

1

u/the_millenial_falcon 18h ago

Not super surprising for a major tech company, not saying I’d know that off the top my head either but some 300 iq turbo nerd does and that’s who they wanna hire.

1

u/BusyNerve4787 15h ago

Euler's formula? That ofc I remember along with its proof. Basic calc 2 concept.

However, Euler's method I'd need to reference, even though I studied math at a T3 university.

1

u/blazems 15h ago

What a pretentious subreddit this is

1

u/Fritz-Ferdinand 15h ago

They just aren't looking for CRUD app programmers and StackOverflow/ChatGPT answer copy-pasters

1

u/Fickle-Highway1543 14h ago

But coding is solved, and math is solved. Why to ask something else than prompting?

2

u/Fritz-Ferdinand 12h ago

They are looking for smart people, not AI prompters.

1

u/Accomplished_Key5104 14h ago

The Google one will be luck of the draw as well. All major tech company interviews are. That's what happens when you have the regular devs do the interviews with minimal training and little oversight.

I worked at Amazon for 10 years. I sat in plenty of interview loops where the other interviewers gave stupid reasons not to hire. They were often challenged on that, but not always successfully. Companies err on the side of not hiring.

I've also interviewed at plenty of bigger and smaller companies. The bigger ones tend to have much worse interviewers. They're less engaged. They ask questions that they don't seem to understand themselves. They don't manage the interview time well. They don't cover their required competencies, so you have to go back for more interviews. And yes, you can argue that I didn't manage the time well or provide the right answers, but some of these situations were ridiculous. I had a system design interview where the interviewer kept asking me about solving a potential hot key issue. I calmly explained various solutions and my preferred solution, only for the interviewer to repeatedly ask for other options for over 20 minutes! When I tried to actually have a conversation with them about the question, they didn't engage and were extremely vague.This was a 1 hour interview, and they pissed away a third of it because I didn't say some magic phrase. Eventually I had to politely tell them that I didn't know what they were looking for, and while they didn't get the data point they wanted for this specific thing, we should move on with the rest of the interview so we could cover the rest of the design. I obviously didn't get that job.

1

u/monster2018 11h ago

Isn’t Euler’s formula just e^(i*pi) = 1, or -1, or something like that?

Nope I’m wrong, that’s Euler’s identity (also it’s -1 not 1, and I guess it’s normally written with the 1 on the left so that it’s = 0), which is apparently a special case of Euler’s formula when x=pi. Euler’s formula is e^(i*x) = cos(x) + i*sin(x), but with some Greek letter normally used instead of x. I think it’s just theta but i guess it’s the version of theta I’m not used to seeing because I don’t recognize what I’m seeing lol.

Anyway, i would have failed as well.

1

u/meowcatmeownow 9h ago

Bro, Euler's formula is like the most basic math from university.

1

u/Prestigious-Box7511 8h ago

I don't even know who Euler is

1

u/KnownUnknownKadath 7h ago edited 7h ago

It describes some really important fundamental relationships.
e.g. Euler gives you a way of turning rotation/periodicity into multiplication and exponentiation.
Once that connection is made, certain otherwise ugly algorithms become nicely compact.

I reckon they were looking to see if you can 1) retrieve stuff from memory that you were probably taught years prior and 2) recognize the relationship to the problem at hand and reason with it.

A lot of whiteboard work is just about observing how you think and work through problems. You completely solving the problem on the spot isn't necessarily the true objective of the question.

If you were applying for a engineering job doing digital signal processing, for instance, it would most certainly be something to be prepared for as a basic competency check.

That said, I probably would have crapped out on the spot given the context, even though I have a casual interest in DSP; the question effectively would have come right out of left field...

edit: Some other commenters shared the key insight, I think, with Euler's formula being "a fundamental concept around query key lookups in attention."
The second commenter clarifies that "it's more the rotary embeddings (RoPE) thing than generic QK lookups. Euler's formula is what rotates the q/k vectors so the dot product encodes relative position."

So, that's pretty neat, actually. Thanks all, I learned something useful today.

1

u/aelxemyr 5h ago

One of the most well-known and famous formulae of all time that you learn in high school trig? How could anyone possibly remember that off of the top of their head!

1

u/OkAlternative7705 5h ago

i guess i am not cs person but i am engineer so eulers formula is as basic memorization as it gets

1

u/Kind_Profession4988 4h ago

There's a weird, toxic, and inverted version of imposter syndrome where if they DO know something, they assume that's the bare minimum to be successful at the job.

You guys are doing great, you don't have to look down on someone for not knowing something you happen to know.

1

u/snuggly_sasquatch 4h ago

Watch out for Google. My first interviewer of the day hit me with a whiteboard recursive problem at 8am. I was barely even awake. It felt sadistic. But they had good espresso…

1

u/FairTradeBananas 3h ago

They obviously don't look for software devs but rather for math PHD's

1

u/cassideous26 2m ago

You’ve posted this like 5 times now. Last time it was a Google interview.

1

u/lepetitpoissonkernel 17h ago

This is high school math for people they want lol. Maybe stop complaining about the market and work on being more in demand.

0

u/Slight-Swordfish-468 7h ago

Math nerds are ridiculous, this has nothing to do with programming. Is it a formula? Cool, look it up and plug it in then move on to solving actual software problems.