r/Python • u/scartfife • 9d ago
Discussion PYTHON 🆚 ALL ...
"If you want to learn programming, don’t start with Python; you should start with another language."
This advice seems ridiculous to me, even though I hear it everywhere. Can someone explain this advice to me... and are they right?
4
u/rando1-6180 9d ago
This advice assumes programming means learning how memory works, stack vs heap, stack frames and how is impacts function calls, contiguous memory allocation and pointers, compiled vs interpreted and JIT.
Python's runtime manages and separates much of this, letting you understand the context of why you are programming rather than how the computer architecture and OS system calls support 'how' your program operates.
If you see programming as writing code to direct a computer with minimal ceremony, then Python and other high level languages work perfectly fine. If you want to learn more, you can incrementally go deeper. When you do this, you will have a more structured and methodically incremental approach.
They might have learned that way, but that doesn't mean that is the best or only way. I grew up learning C, Pascal, Fortran, eventually C++, SQL and Python. Learning about data structures and algorithms is fine and interesting, but that knowledge does help you learn to program today.
7
u/zazzedcoffee 9d ago
Python hides a lot of what is happening "under the hood". This can lead to people not understanding core topics in development such as computational complexity (E.g. understanding why repeatedly calling my_list.pop(0) isn't great for big data); although that is getting better: Time complexity of operations on built-in types.
In my own experience teaching, the lack of static typing also just confuses students more than it helps them.
-1
u/vivaaprimavera 9d ago
Worse ... The "damn bug" of
array_a = array_b
And when modifying array_b, array_a is also altered.
1
u/nekokattt 9d ago
thats the same in most languages when working with reference types
Java has the same issue when not using primitives or valhalla value classes...
-2
u/vivaaprimavera 9d ago
The same in most languages but in the context of "first language to learn"... It's a language that "looks so simple" that some people don't bother with "how things work under the hood" and that ends up bitting them in the ass.
3
u/UUDDLRLRBadAlchemy from __future__ import 4.0 9d ago
Yeah like the guy who called documented behavior a bug... Wait, that was you
0
2
2
u/deadeye_82_1 5d ago
Well, that's nonsense. Otherwise, you could also argue that assembly language is an abstraction too. You could write the instructions yourself in binary form. But even x86 instructions are broken down into smaller instructions by the CPU. Internally, the x86 is a RISC processor, but from an external perspective, it's a CISC.
Later on, if you're interested in the inner workings of CPython, you'll end up learning C anyway.
This has become the norm for many people. First, a high-level language; then, at some point, the low-level language, to better understand the high-level language.
2
u/every-day_throw-away 9d ago
I think Python is still a good start for basic syntax and flow. Learn the basics there then pick up 2 more. C++ to force you to understand memory management and pointers and something like Java to teach you OOP. Then go back and apply what you learned to Pythoon.
1
u/UUDDLRLRBadAlchemy from __future__ import 4.0 9d ago
I started with Amstrad Basic and I turned out ok.
Learn the language you plan on using. Learn multiple so you can pick the one you like.
Definitely if you want to learn to program in python, python is the one to learn.
1
u/fab_dot_io 9d ago
Oh think I started with basic from commodore 64 (which gives away my age 😁). I didn't know much what I was doing but nobody could know so I was fine. Yeah play with different languages always helps. Do you know brainf**k by the way? It's turning complete 😁
1
u/akadeepesh 2d ago
I personally never found this advice particularly useful, although I agree that it applies in some situations.
I started my development journey with Python, and I've always found the possibilities of things you can build with it fascinating.
I think Python is a great starting point for anyone beginning their development journey. It lets you quickly turn ideas into real-world tools and programs that can actually be useful to you and others.
That feeling of building something yourself, seeing it work, and realizing you can solve real problems with code is incredibly powerful. It sparks curiosity, and I believe that curiosity is one of the most important things when getting started in this field.
-6
u/fab_dot_io 9d ago
Microcode -> assembly -> C -> python. Prove me wrong
7
u/johnklotter 9d ago
It’s the other way around. From high to low concept.
Learn programming, then learn how to do it good and why that’s so.
-4
u/fab_dot_io 9d ago
Why you say so?
You want to master machines without knowing how do they work?
I mean I'm a huge fan to start teaching quaternions to kids and then move down to natural numbers but really is the other way around.
Unless you want to be an amateur. In that case anything is just fine.
2
u/every-day_throw-away 9d ago edited 8d ago
Not everyone who programs is a CS major. The goal is not always to understand the stack, registers and pointers. Most people just need to upskill a bit to get things done.
1
u/fab_dot_io 9d ago edited 9d ago
I don't know. That was my informatics curriculum at high school. We are talking about things taught to 16yo kids.
I mean that that stuff is not candy pie but not rocket science either. Don't give it even a try looks like trying to run without knowing how to walk.
2
u/kcunning 9d ago
You don't master any subject by starting at the hardest level and then moving to the easier topics. When you're learning, you're building a framework, and the easiest way to do that is to start with concepts that are easy to understand (a variable stores a value that can change over time!), then digging deeper (data is stored in physical locations on the machine that you can reference via their address) and deeper (data is stored as a series of ones and zeros because binary is the base for all computing).
-1
u/fab_dot_io 9d ago edited 9d ago
Why you are assuming that low level means harder? And why are you assuming that you need to master it?
I mean I'm serious go to exuarch.com and build yourself a 16 bit microcontroller. There's a tutorial it won't take more than an evening.
You can't do AI in microcode. But assembly would seem pretty obvious. Because that's what happened back then.
You can't do AI in assembly, but you will feel that all that conditional jumps are just so inconvenient and that C flow control stuff are so great that it will look like cheating.
Now you can do AI in C but this is not the point 😁. Then python becomes just a way to be free and dynamic.
2
u/kcunning 9d ago
I know low level tends to be harder for new coders to grasp because I've actually taught them. Sure, I can quickly allude to the fact that binary and assembly exist, but that's not the same as teaching it. It's a fun fact that can be explored more in depth later.
As for 'mastery', I don't mean being an unquestionable expert. In the field of learning and education, it has to do with competence in a subject that's required before moving on to the next unit.
And as for tutorials, I've personally found that tutorials, without base knowledge, aren't effective. It's why the lab comes after the lecture, and it's why the Godot forums are filled with people stuck in 'tutorial hell.'
0
u/fab_dot_io 9d ago
My learning and teaching experience was quite the opposite. I mean I have also learnt informatics that way at High school, it wasn't exactly rocket science.
I mentioned to have a tutorial for exuarch.com because that's just what you really need to know about microcode and how CPUs work.
Really give it a try. My point is still that anybody really need to start from the beginning and make sure to get the fundamentals.
Everything tend to make way more sense from a didactic standpoint because that's how the things developed over time and how we solved the same problems and limitations you are feeling while following that part.
1
u/johnklotter 9d ago
You can throw a Baseball without knowing the rules of the game and the physics of throwing a curveball.
21
u/DreamingElectrons 9d ago
There is this persistent misconception, that you need to start learning with basic underlying data structures and memory management to truly get programming, this is mainly prevalent in academia, where people traditionally start with C and the keyword here is "traditionally" because that's all that is, a tradition. There is no benefit in starting with low level stuff it just makes things look harder than they really are and result in people feeling accomplished in having understood something like a pointer which isn't a hard concept at all once you are used to thinking like a programmer.
Start with something high level and then work yourself down as far as you need. Learning C at some point is beneficial because it makes a lot of weird quirks of python and other high level languages suddenly click into place, but without they simply are gotchas that you stumbled over once and then just have to remember about. It's also turtles all the way down, once you ended up at C. there still is assembly below that, and then you are just entering a field of electronics below that and can see physics lingering in the depths below...
TLDR: The advice to start with something other than python is just people parroting stuff they read online without ever having understood the argument that someone tried to make when saying that.