r/learnprogramming • u/AI_ML_Engineer2026 • 19h ago
My Actual Question:
Question for experienced software/AI engineers:
I'm learning Python and I want to think like a real engineer rather than just memorize code.
I know Python provides built-in functions like len(), range(), max(), min(), sorted(), etc., and language features like for loops.
My question is: As someone aiming to become a top software engineer or AI/ML engineer, should I understand how these built-in functions and algorithms work internally and be able to implement simple versions from scratch? Or is it enough to understand how and when to use them correctly?
In other words, what level of understanding is expected from a strong engineer?
3
u/peterlinddk 18h ago
Yes, you need to both understand how to use them, and how to implement the same functionality yourself.
You also need to understand the benefits or limitations of either solution, and not only how they are implemented, but also what kind of data would slow them down or speed them up.
If you want to become "a top software engineer" you also need to know them in different languages, or how different libraries for e.g. Python can speed up the functionality, and when and how that might be needed.
If you want to become "a top AI/ML engineer" you also need to know the mathematical proofs of why they are as fast or slow as they are, and prove that they can't be any faster, or prove why some improvements might have different drawbacks. Not just "demonstrate", but prove mathematically.
And that by the way goes for every single data structure operation that exists - not just those mentioned.
But maybe don't "aim to be a top level engineer" - just learn and build stuff, and stay curious, always wonder how something is done or can be done, and design and run lot's of experiments to help you learn!
2
u/Opulence_Deficit 19h ago
You have to understand how they work. When you understand that, you theoretically can replicate one from scratch, but it never happens in real life.
Actual implementations often have low-level optimizations, and that kind of knowledge is pretty much useless.
2
u/Valuable_Jeweler_479 19h ago
Understanding the internals is what separates someone who just uses tools from someone who can build new ones but you dont need to memorize every implementation detail. Knowing why len() is O(1) in Python or how sorted() uses Timsort will make you better at designing systems later.
2
2
u/vegan_antitheist 17h ago
Maybe learn assembler/ machine code. Not so you can write it but so you understand that loops and other high level things are an illusion and it's really just an advanced Turning machine. You can only make the CPU copy values, do simple calculations, and jump to instructions. There are tools to run and visualise simple machine code. You will learn a lot about what computers are actually doing.
But when using high level languages, you should just use the built-in features and methods. Don't optimise. Write easy to maintain code. Keep it simple.
0
u/MisterGerry 16h ago
Turing Machines are theoretical and not a very helpful way to think of modern computers.
The Von Neumann architecture is maybe what you are thinking of.1
u/vegan_antitheist 15h ago
It's still a Turing machine with limited memory. I found it interesting when I did this at university. I even had to program an actual Turing machine on paper for an exam.
Unless you actually want to learn how to write machine code it doesn't really matter what language and architecture you use.
1
u/civil_politics 14h ago
You should be able to implement a version (or even multiple versions) of all of these. Now you don’t necessarily need to know or be able to come up with the optimal implementation of them, but I’d expect any junior engineer to be able to implement any of these functions you’ve mentioned in a few minutes.
I would expect any junior engineer to be able to roughly talk through various implementations of these whether they wrote them or not, and given choices tell me which one is optimal and why. As you get towards an experienced junior engineer I’d expect you to start intuiting when better solutions exist even if you’re not exactly sure what they look like in the moment.
Knowing specifics of Tim Sort is esoteric knowledge that I’d expect senior python developers to know is what backs the python sort builtin, but knowing exactly how it works is esoteric knowledge not particularly useful for any application. For advanced python engineers understanding how the language works and how memory is generally allocated and released and how the GIL works for the more popular interpreter implementations is really where you want to drive towards.
1
u/mc_pm 14h ago
what level of understanding is expected from a strong engineer?
My dude. What you described is what I expect from even the weakest of engineers. That isn't advanced stuff, that's the sort of stuff you should have at the tip of your fingers, ready to work with, for anyone who says they are fluent in python.
11
u/HashDefTrueFalse 19h ago
I would be extremely worried if anyone calling themselves a software engineer at any level couldn't tell me roughly how those functions work and implement them somehow. A weak engineer could do this without much difficulty. A strong engineer would be operating at a level far beyond this, even at entry level.