r/Python • • 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?

0 Upvotes

34 comments sorted by

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.

3

u/kcunning 9d ago

I can confirm the academia bit. My youngest (freshman in college) had to struggle their way through a CS class that did zero programming and focused on reading 'pseudocode' that was less clear than if it were just written in Python. They left the class thinking that maybe CS just wasn't for them, which broke my heart a little, because I know it is absolutely something they not only could do, but likely will have to do for their chosen career path.

1

u/swift-autoformatter 9d ago

I don’t know, but isn’t it too late to first meet programming at that age if someone picks up this profession? I mean that the hundreds of successful sw engineers I met during my 25+ years career, all of them were pretty into this stuff earlier in their life (me included).

5

u/kcunning 9d ago

Being "into something" is a completely different mindset than learning something because it's important for your career path / required for your degree / just something you have to know in order to be an adult in modern society.

When you're really into something, the details are going to fascinate you enough to keep you going. There's a good chance that you're already inclined to be good at retaining those details, either due to being primed by life experience or some other natural talent. That doesn't mean it's the best way to learn for everyone. It just means that you're winning at a race because your racecar has been specifically tuned for this particular track.

For those that aren't, scaffolding has long been known to be the best way to introduce learners to a concept. Introduce them to the part of the craft or field that they can grasp, then encourage them to stretch slightly out of their comfort zone, while someone more experienced helps them.

Also, and I say this as someone who also has over two decades in the field... nerds lie. It's a form of posturing to say how long you've been into computers and how many hair dryers you disassembled before the age of six. Some are probably telling the truth, but I promise you, many are stretching it, if not not outright lying because nerds are also extremely judgmental.

4

u/Emergency-Mission705 5d ago

Thank you so much for sharing this! I'm also a CS freshman with no prior coding experience, and I really relate to your youngest.🥲 What advice did you give your youngest when they were struggling? I'd really appreciate your wisdom!

3

u/kcunning 5d ago

I told them that not every teacher is good, and not every required curriculum is going to work for everyone. We sat down, looked over test questions, and I showed them how I found answers when things were breaking for me. To be honest, watching me go "what the f--" a few times made them feel a lot better.

I also explained that their class didn't really mimic the way the real world worked.

3

u/every-day_throw-away 9d ago

You get it!!!

Its two camps academia CS purists and people who are geiving practical solutions to just get stuff done :)

If you are the latter absolutely Pythin to start. When you think you understand it well and hunger for more use Java and C++ to force you to learn other concepts 

1

u/fab_dot_io 9d ago

Look at my comment. C is easy and helpful when you come from assembly. Assembly is obvious if you know microcode. Now you need to play with these things and start to get a sense of how difficult becomes when move away from basic stuff. Then you appreciate and understand what was built back in the day to make everybody's life easier. Then you get to python and you can stay there for quite a while.

0

u/Rich-Monitor1442 3d ago

I would choose neither C nor Python for introduction. In courses I teach, I want students to find and understand limitations of languages and discover concepts needed to overcome it. So they start in language that allows them to work only with “data” (primitives, structures, eventually lists). Then they discover it would be nice to work with functions in the same way (pass functions around same as data) - so they move to another language, extension of the first one, that allows them to do it.
They learn concepts they can apply in any language, while not being overwhelmed by all the vast possibilities any production grade language has.

(My course is based on HtDP book)

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

u/vivaaprimavera 9d ago

Why I quoted the expression? I haven't called it a bug...

2

u/gerardwx 6d ago

In 60+ years of life I’ve heard that no where.

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.