DEV Community

Cover image for Are algorithms, complexity & data structures still relevant?

Are algorithms, complexity & data structures still relevant?

Valentin A. Popa on May 07, 2019

Given that this is my first article ever written, I will try to be as concise as I can. A couple of weeks ago my boss gave me the task to study b...
Collapse
 
flrnd profile image
Florian Rand

You probably forget that all that boring stuff still running under the hood.

I wonder how did you come to that question?

Do you know that the Human Genome mapping was a success thanks to the application of such algorithms (Highway mapping)?

So, it's not only about programmers, you know, there are a lot of improvements now days thanks to things like that. And this is why they are still relevant.

Interesting topic tho, thanks for sharing!

Collapse
 
alvpopa profile image
Valentin A. Popa

Hi Florian and thanks for your comment!

I've explained that I will interview for a big company so that's why I've raised this question. I'm not arguing that everything under the hood remains the same, but why put so much effort in this part of the interview if there's a small chance to use them in the future?

I'm only asking this question about being relevant in an interview related manner. I'm aware that learning this topic makes us better devs, better human beings in fact.

Collapse
 
flrnd profile image
Florian Rand • Edited

My apologies because I think I misread that part (And I did read 2 times because I wasn't sure... I'm sorry!!).

One of my best friends work in HR. She tells me every time that a recruit process is no joke. I guess every industry has it way to filter candidates. At least, being positive about it, you can train and prepare yourself for interviews.

Long long ago (in a far away galaxy) when I applied for design positions, like in development interviews I had to do some design tasks to prove my talent. I was rejected for things so stupid like 'I like what you did but it's not trendy enough'. So we have here another topic, about interview process itself.

Like I said before, interesting topic tho (and good luck with your interview ;)!

Collapse
 
anduser96 profile image
Andrei Gatej

Hi! Thanks for sharing.

IMHO, algorithms and data structures are quite necessary as they improve your problem-solving abilities.

I think developing a problem-solving mindset is very important, which is why I try to solve small, logical problems daily.

Regarding the interviewing process, I partially concur with your ideas. A logical problem will let the interviewer get and idea of how you think.

One thing that shouldn’t be missing in an interview is a set of questions that are relevant to the position you are applying for.

At the end of the day, in my opinion, it’s all about solving problems with the tools you have.

Collapse
 
alvpopa profile image
Valentin A. Popa

Yes, I agree with you. Basic knowledge, pro & cons, when to/not to, differences between different data structures etc. is important and should be in every developer bag.

But during a technical interview where the nerves are already tense, I'd rather appreciate a correct identification of a problem, an answer to that problem and the steps you're going to need in order to improve your first result if needed. "..solving problems with the tools you have".

Collapse
 
xngwng profile image
Xing Wang

Definitely. I saw developers who wrote code that seems to work, when you are just testing as one person, but then you look at the source code, and immediately see if you have more than 1000 users, it will crash and burn. Bad algorithms.

Collapse
 
xngwng profile image
Xing Wang

although one thing I would add, is that, it is also important to know when an efficient algorithm is must, when it is not. And when seemingly more efficient algorithm isn't right for your use case. That comes from learning about system design and software architecture.

Collapse
 
simonhaisz profile image
simonhaisz

Like most things, the devil is in the details. So my opinion would be heavily based upon what the question "are algorithms, complexity, and data-structures still relevant?" means.

If it means knowing when to use a List vs a Map vs a Tree, then yes! That is a core concept that applies to pretty much every type of programming. I wouldn't include questions about them in an interview though, unless it was a new-grad/no-prior-experience.

If it means implementing a Red-Black Tree, or performing an amortized analysis of an algorithm, then probably not! The vast majority of devs will never need to apply this knowledge. And this is not a result of 'technology getting faster so you don't need to worry about performance'. It is a matter of 'technology has improved in various ways that we need to think about performance differently'. Knowledge about algorithms and data-structures was the most important subject to know in a world where all the data was in memory and processed in a single-thread. With the advancements in distributed & cloud computing, network latency & bandwidth, multi-core & hyper-threading, etc, what you really need to know about these days is caching, paging, parallelism, sharding, and indexing. When I read about people here interviewing for a Front-end JS position and they're asked questions about implementing a double-linked-list it just makes me want to flip the metaphorical table...

Collapse
 
alvpopa profile image
Valentin A. Popa

Exactly my point! Chapeau, sir!

Collapse
 
deciduously profile image
Ben Lovy

I'd argue they've been part of the interview process because they're integral to effective programming. Sure, you might not need to implement a doubly-linked list on the job, but you should certainly know how it works under the hood and what the pros and cons of using it are. I don't think any part of that knowledge has become any less relevant.

Collapse
 
alvpopa profile image
Valentin A. Popa

Hi Ben and thanks for reaching out!

Whilst I agree with you about the importance of knowing this topic, I'm trying to understand why the implementation of this knowledge during 45-60 minutes interviews is this important. I'm talking about problems as egg drop puzzle or knapsack problem etc. because this kind of situations may (very) rarely occur in real life apps.

Collapse
 
ccheptea profile image
Constantin Cheptea

Let me put it this way: would you hire a chef who doesn't know what salt and sugar taste like? I mean, they look pretty much the same, don't they? But imagine Coca-Cola with salt instead of sugar.

My point is: you'll never be able to write decent code if you don't know the basics. Asking for help on StackOverflow is not good enough.