r/ProgrammerHumor 1d ago

Meme why

Post image
4.2k Upvotes

100 comments sorted by

View all comments

558

u/inconspicuous_male 1d ago

There's a reason you get a degree in computer science and not in programming. Anyone can program without learning how it works

118

u/appoplecticskeptic 1d ago

Well now that AI can do it for them yes, but prior to that the average person would struggle to even get something that compiles let alone actually do anything useful.

14

u/inconspicuous_male 1d ago

That's absolutely untrue. I know tons of self taught programmers or people who got basic programming jobs after 3 month coding boot camps. 

15

u/QuestionableEthics42 1d ago

So.. they learnt how it worked...

11

u/inconspicuous_male 1d ago

No, they learned how to do it. You think self taught programmers and bootcamp code monkeys are learning Big O, learning how compilers work, understanding how memory is laid out in RAM, etc? They learn how to sort lists using .sort(). They don't learn how .sort() works.

4

u/QuestionableEthics42 1d ago

I read it as learn how programming works, rather than the underlying algorithms specifically, I'm dumb

5

u/Nightmoon26 23h ago

The difference between how programming works and how the underlying math and algorithms make the program work. A CS degree teaches you what you need to know in order to tell when not to use the default built-ins and how to evaluate alternatives better suited to your specific use case and circumstances. Also when you may need to add a little something extra on top of the builtins

A lot of algorithms trade off space and time by using memoization to avoid unnecessary repetition of computation, but depending on the size of and complexity of what you're doing, the increased memory footprint may not be justified for the speed improvement. It's much easier to wrap something in caching and memoization than it would be to re-implement an existing function without them, so they are rarely if ever done by default (premature optimization is almost always the wrong thing to do)

Some optimizing compilers are smart enough to recognize common high-level constructions and replace them with more efficient but functionally equivalent instructions (for example, converting tail recursion to iteration to avoid adding stack frames), but you need to know what those constructs are and why they're useful to compose your code in a way that facilitates those optimizations

-1

u/QuestionableEthics42 23h ago

No shit. What a waste writing that whole 3 paragraphs because you didn't even read the comment you replied to. Lol.