by flowerlad · 7y ago · 0 comments
Most professional programmers only occasionally need to look into performance issues, but need to take complex things and simplify them with every line of code they write. And yet most programming interviews don’t evaluate this ability. I think this should change.
So far the answer I've worked out is:
Because its optimal solution to let talent flow through BigCo in SV. There is no domain or tech-stack specific stuff. So studying for the interview process allows the applicant to apply for multiple companies. At the same time it's a pretty hardcore process, so the company knows they are getting engineering talent that is a) smart and b) obedient.
For the rest of the world it absolutely doesn't make sense and that's why where I live, you don't see that style of interviews at all.
David Epstein's new book Range talked about academic research splitting domains into kind vs wicked. Kind learning domains are ones where "feedback links outcomes directly to the appropriate actions or judgments and is both accurate and plentiful", while wicked ones are "situations in which feedback in the form of out-comes of actions or observations is poor, misleading, or even missing". [1]
The hard parts of real-world software development are generally in the "wicked" bucket. Schoolwork and puzzle questions are both generally "kind" in the sense that there's a right answer and you're expected to figure it out. It's impossible to be too smug working on "wicked" problems because you get your ass kicked often enough to stay humble. But in "kind" domains it's quite easy to indulge one's desire to feel superior by dragging people through things you know well.
Personally, when I interview people I try to set things up so that there's no right answer; the goal is to see how well they get to good answers, and how well they collaborate during that process. I'd love to see more people do that.
[1] https://pdfs.semanticscholar.org/5c5d/33b858eaf38f6a14b3f042...
For example, I never understood Calculus I until I took Calculus II. I never understood Calculus II until I took the next class. Etc.
I am reluctant to believe someone has mastered simplicity until after they've mastered complexity, hence the complex interview does have value.
While I buy the premise, this seems like a strange conclusion. If a mastery of simplicity requires a mastery of complexity first, then testing for an ability to be simple tests for both kinds of knowledge, whereas testing for an ability to handle complexity tests only one–so what's the point?
At first I had a distorded view of what is complex. I thought was complex was mostly foreign and a different perspective. With the right view point everything aligns onto a small line.
The more you read/see the more you get accustomed to that fact. The more you see that more != more complex, quite the opposite.
The math fields, not always I believe, but very often, runs after minimized models of anything. Even recursion is a way to reduce the infinite into a small/finite set of rules.
I’m not sure how I could ever incorporate a shower into an interview loop.
Interviews suck at evaluating anything that requires more than 40 minutes.
That sounds like a recipe for disaster, though. Simplicity that doesn't account for every corner case in the domain of the code[0] is false simplicity, a bad abstraction. The challenge of writing simple code is this: threading a single, unifying concept through all corner cases.
--
[0] - I.e. when writing a function, you don't necessarily have to account for e.g. the off chance of heap getting corrupted externally in the middle of execution of your code. But you'd better account for all the values your function might be called with, in all combinations.
Some corner cases influence the core algorithm some don’t. Checking for degenerate cases and so on may not influence the core algorithm, if so need not be done in an interview.
Your approach is just more of that.
Yes, making code that is easy to read and less bug-prone is good. But at the end of the day the customers are going to be running your code millions of times a day, and if you need to make the code slightly harder to read to improve performance, then by all means do so.
If your code is only going to be run once and must be reliable, then you can make a different trade-off.
I know it's fun and exciting to optimise a function to perform at maximum efficiency, but people tend to forget that someone has to read that piece of code in the future and understand it.
All the fancy tricks might've given a 2% increase in performance, but made it 200% less understandable by anyone except the codegolfing optimizer trying to be clever. =)
But as it is normally understood, writing performant code is more about writing for fast performance with low time constant on everyday small inputs - something which algorithms and data structures interviews never touch on. Big O complexity is not directly related to performance, except for pathological inputs.
You can't spend two hours just setting up the tasks to be performed.