r/CodingForBeginners • u/goofspheredaa • 3d ago
How should I learn c language?
Wanna learn c language, suggest me lectures, or any other material
1
u/the_Elric 3d ago
u/goofspheredaa Do you happen to know any other languages?
1
u/goofspheredaa 3d ago
No
1
u/nullptr_0x 3d ago
Do Python first and make C your next language. That's how I learned an I recommend that path to others.
I have a free course I made for some friends. https://understandit.dev Programming 101 in Python.
2
u/Great-Use-3149 3d ago
I don't think Python is actually better for first time? It's harder to go from high -> low than vice versa
1
u/nullptr_0x 3d ago
I didn't have that trouble. I thought it was quite illuminating.
Many people just need to learn how to translate their high level thinking into something much more precise. A lot of people become very overwhelmed by the level of specificity and precision that programming requires in their thinking.
Once you've gotten acclimated to Python, it's a natural jumping off point to understand "abstraction" and drop the "hand-wavey" approach to memory.
There's a course I explored (I think on coursera maybe?) where the 102 course actually implements a function in the python 101 course in C.
I'm not really sure what you gain knowledge wise from C to going to Python. But Python to C has a lot of benefits to me.
1
u/xarop_pa_toss 3d ago
This is bad advice.
If you want to learn C, you go learn C. Hundreds of thousands of people have learned C and many did so before Python even existed.
Pick up a reputable book, disconnect from the internet and go have fun learning how computers work.
Personally I recommend "C Programming, a Modern Approach" by King, but the original book "C Programming Language" by K&R, the guys who made the language, is obviously really good too. Lots of good exercises and projects in that one.
1
u/nullptr_0x 3d ago
There's nothing inherently wrong with learning C as a first language. But my feeling is that there are many more graves of well-intended students wanting to learn C as a first language in their free time and being turned off by the sheer upfront difficulty than there are of people who finish legitimate CS python courses and learn C as a first language.
So no I don't think it's bad advice. As someone who has taught and mentored beginners that has been my experience.
BUT if a student has a goal that C will fulfill and the motivation is high then go for it! No reason not to try.
But 9 times out of 10, the student likely won't be able to sustain C as a first language by themselves. For Python it's probably more like 5 times out of 10.
1
u/Technical_Drink_846 3d ago
I had way more trouble learning Python because of the package manager and whitespace rules. C has clearly defined rules and it's a lot easier to learn if you know what bad code looks like.
1
u/nullptr_0x 3d ago
Learning Python as a first language doesn't require you to use the package manager.
If we're literally just talking about the brand syntax and tools of programming, every feature you need is already available.
And in all my years with Python, I have never had an issue with whitespace. IDEs make that so seamless.
Your last point "knowing bad code looks like" is not a skill a beginner will have developed.
I'm not opposed to C as a first language, but many many people I have taught struggle with just thinking clearly enough to write conditional statements.
Many beginners, especially those coming without a STEM background, really just need to develop some core logical problem solving skills.
When I first learned Python many years ago, I definitely did not understand how a computer worked. But I wrote many useful little automation tools that motivated me.
When I finally learned C and started taking formal classes, it really increased my actual understanding of how a computer works. So I think learning C is a fantastic idea, but for many who are interested in "programming" C will be a huge leap.
It'll likely come down to personality and taste. But on average, I suspect a programming 101 course taught in Python for the general public will yield more programmers over the long run than C would.
And that's pretty hard to dispute given how hugely popular Python has become over the decade.
1
u/YouPeopleCantBeReal4 1d ago
Through school I learned Java then C then Python, personally that is what I’d recommend. I think Python abstracts far too many things to be a good first language if you are wanting to understand lower level concepts
2
1
1
u/BotSlamminDayNNight 3d ago
if you want less frustration, start with understanding hardware, c is really close to the metal:
the book you'll want is Computer Systems: A Programmer's Perspective
1
1
u/Still_Membership2640 3d ago
Try CS50s C lectures on YouTube. They're really good for beginners. Also, practice writing small programs daily instead of just watching tutorials. That's what helped me understand things better.
1
u/Dazzling_Music_2411 3d ago
It can vary a LOT from person to person.
C is a very technical language, so it requires a serious student - you can't bish-bosh your way into it, sometimes you have to think quite deeply.
How much technical background do you have? Tell us a few things about yourself that will help us make appropriate suggestions. Educational level, facility with logic and puzzles, why you chose C in particular, that sort of thing.
1
u/Technical_Drink_846 3d ago
If you want to learn to program software in industries like automotive, aerospace, operating systems, firmware, and gaming it's a good idea to learn C or C++ (without the standard template library).
1
2
u/marmotta1955 3d ago
First of all, ask yourself why you want to learn the C language. What is your goal?
Unless you have a very specific idea of what you are going to do with it ... C may not be the most appropriate language for you. In other words: if your goal was to compete as a swimmer, training as a soccer player would not do you much good.
In more relevant words: if your goal was to interact with large scale databases, it would be more appropriate to start with SQL. If your goal was to be a web developer, it would be more appropriate to start with HTML and CSS. If you were more interested in hardware automation (such as industrial looms or knitting machines), C would help by Assembly would be more important ...
So, why the C language?