r/datascience • • Feb 15 '21

Job Search Please STOP asking Data Scientists about Leetcode questions meant for Software Engineers for job interviews

I've been working as a Data Scientist long enough to say that asking Leetcode questions for Data Scientists is completely disrespectful. This is both for both product and ML-based data scientists.

Something simple is fine, like hashmaps, two pointers, strings, some light algorithms etc. But graph theories, DFS with trees/dynamic programming has nothing to do with data analytics, ML fundamentals, statistical foundations, and data storytelling competence.

I really don't understand. When you have a wealth of ways to distinguish competent Data Scientists from juniors during interview pipeline (complicated SQL, pandas, data munging, visualization, ML training, building simulation code, etc.), why you'd rather choose questions like "how many moves do you need to get a Queen chess piece from this position to another on a chessboard" as a way of measuring how well a Data Scientist would perform analytics or ML training on the job. It really just feels like SWEs making fun of Data Scientists about how poor programmers we are.

Most companies don't pull crap like this, but for those who do, PLEASE STOP. Unless we received a BA or MA in computer science -- which majority if not most of us did not -- we won't be able to solve shit like this unless we cheat and look at answers directly on leetcode or geekforgeeks. And it's infuriating and embarrassing for us to sink to this kind of level to solve questions that aren't meant for us. I get that Data people need to know programming, but WE AREN'T SWEs, and DS is not SWE.

Edit: I'm getting a lot of replies saying that I suck at programming and I need to learn SWE fundamentals. I said over and over that I'm not against understanding foundations of SWE (hashmaps, runtime, pointers, optimized solutions vs brute force). These are important. But when you get into highly niched algorithm named after somebody where you need to do some complicated tricks or build a whole system that requires multiple functions, DFS-based dynamic programming, multiple inheritance methods all in 45 minutes that would unnerve even seasoned SWEs out of practice, that's when it becomes totally unreasonable, outside the realm of data science, and just disrespectful to what Data Scientists do on a daily basis. But that's the line I draw, and the overall question is: at what point do interview questions become unjustifiable and unrelated to the position at hand? I've spent years using pandas, scikit-learn, tableau, and complicated SQL for daily data tasks. Why is it that you can't test me on this stuff which occurs on day-to-day basis for majority of data scientists?

Edit Edit: Btw, shame on those of you just downvoting everything I'm saying without reading any of it (I can't even locate my own comments anymore). It's immature and completely ridiculous. I know it's the internet, but have some decency and respect for your interlocutors. You guys are all professionals right?

984 Upvotes

324 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Feb 17 '21

I personally agree with your coworkers that swe skills are more important than knowing math or stats for most tasks that data scientists are asked to do.

2

u/Fender6969 MS | Sr Data Scientist | Tech Feb 17 '21

Respectfully, I disagree with that. SWE skills are definitely important, but not nearly as important as math/stats skills for a DS. Using the example of building predictive models, it is literally an application of mathematical/statistical models/techniques using a programming language.

Model building and deployment is really just 20% of the requirements and once piece of the solution. DS are expected to interact with business to understand the problem, correctly frame this problem, collect and understand data, and then working on building models. For that 80%, good communication/PM skills along with strong math/stats skills is much more valuable.

Sometimes, models are built with the underlying goal of inference. Business may want to understand the relationships between variables etc. These models may never truly touch a production environment. Math/stats background here is much more valued than SWE skills.

An area that I find this a problem (even in my company as I mentioned) is around data analysis and understanding of the data. SWE's fitting DL algorithms for simple problems and not understanding the data/business problem properly is concerning.

One of the largest caveats is some of these solutions generalize very poorly in production, killing any buy in for future projects. This is a problem that I am currently facing. Often in these greenfield projects with small to medium sized companies, DS projects are seen as an investment with a "prove it" attitude. The result of the work those SWE's in my OP was that the VP's of those divisions no longer have interest in investing in DS projects. They state, “I invested $xx and received no value”. The models these SWE's developed were garbage and failed miserably in production. The fundamental reasons: did not understand the business problem, did not understand how to analyze data, and did not understand the math/stats behind what they were doing. It took months of meetings and convincing for senior leadership to buy into my current project.

An area that I agree that this would be more useful is more around the MLOps and deploying solutions (along with the obvious building of data pipelines, which is often a task that DE’s do). As I mentioned, ultimately for predictive models we are delivering code. And having a DS capable of creating production ready code is valuable. But, this is really a small part of the entire project. Hell, in 2020 I spent 8 months researching and developing a solution for a problem and I spent probably 1 month with our DE getting this solution production ready. My math/stats skills were applied daily and was valued much more than my development skills. I think this is the overall idea the OP was referring to :).

1

u/[deleted] Feb 17 '21

What math did you use in that 8 month project? I’m genuinely interested because I’ve used practically zero math beyond high school level in the last five years.

1

u/Fender6969 MS | Sr Data Scientist | Tech Feb 17 '21

Sure, we ran optimization models for a portion of the project. It was a good refresher as I haven’t worked on those OR problems since I was an undergraduate.

This project was in a very specific area that under a lot of research. A good portion was reading white papers trying to find the right approach (and model) for my problem as it has never been solved entirely in industry (our goal was to be first to market).

1

u/[deleted] Feb 17 '21

Did you actually have to do any math to run the optimization? When I’ve done optimization it hasn’t required any math. I just selected an existing optimization method that had already been implemented in python. I don’t think understanding how it worked even really helped. I had some intuition about which method might work best but I went ahead and tried them anyway just like if I had no understanding at all.

2

u/Fender6969 MS | Sr Data Scientist | Tech Feb 17 '21

Yes I did. Essentially the optimization problem breaks down to systems of equations. Define the objective function, constraints etc and you can leverage Python/R to run the optimization.

Without understanding how it works, how can optimization be done? How would you define your constraints and objective? You can use existing optimization methods, but it is up to the DS to properly understand the problem and generate the components. It is really pure math. The actual code was just small block containing these SoE.

1

u/[deleted] Feb 17 '21

Oh yeah if you were actually coding the equations instead of using an existing implementation, that counts as doing math for sure. I’ve never had to do more than just define the objective function and constraints and plug it in to an existing implementation. That doesn’t require any math beyond high school algebra. Maybe not even that much.

1

u/Fender6969 MS | Sr Data Scientist | Tech Feb 17 '21

Yeah I suppose that’s fair. I still these problems require a sound understanding of the math/stats concepts, especially when there’s expensive decisions to make using those models predictions. When it comes to deploying these solutions and building data pipelines, the SWE skills are far more valuable imo.