r/learnprogramming • u/Ok-Explanation9697 • 14d ago
Topic: algos Do you know algos so much?
Hii guys 🤘
I always have some troubles with algorithms and sometimes it makes me feel that programming it isn't for me. 😥
I'm a full-stack JS (React/Node) develor and I have 2.5+ years of experiecne. I've done a lot of features and made a lot of good decisions. I started programming when enrolled a uni and I'm obsessed with that from those days. I like full-stack cuz I always can do a full app without someone and I know the best practices for the both parts.
So I always hard with myself because of algos, I really don't have "mathematic thinking" and it makes me frustrated somtimes. I always think straightforward, I have not ideas how to solve a problem by a good way like from the other side yk. And I tried to solve some tasks on leetcode cuz an AI told me that it's just experience and I jsut need to know typicall patterns, and probably it helped a little but I couldn't change my mind and I gave up 😓 .
I rate myself around middle (beginner) but I really struggled with algos and I can't understand what's the problem - me or just experience. Cuz sometimes it affects on my job, for example when I need to create some algo it takes a while to write real good but not brute-force solution yk. 😖
One of my friend has such a good math thinking and I always compare myself with him, it's not so hard for him to find a way to solve some problem. He can resolve medium tasks on LeetCode without a lot of problems as me. Probably each medium task took a lot of my time. 😭
Guys how're ur deals with algos lmk pls. And pls share ur experience and stack. If u have some advice I'd be glad to give it from u. Thanks for advice 🙏
Peace ✌️
5
u/Available_Safe1818 14d ago
What are you talking about? What kind of "algos" do you mean? Is this just normal programming?
2
u/BranchLatter4294 14d ago
Learn how to think about the IPO model. Every program or function has inputs, processes, and outputs. It's just a matter of figuring out how to turn inputs into outputs using a few basic building blocks... Sequence, selection, iteration...
2
u/Droidatopia 14d ago
This answer to this is very much an it-depends kind of answer. I'm a non-stack developer, and I've worked in a variety of different domains. For the most part, understanding algorithms is much more important than being able to implement them or math them.
There are some basics. You shouldn't be doing a very large number of n2 lookups when you can cache the lookups in a hashtable first. If you don't grasp the basic concept of these simple algorithm considerations, you do need to learn those basic concepts or you will have issues.
Other than that, there have been occasional optimization cycles where I've had to crack open more useful algorithm knowledge to fix some slow processing.
I've also done a little advanced-math algorithms like implementing a tracking Kalman filter. That isn't something I knew how to do, so I just read dozens of research papers to try to speed-run the math involved.
To me, of far more importance is a solid grounding of how to use and apply good software patterns.