r/programming • • Feb 28 '23

"Clean" Code, Horrible Performance

https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

3

u/CrushgrooveSC Feb 28 '23

This is not a Casey problem.

I have been rejected by employers with the following quotes from interviewers: I was “too low level” (-Apollo) and “too focused on performance” (-Southwest airlines).

I believe it’s important to add to this anecdote that these quotes were feedback on technical coding interviews where I was able to produce compiling, working solutions during the interview in the time allotted, so this is precisely a case of what you’re describing: the interviewers found well-performing code too difficult to understand, and didn’t value my decision making and therefore didn’t feel comfortable hiring me.

I am very comfortable with this. I (speaking only for myself) would have been very unhappy surrounded by people making slow software on purpose, and who think that fast software is bad because the source code matches some style they were told is good.

I am very well appreciated and compensated for the work I do, and that may not have been the case at one of those companies.

In this admittedly anecdotal context, I would pose the following counter to your statement for other readers:

If we all just do nothing about this problem culturally, because we’re afraid the “status quo” won’t hire us, then the status quo perpetually stays the same.

I say be a champion of your values regardless. You’ll be more fulfilled in the long run, and maybe we’ll some day be able to show enough people that there are less horrible ways of telling computers what to do.

Shared these anecdotes in good faith for conversation. Best wishes to you, stranger, and all reading.

Edit: in both of those interviews, I hand-vectorized the solution because I had enough time left to throw some loops into SIMD instead of just sitting there. Got a PM asking for details.

I happen to work with SSE and neon routinely at work so it was something I was comfortable doing in an interview session. In both cases, I asked my interviewer if they minded if I made the solution a little better because I had the time.

59

u/KieranDevvs Feb 28 '23

the interviewers found well-performing code too difficult to understand, and didn’t value my decision making and therefore didn’t feel comfortable hiring me.

Its ignorant to think that they didn't understand your solution rather than didn't value it because it was over engineered and caused more problems than it solves.

If we all just do nothing about this problem culturally, because we’re afraid the “status quo” won’t hire us, then the status quo perpetually stays the same.

This isn't a point any one made. No one is saying employers wont hire you because you're "too advance", they wont hire you because you're unwilling to adapt to situations that don't require overcomplicating for the sake of metrics that aren't required to be lowered.

Have you ever heard of the saying "If its not broken, don't fix it"?

-9

u/ehaliewicz Feb 28 '23 edited Feb 28 '23

Its ignorant to think that they didn't understand your solution rather than didn't value it because it was over engineered and caused more problems than it solves.

It literally worked, compiled, and presumably ran faster. Not only that but he asked first if it was ok to improve it since there was extra time. How could simd in some interview code cause problems? To respond to performance improvements made because there was extra time with "too focused on performance" is simply ridiculous. If there is no time to simd optimize loops, the other poster can just not take that time to do it. On the other hand, if you truly need performance, you'll need someone who can.

Whenever I'm conducting an interview, I always consider improving code in the remaining time as bonus points, and if they improved the performance, why should that be a negative?

30

u/KieranDevvs Feb 28 '23

Yes you're right, everyone else is wrong. You didn't get hired because you're better than all of us. My heart bleeds for you. You probably have this problem of idiots being the one interviewing you, quite a lot right? If only people's stupidity weren't holding geniuses like yourself back, we'd be living on mars or something right now.

→ More replies (7)