Very interested in C but wondering if I should start with something higher level to learn basics first?
Posted by Crapahedron@reddit | learnprogramming | View on Reddit | 28 comments
So I have read alot these last few days as I research how to begin teaching myself (or at least self-guided) development and computer science concepts as a ripe ol' genXer. I've read ad nauseum to worry less about what language(s) you're starting with and instead focus more on either a) finding a quality resource and/or b) figuring out WHAT you want to use the tech for and learn it's stack/tooling
So what I'm interested in is good ol' C. Why? Well there are a few reasons, some practical some not. From a practical perspective, it is used fairly heavily where I work which means that I have both people I can lean on for help when I'm stuck in the weeds and motivation to keep pushing through some weird shit with the prospect of a potential Jr role since nearly half of our development unit is retiring over the next few years.
Additionally, in a far less practical pipe-dreamy sort of way, I also have a strong interest to deep dive into Linux. I've been using it a little on an old laptop as a daily driver and to exert total nerdism here, it's an absolute joy to work with. In fact, messing around with Linux was what sparked my interest in tech, programming and exploring options relating to computer science.
So as a mid 40's boomer with too much free time on his hands could / should I jump straight into learning with C or should I use a friendlier, higher level scripting language to learn the basics with before dawning some armor and getting busy with C and tearing my distro to shreds?
Thanks!
Embarrassed_Phone_22@reddit
Learn C. It has a simple syntax and is a great language
gregmcph@reddit
It's also the template syntax that so many other languages have adopted. It gave the world a nice terse but readable syntax. Javascript, Java, C#. The squiggly brackets instead of having to write out words like BEGIN and END.
Dr_MineStein_@reddit
Instead of C, do C++. A bit easier while also getting used to low level things
peterlinddk@reddit
I usually wouldn't recommend C as a first language, even though I think everyone should work with it at some point in their career.
But! You are already interested in problems and projects that you need C for, and you have a bit of a network of people that also know and use the language, so I think it would be a waste of time starting with another language first. Especially since you'd only consider that other language a temporary stepping stone, and spend a lot of time learning different ways of handling memory, than what is required for C programs.
Of course other languages are harder, but they don't make it easier to understand the simple memory model that C uses - quite the contrary.
I'd recommend taking a look at Harvard's CS50 course on Youtube - they use C, albeit in the beginning with their own custom library to handle strings and memory, but it is a good introduction to programming.
Use any editor you like - I'd suggest going simple and use GCC (or Clang) as a compiler, to avoid getting too comfortable in a specific IDE.
ATD67@reddit
I’d say go for it. People tend to recommend higher level languages like Python to beginners because you can get to the point where you’re writing non-trivial programs faster. If you’re interested in some of the lower level details of a computer, C is a great choice.
allium-dev@reddit
Strong agree. Following your interests is always going to be the best way to keep motivation for learning up.
I've found it's good advice to avoid putting up roadblocks in front of your own learning or creativity. Since it's totally possible to start with C, go for it! Forcing yourself to start with a different language is just a roadblock at this point.
fake_dann@reddit
Yeah, and this is only an issue if You have to learn fast. I made a mistake of trying to do my assignments in C early on at uni, and it bit my ass hard. It is a demanding language. Fun, but demanding
_TheNoobPolice_@reddit
Fellow boomer here. C is my favourite language, it’s beautiful in its simplicity and once you get the syntax down can always read someone else’s code and understand exactly what it is doing line by line, whereas in C++, for example, you have things like operator overloading so you could potentially have no idea what is going on until you jump to the definition of a class.
You can use function pointers with data structures to even work in a pseudo-OOP style and you necessarily have to learn memory management which is always good to know even if you then end up working with managed languages later.
Yes, it lacks quality of life features that people take for granted in newer languages - it’s less friendly defining macros instead of constexpr for example, you can’t make templates for multiple data types, heck, you can’t even declare a static variable with an expression - but it just means you work in a different (more long-winded) way but ultimately it’s the best foundation to learn programming in my opinion.
Independent-Gear-711@reddit
Go with C it's the language best suited for learning programming concepts as well as Unix/Linux so if you're already highly interested in Linux you can't escape C so learning C Will give you advantage.
Xatraxalian@reddit
If you understand C and can write memory-safe programs that don't crash and don't leak memory, you can do anything with any programming language. So I'd certainly learn it, even today. Simpler languages with lots of libraries such as Python make programming relatively easy so you can be fooled in thinking you understand what happens but you actually don't.
If you can write an algorithm in C, you can write it in anything.
NoAlbatross7355@reddit
I'm a undergraduate in Computer Science and I started with Java. It's been a couple of years and I'd say I can comfortable program in several different languages and paradigms. I would always tell a beginner to start with C if they are actually trying to understand Computer Science because not only is C a simple language, it is not very opinionated nor semantically driven like higher level languages such as Python or Kotlin. You aren't locked into a false sense of understanding because C's syntax is general and it is the foundation of everything else. Starting with C is like starting with the first chapter of a book; it's a no-brainer. Retrospectively speaking, I wish I started learning Linux, C, and Neovim because having in-depth knowledge of these helps you understand so much more.
scottywottytotty@reddit
Why Neo vim?
NoAlbatross7355@reddit
The same reason why you learn C: It's foundational and related to main different topics. With the ecosystem for Neovim as big as it is, learning Neovim entails learning to build the editor you want from scratch, which is pretty powerful.
scottywottytotty@reddit
I guess I mean why neovim vs vim? Is it a big deal?
NoAlbatross7355@reddit
Well Neovim is meant to be a drop-and-replace improvement with more extensibility features.
funkvay@reddit
Go for C. Dive right in.
Many experienced developers who started their journey with C - even when they had no prior programming background - have spoken about the immense benefits it brought. They often mention that learning C first gave them a strong mental model of how computers actually work. You’ll understand memory management, data structures, and low-level operations better than many who start with higher-level languages. This foundation will make you a better developer in the long run, no matter what language you pick up later.
Plus, you’re in a unique position where you have colleagues who can help, and there’s a clear, practical reason for learning C tied to potential career growth. Take advantage of this. It’s a luxury many self-taught learners don’t have.
That said, a good strategy some successful self-learners have used is sticking with C for core concepts, but also allowing room to experiment with something more immediate, like Python, for side projects or quick wins.
So, my advice: commit to C as your main focus. Use it to understand algorithms, data structures, and memory. But if you hit a wall, it’s okay to take a detour into Python or shell scripting to build something cool or automate a task on Linux. Then, get back to C with fresh eyes. It’s all about finding a balance between growth and keeping your motivation high.
You’ve got time, motivation, and support. Make C your primary weapon and use those advantages wisely.
gregmcph@reddit
C lets you get your fingers in the bytes and bits. It gets you closer to the machine underneath, and also the building blocks of your operating system... equally Linux or Mac or Windows... and I think that is healthy for a developer to experience, if you are not all about webpages.
fake_dann@reddit
Depends how much self preservation You have. C doesn't hold Your hand (neither does C++). I always liked C/C++, but learnt at uni to never rely on it, if I wanted to do something fast. Sometimes You'll want to implement some sorting algorithm, as a lesson, and 3rd of Your time spent implementing it, will actually be dealing with Your environment or syntax.
On the other hand, it'll teach You programming concepts way better, than if You did the same with python, js or C#. It'll require more understanding of what You're actually doing. But know that You really will struggle. A lot. Often with things unrelated to what You're trying to do.
Good option B would be to start with Rust, and then jump back to C. It is still on the lower level that python, and has its own, very specific quirks, but the compiler is much more hand holding than in C (it'll tell You better what is wrong and why. C can often not show any error until several lines later), and the build tools less frustrating to use.
ironykarl@reddit
Starting with Rust is a terrible idea, in my opinion. There's just too much to learn at once for someone brand new to programming
fake_dann@reddit
It has its own specific quirks, but isn't it as a "terrible" idea as starting with C? Or C++? Main difference would be, its compiler tells You better about the error, and the build system and package manager is more user friendly.
Tbh, I don't have much experience with rust, and used it in uni at like 3rd year for a bit. And only used it to port my chip8 emulator from C to pass this one course. So I may be wrong.
ironykarl@reddit
I think Rust probably makes a fantastic second language, but learning how the borrow checker works at the same time that you're learning fundamentals like the stack vs. the heap at the same time that you're learning how algebraic types work (along with traits and implementations, ...)
—to me that's too much.
That, and Rust has a famously long cycle between typing something and having something that can execute.
Even for a beginner, I suppose having incorrect and unsafe programs isn't ideal, but having something that compiles and runs is preferable to fighting with the compiler (again, for a beginner).
fake_dann@reddit
Okay, I get that. You're probably right. I swore to never touch the language again, so thanks for the insights, will edit my answer
phpMartian@reddit
Yes. Learn C. It’s a simple language. You can learn the basics fast. And lots of other languages are based on or derived from it.
Negative_Baseball293@reddit
I’m a beginner and starting with c++ and I enjoy it, I know c++ differs a lot in how you can write code but I still am loving it. Playing with pointers and the classes (c doesn’t have them) is fun
LuccDev@reddit
C is a good first language. In fact it was my first language. You might struggle a bit and then it will "click"
RiverRoll@reddit
I'm usually against the idea of learning C as a preliminary step before learning another language but the opposite also holds. C is fine to learn the basics and if your goal is learning C anyways there's no reason to start with something else.
Character-Note6795@reddit
Modern browsers are effectively javascript development environments. I've been daily driving gnu and linux for 20 years. Get gcc, feed it a hello world and poke around, but once you start dealing with string processing, array termination and these sort of things, chances are you'd be more productive in a higher level language, even shell scripting. A browser console can do a whole lot, and they are ubiquitous. F12 opens it in firefox, Ctrl+Shift+i in chrome.
WelpSigh@reddit
I think it's easier to move to go from a language that abstracts less to a language that abstracts more far more easily than the other way around. But it really depends on your tolerance level.
If I could learn again, I would have started with C instead of Python. However, being able to just build stuff sooner in your learning progression is very motivating - it takes a long longer in C than it does in Python.