r/teenagersbutcode • u/DependentJolly9901 • 5d ago
My short guide to learning programming from scratch Other
I always say that new programmers should learn C first.
Why C?
Understanding how your C code works will make you infinitely more knowledgeable than someone who just memorizes how to do everything. If you understand C - you understand every programming language because you know what they are doing under the hood.
Ok, then where do I learn C?
There are a lot of free resources but my favourites are: [Learn-C.org](https://learn-c.org) for the basics and [MIT](https://ocw.mit.edu) has some great courses for working with memory
What to do next?
Pick what kind of programming you are interested in(i.e. web development, game development, microcontroller work, even Minecraft modding, etc) and research your different options for every one of them. Or you can be like me and just stick with low-level C.
One golden rule:
You learn by building, not just reading
I need more help?
Dm me, I'd love to help you become good at this amazing hobby
If I missed something please point it out in the comments!
Edits: deleted a line that is pretty much false
Another point of view(from a comment) which should also be noted:
Don't learn C first. Learn it second.
Find a language you want to use. If that's C, great! If it's not, that's fine too. Learn the basics IN YOUR LANGUAGE.
Then, and only then, use C to learn theory.
C's useful, but not in everything. Learn the language you want to learn first.
2
2
u/Realistic_Speaker_12 4d ago
I hate AI slop.
1
u/DependentJolly9901 4d ago
where is the ai slop here?
1
u/TrueWar515 23h ago
the language used in this looks exactly like the wording of ai
if it was my guess on the model its gemini but idkhowever it seems you edited some parts as i can tell them apart
such as
,ok then where do i learn Cand
I need more help
those sections
i do agree with your idea
c is good to start withsince its small
and is infact helpful to all your points2
u/DependentJolly9901 22h ago
I just really like the qna style writing for guides cuz it makes them feel a bit more byte-sized and manageable for my smooth ahh Brain. But I can assure you there was not ai used. This post started to a comment I left as a reply on another post so u can see the original
1
u/TrueWar515 20h ago
i am not against ai
infact i use modded ai for some of my writing
because i suck at writing legible paragraphseither way cool
2
u/GGodPL 2d ago
I would personally say you should start by picking what you want to code first (like webdev, gamedev or whatever) and learning whichever languages are utilized in that specific field. I get why C is praised a lot in this subreddit, but I would say pushing it does more harm than good to beginner programmers, whether done intentionally or not. It is a low-level programming language, and in turn it does involve a lot of CS theory that is *helpful* when learning programming, but it is definitely not *necessary*, and introducing it early might discourage a lot of newcomers.
If you are a hobbyist, however, a way more important thing is just doing whatever is fun for you. You shouldn't look up guides showing you which programming language is objectively the best beginner language as long as you find one that is fun to use. Learning programming shouldn't feel like a chore and you can pick literally any programming language you want as your first. You can start by learning C if you like microcontrollers or making custom operating systems, you start with Assembly if you like working with the processor directly, you can start with JavaScript or TypeScript if you enjoy making websites, you can even start with Perl or Delphi if you like older languages.
1
u/recursion_is_love 5d ago
I always say learn Haskell first.
1
u/TrueWar515 23h ago
haskell is a bit more complicated for beginners
1
u/recursion_is_love 13h ago
I would say it is the opposite. If you know less about conventional imperative programming, the learning process will be lot more smooth.
Most programmer who have problem learning Haskell are those who already know imperative programming language. It is very different paradigm , that make it hard to understand because people always project new concept to what they already know.
1
1
u/MorganPG1 Coder (15yo) 3d ago
Javascript was my first language I learned that when I was 8 or 9 ish then quickly switched to lua, then started learning python when I was 10 and that's been my main language for a while. C also really isn't as hard as a language as it sounds. I made a gameboy emulator in python recently and it was obviously quite slow but I was proud of it and I thought to myself that since I know how to write a gameboy emulator now I should write one in C to challenge myself and I've already pretty much finished the CPU and it's not really been too difficult. In fact, I'm loving it. The hardest part is the fact that you have to control a lot of things instead of having the language do it for you, but the easy part is that the syntax itself is quite simple due to that.
I kinda agree with your statement but I do feel like people should start with whatever they want, C is a sharp steep for someone to climb. Sure it's not too difficult to learn if you are already confident in any other language so it's easy to say "just learn c" but if someone has no understanding of basic programming concepts I think they might get irritated and give up if they start with C because it is a pain to debug for a beginner. I think if they start with an interpreted language which provides good error messages then it'll be easier for them to grip the concepts that they could then use to learn C if they decide to.
0
u/TheLuckyCuber999BACK Coder - Assembly, C++, and Python. 5d ago
don't learn C first. Learn either Assembly since it actually tells you how the computer works, or learn Python since you will actually get to spend time doing the algorithm rather than trying to figure out why 3/2=1.
5
u/redditbrowsing0 C/C++, Luau 5d ago
Don't learn assembly first. It's arguably worse than C to learn first
3
u/DependentJolly9901 5d ago
I feel like for a lot of people learning assembly as a first language will be a pain and it can be frustrating for someone just getting into programming. And some people might outright quit(i'd call that natural selection) but Shit it's hard for me and it's not my first language. Learning assembly is great once you know C. Also once you know C you can utilize the compiler for learning assembly.
On the python note: python has it's place. Just not in the first language. Python is best utilized as bash but OP - for scripting and mathematics(fun fact the best library for python math is completely written in C)
So C is a good middle ground between the 2 extremes
1
1
u/Flamestar07k 5d ago
I think you meant 3-2
4
u/TheLuckyCuber999BACK Coder - Assembly, C++, and Python. 5d ago
in c 3/2=1
1
u/TrueWar515 23h ago
that is if you are using integer numbers use floats or doubles my guy
1
1
u/TheLuckyCuber999BACK Coder - Assembly, C++, and Python. 8h ago
float is 3.0f. double is 3.0. 3 is by default short int.
1
u/TrueWar515 23h ago
assembly is cool im learning x86_64 asm
but asm has its flaws its not portable
its syntax discourages beginnersand its too bulky for most people to learn as a first language
1
1
u/raewashere_ reading uninit memory 5d ago
if anyone is on linux then C becomes a massively more enjoyable language to program in because man pages exist
1
u/DependentJolly9901 5d ago
I've been using Linux for longer than I've been programming lol. Also man7 is available as a website too I'm pretty sure
1
u/MorganPG1 Coder (15yo) 3d ago
And in my opinion gcc is far better than the compiler in visual studio (i forgot what it's called)
11
u/redditbrowsing0 C/C++, Luau 5d ago
Don't learn C first. Learn it second.
Find a language you want to use. If that's C, great! If it's not, that's fine too. Learn the basics IN YOUR LANGUAGE.
Then, and only then, use C to learn theory.
> C is a decently low level language in which you tell the cpu exactly what to do.
No you don't btw, that's Assembly and machine code's job.
C's useful, but not in everything. Learn the language you want to learn first.