How much are data structures and algorithms used when working as a software developer?
The usual answers to this question are either ‘All the time’ or ‘Never’.
My thoughts on this have changed over the span of 7 years.
Intern / Trainee:
They asked me to use a cache!
JavaScript sucks at this kind of stuff. I will use C++ with Knuth’s algorithm of dancing links to speed it up. The datatype will be integers, so maybe I can use Maxwell’s equations to…
My answer then: They are used all the time! Every millisecond counts!
Fresher:
Hmm, I need to read the codebase they have. Maybe I could use some algorithm here to speed up the cache. No…the idea is too rigidly based on the datatype. Some other day perhaps.
My answer then: They are used, but only by the senior developers. They write the infra code. I can't find the time between bug fixes and feature requests.
领英推荐
Second Year:
My cache has a bug. And a memory leak to boot. Let’s copy paste this code from StackOverflow. It has 200 upvotes, so it must be perfect. Better meet that product manager now.
My answer then:?No one uses algorithms except research guys or very senior developers. They probably pick up the code from elsewhere anyway.
Now:
We need a cache. It should be extensible. I’ll take advice from my colleagues on how to make it easily useable and scalable. A custom expiry algorithm here will be perfect.
My answer now: If necessary,?I’ll write the algorithm myself.
Apart from the above, we use algorithms and data structures to understand how systems work. Have a look at?Consistent hashing?and?NoSQL Databases. You need a strong base of algorithms to ever design something like that.
What describes our growth as software engineers is:?The more senior we get, the more relevant algorithms become.
Successful products are difficult to manage, and those problems often require advanced knowledge.
If you are preparing for system design interviews, here is a video course with 10 detailed designs: InterviewReady.
Have a great day!
Passionate Technologist| Driving Real-Time Tech Solutions in Retail- Sourcing
3 年Gaurav Sen this is nice question you asked. I think people do not use DSA while implementation actual solution. They just study or solve problem for cracking interviews. Once they landed in job they use basic programming.
Senior Software Engineer @Pratishthan Software Ventures Pvt. Ltd | Finacle Payment | Backend Engineer | JavaScript, Node, Linux, DevOps
3 年Love this
NMF Founder and CEO, University Teaching, Int'l Development, SDGs; Focusing: Climate Action, Gender Equality, Environment, Good Health, Quality Education, and Well-being for PWD & MH; ex UN (FAO and WFP), and ex CARE USA
3 年Gaurav Sen, all the best form Naifa Maruf Foundation
Scaling Tech @ Limechat(YC W21)
3 年Given a laptop with the internet, I can write, understand any algorithm, data structure, I can solve any problem that is there in the system that requires some algorithm to be used, what I cannot do is "solve an algorithm trivia, where imaginary problems are designed and then judgement is made whether you are qualified for the job or not".