r/C_Programming • u/TurtleSlowRabbitFast • 5d ago
Would learning C as my first programming language also be useful for picking up other languages later on? What are your thoughts on this course?
Wanting to learn C as an intro into software engineering. I know it’s low level and I’d like to eventually switch over to high level languages such as JS/TS, Java, and GO.
Does the “The Complete C Programming Bootcamp” course by Byte Garage be a good choice to learn from?
7
u/HalfTryhardSqr 5d ago
It is only a good idea if you know you're good at computer engineering and want a challenge that pays off long term. Otherwise, I'd advise against it.
Why's that? C is very complex and has a strong Dunning–Kruger effect: at first you think you know everything, but upon trying to build actual, more complex projects beyond terminal calculators you get hit by a BIG reality check.
I learned C syntax in three days. It took me a month and an entire book to figure out how connect my app to an online service without it catastrophically imploding and patching security vulnerability after security vulnerability... And there my friend, is where the real learning in Computer Engineering is.
If you switch to higher levels right after you finish the dummy C exercises to learn the language concepts, you'll probably end up terribly confused, having to unlearn a bunch of concepts from C.
From the other hand, if you've really invested into C and built something meaningful, that deeper knowledge will come VERY handy to understand "magical" concepts from higher level languages.
“The Complete C Programming Bootcamp” might teach you how to do programming in C, but not how to BUILD software in C, which is what really matters and where most of the knowledge pool is. If you want to quickly get hands-on cool projects I recommend going straight up to Python.
0
u/nzconstructionlawyer 4d ago
Frankly if you have to "patch" security vulnerabilities you have already lost. Defensively written C doesn't have any security vulnerabilities to begin with and cannot have them.
6
u/jkulczyski 5d ago
If you want to understand how the memory and other hardware is handled absolutely 100%.
6
u/ModeFinal6821 5d ago
Learning ANY language will help. Learn program flow, structure, definition, logic, etc. The languages and syntax may be different, but the development process is pretty much the same across low and high level languages.
4
u/Nickbot606 5d ago
I mean it entirely depends on what you’re planning on programming but yes I would say C is a good language in general for others. I would really suggest Python but if you’re planning on moving into Javasceipt and Java and Go then I would consider what you actually wanna do.
Languages are tools. They all kinda do different stuff more or less and they’re all good at certain stuff and bad at others. C for example is really really good at memory management for embedded systems but really struggles for things like web development or doing any large scale projects quickly.
5
u/TheLimeyCanuck 5d ago
Python is great, but unlike C it's not really the basis of other languages.
1
u/Soft-Marionberry-853 5d ago
Does that matter? If it does then we should be saying "Learn Assembly"
5
u/TheLimeyCanuck 5d ago
Yes, it matters. Python is sufficiently different than everything else that you need to unlearn a lot to learn something else. I'm fluent in a dozen languages from several decades as a contract dev and Python is about the bottom of the list I'd recommend to start with.
5
u/Soft-Marionberry-853 5d ago
I also have many decades of experience. I think this is something that you and I will likely disagree on. Which is fine. I always thought that learning how to program is very different than learning a language. We've had programming before we've had computers. I always felt that you could teach programming with pseudo code if you were a good teacher.
I dont agree with you, but Ill respect you enough to upvote you.
2
2
u/nzconstructionlawyer 4d ago
I always felt that you could teach programming with pseudo code if you were a good teacher.
People already do that, it's just the pseudocode is called Python. :)
1
u/internet_safari_ 5d ago edited 5d ago
I partially disagree with the web dev stuff. It doesn't take much to basically make a whole web framework in C to build websites out of (on Linux). I know this because I did it with a single c/h file pair that I use regularly. Basic HTML/CSS/JS/WASM is just returning text or binary data after all. "struggles" seems to be entirely subjective from what I can tell. I've done web development roughly this order: Java Spring Boot > ASP.NET MVC > Node.JS React > Python Flask > Go Chi > Go net/http only > C, and for me the best experience for production grade sites were by far Go net/http and C.
To be fair, it's only so great in C because of epoll. Which is only on Linux. epoll has saved me from a lot of extra code and has given me the best performance of all web frameworks. With the others, it's often a monstrosity of dozens or hundreds of files and megabytes, poor performance, and being locked in a specific proprietary paradigm all for what true benefit? Some convenience functions.
Imo best for beginners and casual: Python Flask, Go Chi.
Best for production, complexity, or high traffic: ASP.NET, Go Chi.
C is best for true flexibility and control, and if you don't need to type out countless uncommon dynamic features. But for the abilities of your average website with some dynamic pages server-built and wasm at most it's a lot easier than you'd think
Worst for almost everything: Node lol
4
u/rubidus-api 5d ago
Any language is fine to start with. C does put you in front of the hardware more often, and that is educational, but it doesn't mean you have to start with C. In the early days of home computers, many people started with BASIC; today most probably start with Python or JavaScript. From the first day to the last, programming is mostly general problem solving: analyzing the problem, working out what it needs, and connecting and arranging the tools you have to solve it. That doesn't depend on the language or the hardware.
But to build high-performance software that needs heavy optimization, you do need a deep understanding of the hardware it runs on. So, to be more precise, what most programmers need is not C as such but computer architecture. The irony is that among widely used high-level languages, C is the best one for learning computer architecture, because it keeps giving you chances to run into it. A few examples:
Memory: C's model, where you reach objects through pointers, is the simplest and the closest to the hardware. On most machines a pointer is just an address, although C itself doesn't promise that. Going deeper, alignment shows you how the hardware accesses memory,
volatilehow a program deals with devices and other things that change memory behind its back, andrestricthow compilers optimize memory access. Strict aliasing and pointer provenance are unusual but important ideas that most other languages never make you think about.Integers: mixing signed and unsigned values in one expression, the limits on each operand of a shift, the problems with shifting signed values. No other language makes you as familiar with all of these as C does.
Strings: C lets you work with text at the lowest level, as bytes. Most high-level languages abstract characters and strings so well that you can do almost everything without ever taking that view, which in turn makes it hard to pick up.
What about assembly, one level below C? It is so tied to one particular machine that it makes it harder to learn to think about computers in the abstract. Unless you will only ever work on one architecture or platform, it can narrow your view instead of widening it.
Python and JavaScript, on the other hand, let you build great things without thinking about the hardware, so they rarely give you the chance to learn it. That isn't a bad thing. We don't need to know quantum mechanics to use a CPU.
Put the other way around, if you can learn these things another way, there's no need to start with C. A good textbook on computer architecture or computer science might serve you even better. What C offers is the chance to meet these ideas as real problems and think them through.
As for the Byte Garage course, I don't know it, so I can't really say.
2
3
u/Relative_Dare8475 5d ago
Thats depend on what is you goal.
If you want quickly learn and solve the data analysis, or solving something practical stuff quickly, better learn python
If you want to go for developing business app, go for c#, javascript, etc.
If you serious to learn and trying to do something low level .. then C, C++, Rust, etc
3
u/Massive_Technology_8 5d ago
In my own experience i would strongy say yes. I started with C, 6 years ago. And i must say it was pain, but after some time things started to make sense. Now im working with C#, Java and Python. But i still think in terms of C which is i think really good way to manage your most important resource. Memory.
3
u/kat-tricks 4d ago
C is hard to get going in; an interpreted language with a REPL (interactive prompt) is REALLY good for trying things out at first. That said, C is a really good language to understand, and other languages are often explained using C vocab. I'd say a bit of python first can help you get the basics down and stay motivated!
4
2
u/lostmyjuul-fml 5d ago
im starting to learn C++ after spending a year on C and the learning curve for C++ definitely doesnt feel as steep as my learning curve with C, which was my first language. You certainly appreciate other languages when you start with C
1
u/MaxComfort 5d ago
Maybe - really depends on what you aim to do.
I started with C, but it was the 90's... since then, languages like Java/etc took over the world. Python, etc. Go, now Rust.
Does the syntax carry over to most languages? A lot of the concepts? If you master C can you master anything? Yes.
But at the same time - especially in the age of LLMs - I'm not sure that specializing in any one language is a good bet.
These days I mostly code in the languages I get paid to.
I would vote more for learning about how operating systems work - memory management, task scheduling, etc. Those are the fundamentals that have yet to change drastically in the last few decades.
1
u/IdealBlueMan 5d ago
Absolutely. You don’t need to get deeply into things like memory management or advanced data structures if you’re intending to move on to higher-level languages. But the most widely-used languages today are based on, or inspired by, C.
1
u/coogie 5d ago
I'm not sure what they do now, but that was the methodology that a lot of CS programs used- teach the concepts of Computer Science using a low level language like C instead of whatever high level language was in fashion at the time. That way, you had to do the work that newer languages do for you and understand what the computer is actually doing behind the scenes. It would also teach you how to learn the newer languages since you know what's going on behind the scenes and what the programming language is doing for you.
1
u/internet_safari_ 5d ago
I started with C# in 2011 then Java from 2012-2019. C felt familiar more than any other language from Java. There was just some to learn about moving from all of the class stuff to pointers, structs, etc.
Of all languages, C is most familiar to the rest on average imo. I'd learn C and Kotlin if you want to get familiar with what most languages have to offer.
1
u/koulourakiaAndCoffee 5d ago edited 5d ago
If you can learn C and also C++
(Not the same)
Then you can easily shift to another language because most all of the concepts in programming are in these two languages.
However if you learn something like Python or Javascript first, you will struggle a lot more transitioning to C
Ultimately, if you spend a couple years to learn C and C++ to a decent degree of academic understanding… it should only take you a week or so to pick up another language. It’s just a matter of learning syntax and the peculiarities of a specific language. The specific technologies and libraries might take longer, but learning a language should not be any real issue after you are proficient.
Ultimately though, learn what you like. Really learning requires you to want to learn it. If javascript is interesting, learn that first. Or Python. C can sometimes be challenging for newbies because there are a lot of weird quirks to learn.
Rewarding? Yes. Beneficial. Yes? Hard? At first, yes.
1
u/bloudraak 5d ago
Once you learn C, you’ll have a better understanding why other languages are the way they are. You’ll probably understand better how software becomes vulnerable. You’ll be able to write software for most if not all hardware dating back to 1972. And most languages can integrate with C via ABIs.
I professionally maintained a business application written before I was born, when C was still this upcoming language for this toy operating system from Bell Labs called Unix. Oh, and they thought 64KB was a ton of memory. /s
C was a sight for (literally) sore eyes. Every language after that was a breeze, except for C++ which became a bit too much magic. This was measured whether you can maintain the code at 2am being sleep deprived or drunk, because, you know, there were no VPN connections back then, and you had to drive to the office after a night out.
1
u/greg-spears 5d ago
No. C is addictive. Everybody I know is still hooked. They all planned to move on after college, or whatever
1
1
1
1
u/enoch_twumasi 4d ago
It sure will be useful and will help you understand the other languages better if you’re seeking to be a master of the other languages.
My goal in whatever programming domain has always been to be among the top 0.1% world class experts in that domain.
I started with library of Javascript, but then I didn’t wanna hang on to something that changes so often and could become almost obsolete with new library that gets hyped and so I wanted to have the actual tool (the JavaScript language itself) to understand the libraries better and view them with what I call and “x-ray” vision/mental model. And also to be able to build my own better libs when needed without the bloat associated with generalized libraries.
I was satisfied working towards my goal of becoming among top 0.1% experts of vanilla JavaScript (The language in its purest form: not libraries, not frameworks).
Understanding vanilla JavaScript, means it will take you practically no time to study React or any other library that later comes to replace it. And your understanding of the libraries actually becomes so profound because you understand exactly what building blocks were used or how they function “under the hood”.
Ever since escaping the boundaries of the browser sandbox through runtimes such as node.js, JavaScript has been reigning among many higher level languages in things I cared about when selecting a programming language to study and master.
JavaScript to me has been the most universal and versatile language. Cross-platform portability is rarely an issue because JS engines are embedded everywhere—from browsers and servers to mobile apps, desktop software, IoT, and embedded systems. Because it is interpreted by these host environments, the same core logic can run across diverse systems. I love this versatility, and the fact that it instantly gives my code more value.
To reach my goal I needed more than knowing just the syntax, I need to understand the engine that makes it possible and runs it (the V8 engine and also Libuv), and also what the engine runs on and helps it do all it job (the operating system), and also the machine upon which the operating system runs.
Wanting to achieve that goal, by GOD’s grace I was led to understanding JavaScript from the bare-metal level up.
To mention a few, I began detailed studies in:
*Implied Systems & Primitives:
- CPU Architecture & Instruction Execution
- System Memory Mechanics
- Operating System Primitives
- I/O Multiplexing & Event Notification
- Network Stack Protocols
* The ECMAScript Specification:
* JS Engine Architecture & Internals:
* Memory Management:
* The Execution Model & Concurrency:
Dived into these among many others.
I now began to view my JavaScript and Node.js code with X-ray vision, knowing how to write for maximum engine and execution performance and efficiency.
I traced every line of JS/Node.js code in my UDP sockets from the V8/JS layer, to the C++ UDPWrap layer, to the libuv C layer, to the kernel layers: fd, file descriptor table, struct file, struct socket (in Linux), struct sock, ring buffers, and finally to the NIC.
Having obtained this precious gift of understanding— not just the engine within which JavaScript runs, but much deeper—understanding from the bare-metal level, operating system primitives, and low-level mechanics—and knowing how to leverage the underlying runtime for peak performance,
I developed the OneByteProtocol repo even while just playing around with JavaScript bitwise operators, networking models, and Node.js UDP sockets. It is by no means a massive codebase in itself. But practicing what many consider to be trivial mechanics led to a lightweight yet deeply involved solution—one that serves as a foundational pillar for specific industry use cases.
It always felt so satisfying, to realise, although a higher level language, yet I was still commanding hardware one way or another to do pretty cool stuff.
Using code to control hardware physically became my interest. Although this wasn’t moving a robots arm, but doing something on a device and seeing it make meaningful changes I intended on another in my living room over my network was gratifying. It was satisfying understanding what I write and a lot of what happens.
I realized most of my searches had always been on JavaScript and hardware. Of course, the research made a compelling case for how a JIT-compiled language like JavaScript can, in certain scenarios, run at near-native speeds comparable to AOT-compiled code. I started to believe I could have the best of both worlds with JavaScript without ever needing to switch languages.
But it became obvious that it was time to prayerfully and boldly pursue that software-hardware interface for real. I realized quickly I never wanted to just learn to push buttons;
I wanted to be the one building the system beneath that makes a lifeless piece of bare-metal and plastic actually come to “life”. I needed a raw power in programming that I couldn’t fully obtain in a higher-level language. Prayerfully, one night while in bed, I finally agreed to begin my journey in the C landscape. It’s all by GOD’s grace.
And so yeah I’m a believer in the fact that learning from the ground up gives you an expertise people just learning the syntax may not arrive at in a really long time. Things no more seem like magic.
Although I kinda stayed and still am in the C domain, I rejoice of the fact that it makes picking up a higher level language later on or even my JavaScript a bit more simple and not like a scary monster I need to defeat.
And yeah, Node.js relies on Chrome's V8 engine, primarily written in C++, which offloads the event loop and asynchronous I/O to libuv, a C library.
1
u/nmingott 4d ago
C is the language to learn if you want to know how thnigs work. It is near to the hardware. But, if you are not interested in bits and bytes let it go. Excellent instead if you want to mess with Arduino and micros. Everithing else is written in C.
1
u/062876344 4d ago
If you really want to get into C, i'd start with C# with automated memory management, then move to C/C++.
Otherwise, things like Javascript etc are decent to start with. Can't really go wrong. Python is nice but like others have said, it's not really the basis for others. Python is written in C. Rust is another option that is gaining popularity
1
u/clock-drift 4d ago
I am very happy that C and C++ were my first porgramming languages. After that, everything else was super easy to pick up in a week or two.
1
u/bogdanelcs 4d ago
C teaches you how memory and pointers actually work, which makes everything else click faster later.
Check Beej’s Guide to C or CS50 (both free) before paying for a course.
1
u/fltfathin 3d ago
My c background is 1 credit basic programming class, and it goes nowhere since there is basically no obvious path beyond making fancy text generator.
Then i learned python and the concept of object finally clicks to me. No need to overthink pointers, types struct whatever. Data is data and we need to process it.
But before those two i failed to learn many:
Php since the concept of executing file on directory arbitrarily with esoteric mumbo jumbo (apache server) is just weird for me even now. And i hate the dollar sign
Java since i didn't know how to turn java file to jar.
Imo: don't fence yourself with one language, but keep the easiest to setup ones to get started like python AND golang AND arduino/p5 to understand the basics.
1
u/AnToMegA424 3d ago
Yes it will 👌
I do not know if it is the best way to do it in your specific case but it definitely will, given what you need to learn and understand to properly code in C
1
u/Dazzling_Music_2411 3d ago
Hard to say.
"Software Engineering" can mean a lot of quite different things these days. If your interest is software engineering for applications (business/web stacks, etc) IOW high-level stuff, then C is quite the wrong entry point, imho. It will not (even begin to) teach you the things you want to learn. Learn something like Javascript or Python or Java or Golang, or whatever. Same if your interest is in the abstract, high-level understanding of how language (semantics/proofs) work. In that case study functional programming and logic.
However, if your interest is nuts and bolts operation, accessing the OS efficiently and getting stuff done at low level, fast (to run, NOT to program), and not wasteful of resources then go for C by all means.
Personally, I never recommend C to anyone unless they specifically want to become involved in embedded or other low-resource environments.
As for bootcamps, I don't know that one, never heard a good thing about any of them, most are cash-cows targeted at fools. Stick to books, with a good MOOC if you want a more guided environment.
1
u/Available_Safe1818 1d ago
It's fine, but most languages would teach you about the same stuff. It's not some elite hack that's going to make you 10x better.
1
u/wasmachien 4d ago
Be aware that C is not friendly towards beginners. Other languages will typically show you useful error messages when you do something wrong. Running an incorrect C program will just crash and you'll be none the wiser. That said, with LLMs this might be a bit easier nowadays.
3
u/Material_Leader_1124 4d ago edited 4d ago
No with LLM it will be more harder for beginner. AI dont teach but do some task for you
1
0
u/Terminator_1_ 1d ago
I don't think so,i tried C to be my first.But since I am studying on my own i could not learn it.As my first i choose JS and later learn C
36
u/halfjmp 5d ago edited 5d ago
Definitely yes. You will understand much more how other languages work under the hood. Actually I'd argue that in many circumstances you should not use C for real stuff, but it's still useful to learn it early, preferably first, to better understand programming in general.
My next one would likely be Java, to learn abstractions, OOP, and a better typing system with generics, and to learn data structures and algorithms from a higher level perspective.
And third Python for automation and data processing.
And then SQL for declarative programming and more data processing.