I can understand forgetting the quadratic formula, but the idea is taught to every school student who takes algebra.
- figure out what parameters should look like
- detect edge cases (e.g. division by zero when a==0 or sqrt of negative value)
- and discuss its usage (how to return 0, 1, 2 roots and how you signal it to the caller so it’s convenient)
And this is not a silent-wait quiz. When they seem confused I ask directly what it would return if `a` is zero. Or tell that a, b and c are parameters to such equation.
Anyway, maybe it’s sort of a TIL moment and I should stick more to fizzbuzz with periods changed or to string reversal.
But I feel confused about it as hell.
Actually looking up the formula for the first time in 20 years it's readable (i.e. doesn't use symbols I don't already know) so yes I'd be able to solve it. That's not guaranteed with every formula though.
I’ve been programming for a decade, was a Linux/cloud engineer a decade before that, I’ve had code on the front page of google, launched products for Microsoft, and had my code shown on stage at nodeconf and aws re:invent. I am currently top 0.07% on stack overflow. I can answer the other questions in this discussion easily. I would absolutely fail this.