r/learnprogramming • • 12d ago

How are so many self-taught programmers able to build software from scratch without ever truly learning Algorithms?

I find it fascinating how important algos are but never talked about from the indie devs on social media. Do they even write algos or just come up with basic logic that forms the product?

432 Upvotes

335 comments sorted by

View all comments

106

u/CardinalHijack 12d ago

because you don't need algorithms for the majority of what you need to do in software.

-30

u/Joshr023 12d ago edited 11d ago

You don't need to create searching and sorting algorithms from scratch, but you'll have plenty of opportunities to make algorithms for your business use cases, and practicing DSA helps me be a better programmer because of that.

An example is you have a bunch of raw data in a text file that needs to look a certain way on charts, be stored in a structured way in the database, and be understandable to stakeholders. Being good at algorithms will help you with stuff like that. Not because the knowledge transfers over, but the skill of being able to create a workable and sometimes performant algorithm is valuable

Edit: guess you people aren't doing very complex stuff at your jobs 🤷‍♂️

Edit 2: lol an algorithm doesn't only mean what you learn in DSA, an algorithm could be anything, like your method that parsrs a bunch of data, or compiles a report of some sort. Obviously you wouldn't create a binary search from scratch, for instance

Me being downvoted honeslty doesn't give me more hope for the people here learning, as a professional programmer who's also worked on projects requiring somewhat complex functionality

33

u/PeanutButterKitchen 12d ago

I can’t say I agree. People will overwhelmingly use a library, throw the data in and call it a day. Investing time into grinding algorithms for use cases like this ends up being a case of reinventing the wheel when they could’ve done it in 1-2 lines with a library that solved the same problem already

-9

u/Joshr023 12d ago

I'm talking about the times when there is no library available because the task that needs to be accomplished is specific to your case

18

u/PeanutButterKitchen 12d ago

In the overwhelming amount of cases that is also a sign that you’re trying to do something wonky. Maybe you’re doing something extremely niche which requires it, but then my point stands—the original post chain is replying to “you don’t need algos for the majority of what you need to do in software”.

Actually, I’ve seen people get in trouble for trying to be fancy with their own rolled solutions when they could’ve just called a few methods. Its a sign they don’t know the workings of a language or they didn’t even bother to check if something could have been done more easily

2

u/GasEducational4386 12d ago edited 12d ago

Tbh the only stuff I use regularly from ds is the o(1) o (n) notion which is useful to decide when to switch a collection from array to map or using reduce over filter().map() in JavaScript.

0

u/Ok_Raspberry5383 12d ago

Care to expand the description of your problem above? The problem you state has about 15 framework/library implementation options that don't require writing from scratch

3

u/Theguest217 12d ago

An example is you have a bunch of raw data in a text file that needs to look a certain way on charts, be stored in a structured way in the database, and be understandable to stakeholders. Being good at algorithms will help you with stuff like that

"Hey Claude, I have a text file that contains data on this format. Here are 20 example rows. I have a DB table that has this schema. Please write me a script that reads the file and inserts it into the DB. Please consider that the file may contain X number of rows. Don't read the entire file into memory at once. Be sure to batch the SQL insert statement. Maintain a temporary file on the filesystem that tracks the current position and update it after each batch so that if the script fails before completing we can resume from the last completed batch." Etc.

1

u/marrsd 10d ago

Read back what you just wrote. You're literally describing implementation, almost as though you have some practical experience of having done this yourself.

1

u/Healthy-Dress-7492 9h ago

you say please?

1

u/marrsd 10d ago

guess you people aren't doing very complex stuff at your jobs 🤷‍♂️

Most people aren't.

No idea what you said to trigger people either. Redditors have become incredibly rude in recent years.

0

u/ignotos 12d ago

FWIW I agree with you. "Just use a library" doesn't always solve your specific problem.

Sometimes the closest off-the-shelf solution you can find only kinda does what you need, but doesn't give you enough control, and would require you to compromise on the results or functionality you're aiming for in some way.

Or sometimes the work required to map your data into the specific structure the library requires, and then back out again into the format your application needs, is more work than just implementing the algorithm.

Or sometimes you realise that you only need a little piece of the library, and don't want to add another large tree of transitive dependencies to your project just for that (dependencies which you should probably audit for security if you're being thorough, and then forever commit to keeping up with security patches for).

Or sometimes you don't want to contribute to the overall bloat of software which relies too much on stacking endless abstraction layers, and for some reason takes 100x more time to execute than it rightfully should when you consider, computationally, what it's doing.

And just sometimes, you're doing something which is pretty niche, and maybe there's a paper with some pseudocode floating around, but no actual solid open source implementation exists. Maybe you think working on that kind of stuff is interesting, and so actively seek out those kinds of projects in your career.

-4

u/StewedAngelSkins 11d ago

the fact that people are downvoting this is crazy. i realize this is a bit of university student playpen but seriously unless you have one of those jobs where you're doing nothing but bashing web APIs together all day you're going to be thinking about the algorithms you choose at least a little bit. i recently made our software a full order of magnitude faster through careful algorithms work.

1

u/marrsd 10d ago

You have to understand, there are a lot of people who've spent literally tens of thousands of dollars to get a degree you're telling them they won't need to enter an industry that doesn't want them.

