should i start with python or c++
Posted by jayy_ceyy@reddit | learnprogramming | View on Reddit | 44 comments
I have no experience in coding, my clg is gonna start in july so which language should i start with, smn said i should start with c++ and later on it will make other languages c and python easy for me, but some said c++ is not recommended for a beginner like me.
some guidance plss
Kindly_Radish_8594@reddit
While Python has gotten pretty popular these days C++ is still rock solid and in various industries still the gold standard.
Furthermore, if you are somewhat familiar with C++ you will have an easy time switching to other similar languages like C# or Java.
I started with C++ as a hobby like 20 years ago, had C++ (and only C++) at University and never had any regrets.
Thus said, yes, C++ is harder than Python (harder syntax, more stuff to take care of) but on the long run, your understanding of programming paradigms will be better.
Only-Employment7805@reddit
Ty for the advice. That's why I am abandoning python for now and considering cpp for basics, OOP and DSA. Then later on I can adapt to python very easily for development and such stuff.
AncientHominidNerd@reddit
I’d suggest using C++ first because there are concepts that will help you understand other languages. Things like memory pointers and so on. C++ is much more difficult but its syntax is pretty similar to Go, Java, C and other languages too.
If you learn Python first, when you start to learn C++ you’ll have a hard time learning complex concepts. If you learn C++ first then Python, you’ll feel like Python is a cakewalk.
Novel-Mail5840@reddit
I dont' agree with this.
It's like: "learn how to climb a mountain, so a walk down the street will feel lika a cakewalk". Yes, it's true for sure, but... it doesn't make sense to learn something difficult just to make esier something is already quite easy.
Actually, for me, the opposite was true:
I learned python than C (not C++ to be fair). Yes, there are concepts that actually explain why python works the way it works, but basically everything that in python is automatic and obvious, in C/C++ you have to manually write it down and know how to do it. Leading to errors.
Start with easy walks, then try to climb mountains\^\^
Only-Employment7805@reddit
I got through cpp basics with my college but now I started to learn python and python felt like a cakewalk. Now I am considering to do cpp again that's why I was searching up on reddit.
Only-Employment7805@reddit
Same man I am having the same confusion. People say to learn cpp to strengthen your concepts tho I may never use it again in my life. (Such as in MERN stack ornsimilar things).
Novel-Mail5840@reddit
It's not clear to me if you want to learn coding or hammering your genitals with a great-hammer. I can answer if you can clarify this point to me xD
jayy_ceyy@reddit (OP)
will learning c++ really be that discouraging
Novel-Mail5840@reddit
Ofc mine was a joke and an exageration, let me deep dive a little more, depending on what you want to do.
You wrote you want to learn coding and that's great, but I would like to already make some distinction:
Are you more interested in:
1) a more "theoretical" approach, closer to how the computer handle variables, structures, even at "byte level".
2) a more project-focused approach where you want to learn while building something somewhat useful (a simple application / project).
I (strongly) suggest you approach 2) using python. If you prefer 1), C++ is probably the way.
Why I made the "hammering-genitals" joke?
C++ has, compared to python, a steep learning curve: running a simple "Hello Word" program is way harder in C/C++ compared to python. C++ is closer (compared to python) to computer language while python is more human friendly. Both language have a extremely wide documentationts, example and libraries online, but python often adopted by non-programmer also (excepcially in science): that means that you're more likelly to find less technical documentation and more "tutorial" and "how to" to start with, wich you may find easier while learning compared to something more technical. In C++ is also harder (compared to python) to code (and run) advanced project. Here an example in python of a program able to respond to an http request:
and to run the code you just need
pythonmain.pyIn C++ the same program looks like something like this:
and before running you have to compile it.
Both requires to install some external libraries.
Try them both: you shold be able to verify them with your browser at http://localhost:5000/hello_world if running properly they will display the "Hello, World!" text. Then try to modify the code: try to add some params in the API query and show it back on browser. This will give you an idea how it's easier to set up a project in python and (more importanntly to me) how difficult is to modify it.
jayy_ceyy@reddit (OP)
Thanks man, so python for more projects based and c++ if i wanna get deeper into programming
Affiixed@reddit
Frustrating would be a better word imo
waffleassembly@reddit
An actual computer science course would most likely start you in python
Affiixed@reddit
Mine started in C++ and introduced java and python later
jayy_ceyy@reddit (OP)
was it easier for you to pick other languages than c++ then?
Affiixed@reddit
So the cool thing about coding languages is that the logic is pretty transferable.
For instance, “cout” in C++ prints something to the screen (or terminal to be more specific) and to do that in python you just use “print.”
That being said, it was easier for me to pick up python after knowing c++, but im unsure if thats because i already had an understanding of the basics (conditional logic, lists, functions) or if python is just easier
Novel-Mail5840@reddit
I made the opposite trip.
Actualy for me it was:
C -> ragequit
learned python
went back to C and actually got it xD
jayy_ceyy@reddit (OP)
cool, ty for sharing this
waffleassembly@reddit
I probably should have elaborated that it was just the first term where we were introduced to basic functions using Python, then everything else on the programming side has been c++. I doubt any of my future classes will be dedicated to actually learning python, the whole idea being that if we get good at c++, then learning python or most other languages should be easy enough. I'm sure some of the future classes will have bits of other languages, but the overall idea is to go into the lower levels of programming as we advance, not needing to spend much time in higher levels like python
Affiixed@reddit
Ahh that makes way more sense. My program used scratch for the basic introduction.
This is essentially what i said to OP in a different post but was unsure if i learned python faster because i understood the basics in C++, or if python was just easier
jayy_ceyy@reddit (OP)
can i start c++ and do python side by side or just do one at a time, because i want to take the challenge of c++ to ease things later on, cause rn i have time
waffleassembly@reddit
Sure but the thing to consider is that C++ is lower level, meaning it's closer to the ones and zeros. Because of that it's a very strict and unforgiving language as opposed to a loosely typed language like python. Some people find the intermediate C++ overwhelming and find it easier to get familiar with programming. I would recommend watching this to understand how complicated it starts getting https://www.youtube.com/watch?v=wN0x9eZLix4
So to answer your question, I would recommend using python to get familiar with the basics
Affiixed@reddit
C++ will teach you more about memory management, but python is easier to pick up and teach yourself.
What is a CLG in this context?
jayy_ceyy@reddit (OP)
college
Affiixed@reddit
If thats the case, id contact the department head (I’m in the US idk if it’s different elsewhere) and ask what language they focus on. My program started with c++ and then in later courses introduces java and python.
If you’re just trying to learn a bit of the logic used in coding prior to courses starting python is a good place to start. Boot.dev is a beginner friendly site that could be of interest to you.
jayy_ceyy@reddit (OP)
ty for suggesting the site i'll make sure to check it out
Affiixed@reddit
Of course man. I’m not much further in my education than you are, and asked the literal sane question you did with no real answers.
Boot.dev is going to try and get you to sub, but theres a free version that gives you the “assignment” and allows you to submit your answer for a “grade” but doesnt tive you access to the ai agent or extra resources. Give the trial a shot and decide if its worth it after that.
Theres also tons of information on codeacademy.com but not all of it is free. They do have tons of certification courses though and that might interest you later in your learning/career
jayy_ceyy@reddit (OP)
Okay, I'll see how it goes in free vrsn before subbing. Do i need to have a certification that i learned Python?
Affiixed@reddit
You dont HAVE to have the cert, but it helps your employment opportunities. A degree basically says the same thing, but the important thing to know about this field prior to going into it is that you will ALWAYS be learning. You will have to keep up with new frameworks, best practices, and in some cases new languages. The certifications are just proof that you have experience with whatever the cert is for.
A good certificate to go for once you finish your degree would be some sort of cloud engineering (AWS, Azure, google cloud, ect) this isnt necessarily a requirement, and might be useless depending on what job you are applying for, but having the knowledge of how cloud services work is going to be a requirement in the future (if it isnt already)
jayy_ceyy@reddit (OP)
Damn man, didn't know that, feels like i gotta a long way to go to where u r, ty for sharing how cert works
Affiixed@reddit
My guy i have taken 2 courses and did what youre trying to do right now. All I did different from you (i assume) was interrogate my dad (hes a full stack dev) and professors about the career field and what their “roadmap” looked like.
Also another website that will help if youre going to teach yourself is roadmap.sh, it shows you the “general” education path for specific development positions (backend, frontend, ect). Like what concepts to learn and practice and in what order to approach them. This was extremely helpful to me when starting my courses because it gave me a clear visual of progress towards my goals
jayy_ceyy@reddit (OP)
I just looked it up, it has a lots of roadmaps for diff roles, so much clarity with this
Affiixed@reddit
Yeah man it was crucial for me to navigate all the possible career routes i could take. Before it was just a major in computer science, now i know that I want to focus on backend and data analytics
jayy_ceyy@reddit (OP)
If u don't me asking wht role r u planning on doing, i wanna take ml and ai but ppl say it's beginner friendly so should focus on smth like data related or software related, whts ur take on ts
Affiixed@reddit
Really hard to say without knowing you personally. I guess start by asking yourself what you want to do with your education.
Do you want a high salary? Focus on system design and cd/ci (honestly pretty good knowledge for all fields from what ive been told)
Do you want to make websites/apps? Focus in frontend engineering and ui/ux design (backend stuff wouldnt hurt either)
Do you like math and making sense of complex number sets? Focus on backend and database management
All of the skills for all paths will benefit you in most career paths, you just have to figure out what you’re trying to do.
jayy_ceyy@reddit (OP)
Tyty
UnfairDictionary@reddit
Depends a lot on your goals. Usually C is a great beginning point if your plan is to move to C++ eventually. Python is great for beginners as it is pretty easy to set up and running, unlike C or C++ on Windows environment. Learning C allows you to learn the same syntax and basics C++ is built on.
Additionally, C teaches you more about computers and is very bare metal language. Python will teach you basic programming patterns but abstracts a lot of things behind the scenes as anything can be anything to put it simply. In the end, all that matters is that you start with a language that interests you.
StarsCHISoxSuperBowl@reddit
If I had to pick between the two, Python. C++ will be too hard right out the gate.
BUT, I don't think you should start with either. I recommend everyone to start with C. It will teach you everything you need to know about memory and hardware. From there, C++ will be a natural progession and Python will be extremely easy to pick up.
jayy_ceyy@reddit (OP)
can't i start off with c++ as it will ease things later on even if its c or python or any other language?
StarsCHISoxSuperBowl@reddit
No. C++ is way too hard and way too big of a language to start with. Start to finish, a book that teaches C correctly will establish a foundation that is absolutely required in any computer programming path. With C++, there's a lot of fluff that may or may not be required for what you are doing.
Investing in C up front will also make every language afterwords significantly easier to learn. I was able to pickup Python in a few weeks having an understanding of C. I highly doubt you'd be able to do the same if you started with Python.
cipheron@reddit
My advice would differ depending on circumstances.
For a beginner who may or may not stick with it, Python, because you're are more likely to stick with it vs being discouraged, but if you're actually enrolling in a serious course which involves programming, then go for C++.
jayy_ceyy@reddit (OP)
ty for advice
zomgitsduke@reddit
Follow that advice. Start with Python so you can make things that are tangible and make sense. A great project to test the waters with how comfortable you feel with the code is to make a slot machine. It brings in tons of different knowledge points and workflows, but isn't too complicated.
Clear_Cranberry_989@reddit
Python. The problem with c++ is it takes too much time to debug errors you wouldn't understand for a long time.
jayy_ceyy@reddit (OP)
i never heard this reason before, i'll keep that in mind