Ask HN: Do you use algorithms / data structures?
A lot of technical interviews have algorithms and data structures questions to presumably test "algorithmic thinking" or whatever. But in practice, it doesn't seem like algorithms are used for day to day web development. Besides avoiding writing n+1 queries, what other practical applications are there for algorithms and data structures for web developers?
10 comments
[ 3.2 ms ] story [ 38.1 ms ] threadWait, what?
...Or am I missing something?
P.S: A good software engineer may also be self thought I do not want to be understood wrong.
Implementing a Fibonacci sequence or a prime number sieve is much different than implementing e-mail scheduling component with dynamic constraints. I think the reason why Algorithms/Data Structures are important for interviews is because they show not only your level of experience with the tool-set you use, but also deeper understanding of the inner workings of said tools.
Pretty much every web dev related thing you make is an algorithm at the end of the day.
Think of something as simple as a contact form. What's the algorithm to make this work?
1. Get input from user.
2. Validate input from user.
3. Setup mail headers.
4. Setup mail message.
5. Call a send message function.
Those steps can be expanded on to handle invalid input or errors in any of the steps, etc..
Your programming language will likely have #5 done for you too, but whether or not you're the one implementing the functionality has no bearing on the situation.
It's easier to teach the material when you're dealing with basic data structures like building a stack or queue in C using an array rather than some higher level web dev task.
Btw, I'm just someone who spent a few years not taking any CS courses and then took a few online courses to learn the things you're talking about + more. It was probably the best move I've ever made.
data structures for web developers ? Plenty. Heck for any developers. Think about lists, maps, dictionaries, hash tables etc. They are data structures aren't they ?
- The Algorithmist