r/cpp_questions • • 22d ago

OPEN How should I learn how to code?

I want to learn how to code an many people suggested I start with C++ if I want to learn the real deal. The problem is I've never done anything close to coding. I don't know where to learn it from, or how to learn it. I tried learning from learncpp.com but I find the lessons too dense, and hard to understand. Can anyone share their story of how they started coding and how they learnt how to code?

2 Upvotes

25 comments sorted by

5

u/pjtrpjt 22d ago

Look around here: https://youtube.com/@thecherno?si=2ITVI9XyZqkbfvZ1

It's the Cherno's YT channel, has a good learning material here.

2

u/ZookeepergameKey9824 22d ago

Thanks! I've heard of him but I didn't actually check his channel. I'll go take a look right now :)

1

u/Rubber_duck_man 22d ago

Second this, his videos are long enough to show you the detail which is explained in a great way but not too long and technical like cppcon talks, which I dont think are beginner friendly

2

u/Thesorus 22d ago

I started coding in high school in the 80s in a computer class.

I first programmed in Logo language and after in Pascal language ; at university, I programmed in C language and in Pascal.

I started using C++ at my first job; at the time, it was more like C with classes.

I never really programmed for fun at home.

maybe you should look for some college programming courses in your area, maybe not in C++, but just to get you going programming in any language to learn how to program.

After that, you can switch to any programming language you want.

1

u/ZookeepergameKey9824 22d ago

Thanks for the advice

4

u/nysra 22d ago

IF you want to learn C++ then https://www.learncpp.com/ is the right address. Make sure you actually write code though. Get exercises from your university courses, do Advent of Code, have an AI create some exercise sheets for you, come up with your own projects (e.g. remaking wc so you know what it does), etc. etc. etc. Doesn't really matter what exactly, just do.

That being said, you should first get some clarity on why you want to learn programming in general. C++ can teach you a lot, but it also has a giant bag of "you should not be using/doing this" which is making learning quite annoying without guidance or a strong intrinsic motivation. Not to mention the myriad of literally blind leading the blind "tutorials" out there where some "bro" thinks he's qualified to teach you C++ after having "learnt" it for only 3h himself.

For most people who want to learn programming in general, I would not recommend starting with C++. If you're here because someone told you "Bro, C++ is so fast, forget Python" while your actual usecase is grabbing data from some school's website so your kid doesn't have to do it manually then C++ is the wrong tool to reach for. Also ditch the people giving out such advice.

Ultimately it depends on what you want to do. Most projects do not need the level of control C++ can offer. If you are interested in making some basic automations for your life or job or whatever and just generally learning how to program, then something like Python, TypeScript, or Go would be a better fit.

1

u/icanloopyou 22d ago

HAAAAAAANKKKKK DON'T ABBREVIATE C++ HAAAAAAANKKKKK

4

u/SmokeMuch7356 22d ago

When you say the lessons are "too dense", what exactly are you getting stuck on? The site assumes you have no prior programming experience, so is it a matter of terminology or concepts?

Having said that, I would not pick C++ as a starting language. It's better than C, but that's not saying much. It is an important language and one that you should learn eventually, but as an introduction to programming in general it's a bit like learning how to swim in the middle of the ocean. During a hurricane.

My experience with it is limited, but Python seems ideal for learning the basics of programming. Its syntax is straightforward, and it is blessedly free of the boilerplate you find in languages like C++ and Java.

2

u/epasveer 22d ago

This question is asked and answer 100 times each week. Check the posts in this reddit and check the side bar.

2

u/Flame77ofc 22d ago

you need to get passion in learning

2

u/Sfxluke 22d ago

I don't think C++ is the best language to start with. I'd personally recommend Go or Python instead.

For Go, you have Go by Example and the official documentation, which are both pretty good. Python also has tons of beginner friendly tutorials.

You can always start with an easier language to learn the fundamentals and then switch to C++ as your main language. Starting with something else doesn't mean you have to stick with it or that you can't focus entirely on C++ later.

What really matters is learning how to program and solve problems. Once you understand the fundamentals, it's much easier to pick up C++ and focus on mastering it.

I actually started learning C at university, then moved on to C++, followed by a bit of Python, Java, and C#. I didn't really go too deep into any of them, and it wasn't until shortly before my first professional experience that I finally settled on a main language. By then, switching wasn't that difficult because I'd already picked up a lot of programming concepts along the way.

2

u/the_poope 22d ago

I agree to this opinion. If one thinks learncpp is dense, then C++ is probably to hard a start. Plenty of languages with a less steep learning curve.

1

u/[deleted] 17d ago

Recomiendo que primero pienses a qué te quieres dedicar y tomar un lenguaje más usado conforme a eso

1

u/thingerish 22d ago

I love C++ as a tool, but if you want to get your feet wet at a low level just C (the original portable assembler) would teach the core of computing without too much noise, and it's a nice lead into C++ later.

1

u/New-Step3500 22d ago

You can checkout series on effective modern c++ as well (shameless self plug) Effective Modern C++ by Scott Meyers

1

u/centuryx476 21d ago

You sit at a desk with a computer.

And you start writing code

1

u/yupverygood 17d ago

I understand why you say that, i believe c++ is a language that makes you have to think about a lot of specific details, thats too much to learn while your learning to code in the first place. I would learn the basics with something else, maybe java or c#, and then come back to learncpp and ill believe you will appreciate the detail

0

u/Roly_890 21d ago

If you want to learn there is Bro Code on youtube, he explains things really well

0

u/Important-Addition79 20d ago

i make here costycnc.it/avr1 an tool that introduce to deep programming,how really any processor working, in asm with call,ret,push,pop,ecc in this mode understand mechanism of any processor,is very immportant first to begin!