#Python #Programming #C #ProblemSolving
🐍 Python is awesome but… have you ever considered starting your programming journey with languages like C? Here’s why:
– 💻 C is a low-level language that teaches important fundamentals like memory management and data structures.
– 🧠 Understanding these concepts early on can make it easier to transition to higher-level languages like Python.
– 🚀 Developing problem-solving skills and resource management early on can set you up for success in programming.
Possible solution: Consider starting with C to build a strong foundation before diving into Python. You’ll thank yourself later! What do you think? Have you started with C or Python first? Let’s discuss!
But at the end of the day, it’s okay if you start with Python anyways. My post was more about having a deeper understanding of programming instead of it being just a tool.
Implementing hash maps in C wasn’t very fun.
Actually, learning C made me more confident as a programmer, even better at job interviews.
Great post; couldn’t agree more. I’m learning C# myself as my first programming language, after giving up on Rust (its GUI capabilities still need a lot of work); also, I want to develop for Windows… so there really isn’t anything more convenient for that environment than C#.
I think not everyone is the same.
If learning C first worked for you, great. People who really like to start with the fundamentals and build up from there will like C.
I think the type of person who isn’t a good fit is someone who’s motivated by seeing results. If you start with Python you can have a working program in just a few lines of code. You can do things like open a window, play a sound, animate a ball, or fetch data from a url in just one or two lines each. In C most of those would be 10 – 100 lines each.
I 100% agree that sooner or later all programmers should learn a low-level language like C.
However, some people seem to do much better when they start with a very high-level language in order to get the idea of writing code and solving problems with code. Then once they’re comfortable with it they’re in a better position to dive into C and start understanding what’s really happening. But if that same person starts with C it’s just too abstract and hard to understand, and hard to stay motivated.
No, I disagree. Starting with C means you need to learn programming *and* learn low level memory management at the same time. It frontloads the difficulty, making the process much harder, and it makes more people give up.
Starting with a language like Python, then learning a systems programming language (C, Rust) lets you focus on one thing at a time. It also lets you work on real world projects sooner, which is fundamental for learning and staying motivated.
Agree. I took CS50 and it’s taught in C. It sets a great foundation for learning other languages. I picked up Python really fast after the course.
i think saying you should learn c before python is a bit like saying you should learn electronics before learning to use a computer. learning electronics might help you use a computer better in certain ways or help you fix a computer when it breaks, but those low level details aren’t really how a computer is used anymore. similarly, c helps you learn low level fundamentals, but most code isn’t written the way c is written anymore, and the fundamentals python will teach you (vars, functions, loops, etc) will be more important and you won’t get bogged down by confusing low level stuff
of course, this also all depends on what kind of code you intend to write
I disagree. I think C will turn a lot of people off. Python gets out of the way and let’s you build things. There’s really no reason for most people to know how to manage memory…
C is not a low-level language. Assembly, byte code, and machine code (which is even lower-level than assembly) are the ones that are truly low-level.
C is a high-level language that just lacks a lot of syntactic sugar and memory safety and static-lifetime memory recovery features.
Python is cool cuz of how beginner friendly it can be but if you mess up one indentation it can fuck up everything lol
in canadian cs undergraduate courses you begin with C, it is ultimately the best language to learn first for all the reasons you listed
Depends what the learner is wanting to do honestly.
I am finishing up a python coding course in school, and I’m holding strong with a 97. I’m liking the coding but am excited to see how other languages work.
I mean, sure…but there’s a reason you start math in algebra and not calculus. Sure, if you start with something more advanced and succeed you’ll do great, but most are going to flounder. Why not start with teaching programming, then build on complexity like memory allocation, pointers, etc?
Obviously anyone that did well after being thrown into the deep end will have an easier time revisiting the shallows, but that doesn’t mean we should let everyone else drown.
I really don’t agree with this opinion. And I’m going to use a different analogy as to why.
I’m personally a gym rat, I squat over 405 lbs for reps. I can deadlift over 500 for reps, and bench 315 for two.
I see a lot of beginners come to the gym for a few days and then I never see them again. I think they lose motivation from too much too fast, and I think the worst thing I could do is put them through one of my workouts.
When I’m dealing with a beginner, learning anything for the first time. My biggest concern is having them come back THE NEXT DAY and the day after that. After all, these are lifetime pursuits and if they’re just going to quit. Then what’s the point of learning assembly and C.
I started with C# and C++, it was pretty damn technical for me. Took a month break and tried Py. Py was much easier to handle but only because I saw the similarities from C
Python is written in C so therefore.. /s
As a programmer of 10 years, I don’t think so!
Actually u may never use c in your life or at work! But python more likely to be used!
Many here make the argument to start simpler than C and I think that’s a false premise. C is pretty simple to start out. It always depends on which subset you begin with. If you don’t restrict that, Python has tons of concepts… classes and inheritance, dunder functions, generators and iterators, decorators, staticmethod/classmethod, various in-built data structures, lambdas, kwargs etc.
So you start with a simple subset. And that’s also how we started learning C at age 14. You don’t use malloc the first day, you use fixed size arrays first.
Aber honestly even then I would argue that allocating heap mem is easier to understand than inheritance or even the difference between class and object. Give me some space to store my stuff.
Funnily just yesterday I watched
Around minute 16 this topic starts.
How weird it is that it is almost a virtue for programmers to not know what’s happening and it can be seen in these comments… “You don’t need to know how to allocate memory” etc. and I also think that’s awful. This is really not rocket science. Casey makes a point that if you can understand a complex beast like react you can easily understand assembly and yes. Absolutely.
We wrote a snake game in assembly at age 15. It was fun and straightforward.
At age 16 we started with Java and all those OOP concepts were much much harder to understand.
The video also talks a lot about why programmers should know those things.
Sure, Casey Muratori has a very special view on this but still worth listening.
All that being said, I can see that C nowadays might not keep people motivated enough. Outputting stuff in the terminal isn’t as sexy anymore ;). And Python is definitely easier to get people motivated.
Especially if you teach programming to other professions like physicists or finance people.
But then for someone who really wants to get into CS I think there should be enough intrinsic motivation to find it interesting enough to start on a slightly lower level and build up.
There is no lack of people who can code or want to start a CS career, we don’t have to fight hard to motivate people who don’t really care anyway.
It’s like making a kindergartener do calculus. There’s a reason we teach simple math, language, science, etc before complex concepts, and programming shouldn’t be any different.
Something to note is that you shouldn’t be a good programmer the moment you start programming. The more time you spend coding the more experience you gain. Yeah sure you’ll learn, but the learning curve will be steep to the point where it will make people less interested in programming.
Back to the kindergartener analogy, a kindergartener can **attempt** to learn calculus, but even if they learn the basics of it they will have no sort of backbone/experience to fully comprehend it. If a coding beginner can’t understand a variable how would they distinguish the keywords? Would they even know what a keyword is?
C is still a good language to learn, it’s used everywhere. However, I’ll still recommend that beginners learn Python. I also started with Python.
I dont think memory management ect it something to learn first, the first thing is how an if statement works, how to work with arrays and loops. What variables are and what kind of variables there are.
This is a lot more basic then memory management and data structures, that would be a later lesson.
But as the learning curve is very steep in the beginning this takes a while to ‘click’
I dont really think it matters with which language someone starts. At starter level the differences between the languages are irrelevent. An array is an array. the syntax might be a bit different but they work the same.
With Python you can get to the end result really fast and actually build something (even if thats printing out fizz-buzz) This creates a healthy cycle of you trying out your ideas and getting progressively better along the way.
A more verbose language or one that does not hold your hand may create so much frustration that you can give up altogether
At my university the first language for the cs students was LISP.
The purpose was to have a language that was new for almost all students.
For sure, learning a language like C/C++ as a beginner forces you to learn a lot of important programming concepts. It becomes very easy to learn something like python after C++ but try learning C++ after python, it will be a very difficult thing to do. Programming is not about learning a language , but it’s about understanding the fundamental concepts which help you solve problems.
That’s like saying you need to learn to rebuild an engine before you drive a car. IMO it’s use the best tool for the job. By that logic, why not learn ASM first and understand everything on a Bitcode level? I think this would have a lot of people saying “screw this” and quitting. Python isn’t just a baby learning language, it’s an extremely powerful and widely used language. Just my 2 cents.
bro wrote half of this post with a LLM lmao you can see the copy paste bits
I see that a lot of guys her disagree with me. I see where you coming from and I agree with you.
When I shared it, my focus was more on basics and concepts of programming and having deeper understanding of them.
But I didn’t mean that you should never start with Python, I guess I just had a different perspective. But yeah many people started with Python and they’re doing great now, I saw them.
I guess what made me said that is that this is how I learned programming in college.
Good luck everyone and it’s nice sharing your thoughts and discussing my post.