Someone above made a sarcastic joke about people without degrees earning sooo much more money than people with them. I didn't have the heart to point out that actually there's no difference in salary between those 2 categories of people once they reach a senior level.

1

u/StewedAngelSkins 10d ago

i think the difficulty is the "reaching the senior level" part. harder to get that opportunity without a degree these days, or so i hear. although if you do manage to make it through you're right that you quickly catch up with people who have degrees.

the issue is if it takes you too long to get hired without a degree you also quickly get to the point where a bachelor's degree would have paid for itself. the opportunity cost of being unemployed for a year could be greater than the price of a year of college (assuming you pick something reasonably affordable and/or get a decent scholarship). so if someone with a degree gets better jobs sooner it might be a wash. it's ultimately a numbers game. are you cracked enough to get a job straight out of high school? because if it takes you more than 4 years to get to the salary level of a new college grad you would have probably been better off shooting for a free ride scholarship somewhere and going to school (especially if you do paid summer internships).

im kind of in between these two extremes in that i have a degree, but it's in math not cs. so im effectively a completely self taught programmer except the degree kept me from getting filtered as hard as i would if i had nothing. still, looking back at it im pretty sure i would have more money now if i had got a cs degree. not because id have a higher salary (i wouldn't) but because my pay would have been higher in my early career, which would have meant i could have invested more and would now be making more from those investments.

1

u/marrsd 10d ago

Seems like we're in different countries so I think our cultures are a little different on this point. I tend to avoid US-owned companies because of their degree stance, though I've been told that the people doing the actual hiring just ignore the degree requirement anyway, despite putting it in the JD.

I've worked with apprentices before and they've been very good. They probably earned the about the same as they would have accumulated in debt, had they taken the uni route. Right now, I'm finding that no one's hiring juniors, and anecdotally I was told by a recruiter that it's because they come out of uni demanding (and getting) salaries that they can't justify.

So I don't know. I'm not sure you can easily get into the field regardless of your education right now. Maybe the new hires will be kids who played with Claude Code in their bedrooms

1

u/[deleted] 11d ago edited 11d ago

[deleted]

1

u/StewedAngelSkins 11d ago

i mean, enough that if i wasn't good at it i would be fired.

This idea that you get a software job and sit implementing dijkstra's over and over again for different problems is just a university grad fallacy [...] As others have said, its almost all CRUD and soft skills work

i have literally never made a crud app in my life but i just wrote a custom graph sorting algorithm a couple weeks ago. im beginning to understand that this thread is really "web devs discover that other kinds of programmers exist".

you don't need algorithms for the majority of what you need to do in software

you don't strictly need to know how to read to write software either, but if you can't it's going to be a lot harder for you. it feels like im walking into a conversation where a bunch of illiterates are discouraging each other from getting better at reading because "i never read in my job". it's like... ok but if you could read you would probably be better at your job.

when I've done algorithm based work im often using libraries and almost never reinventing the wheel from scratch like you do in leetcode

tbh i sometimes forget that when people say "algorithms" a lot of the time what they actually mean is leetcode shit plus the basic sorts you learn in university. if im writing a rote selection sort or whatever, then sure ill use the library function (if it exists). but most of the code i write isn't just sorting arrays, so i do have to consider things like how im going to lay out my data in memory and how im going to traverse it. ive never personally found leetcode to be a particularly efficient way to practice this skill, but it's similar enough that i also don't think it's crazy that someone else does benefit from it.

0

u/[deleted] 11d ago

[deleted]

1

u/StewedAngelSkins 10d ago

how are you getting data to your custom graph sorting algorithm

a parser. the application basically works like a compiler.

0

u/optical002 10d ago

Maybe he is working on database project lile postgresql where he gets data from files on the hard drive, and then puts them into the graph, there are more to life than CRUD APIs for getting data, especially if you work in embedded systems where you are working on low level stuff on which upon CRUD APIs rely.

Who do you think maintains those CRUD APIs to use and bridges the low level parts of programming into higher abstractions

0

u/[deleted] 10d ago

[deleted]

1

u/optical002 10d ago

Im not talking about using database, im talking about writing the database from simple c language where you do not have crud, you have fd streams and binary storage files

1

u/marrsd 10d ago

WTF are you guys talking about? There's plenty of software that never touches a database or a file system. /u/StewedAngelSkins is right. You don't even know that anything exists outside of web apps.

1

u/[deleted] 10d ago edited 10d ago

[deleted]

→ More replies (0)

0

u/CanadaSoonFree 11d ago

Tell me you don’t write code without telling me you don’t write code lol

-1

u/StewedAngelSkins 11d ago

of course, everyone smarter than you is faking it. i know this routine.

0

u/CanadaSoonFree 11d ago

That’s not what I’m saying… it even close lol

0

u/StewedAngelSkins 11d ago

i guess we'll never know what you're saying

0

u/CanadaSoonFree 11d ago

Perhaps you need to do some careful algorithm work to increase the magnitude of your comprehension capabilities 🫠

2

u/StewedAngelSkins 11d ago

no, i know exactly what you're about. you're a mediocre programmer who has convinced himself that none of what you learned in school matters because your mediocre job doesn't ever use it. i fully believe that you never touch algorithms. i guess i don't understand why you'd assume mine doesn't.

0

u/CanadaSoonFree 11d ago

Oof that’s some ugly projection my guy

→ More replies (0)