I'm fully new to programming and have been doing research on what a good first language to choose is. For the most part, I have seen Python and C. I do plan on learning both but I don't know what to start with. What are the pros and cons of starting with each? Which one trains universal programming skills better? What do you recommend?
Videos
Between Python and C++, which language do you think is better for someone starting programming from scratch?
Python is often said to be easier to learn, while C++ offers more low-level control and teaches deeper programming concepts.
I’m curious to hear the community’s thoughts — which one would you recommend as a first language, and why?
I love Python. It comes so naturally to me. I can flow with Python. With C or C++ it feels a lot more choppy or bumpy or just overal gross. I'm sure this is because Python is "high level" and C++ is "low level" but that doesn't make me enjoy coding in it. Give me your thoughts and opinions on this topic, I want to be more understanding towards it all because I want to love C++
Yes, there are a lot of things about Python that make it easier to use than C or C++. The thing about different languages is that they tend to help you solve different problems. Python is a flexible, expressive language, which makes it very nice to write, but Python is less efficient than C or C++. If runtime performance isn't a big deal, then Python is a great tool.
I am a big fan of statically typed languages like C and C++. Every variable having an explicit type gives me a whole lot of useful information when I first look at a piece of code I've never seen before. Also, C is kind of required for certain types of programming, like operating systems and embedded systems.
Here's one reason to knuckle down and learn some C. C gives you a much better picture of how your computer actually works, especially once you start to play around with pointers. It's hard, but it's good for you, kinda like eating your vegetables. You'll have a better understanding of things when you go back to using whatever language you prefer.
I recommend doing the Nand2Tetris course. You will develop your own fully object oriented language from scratch. Once you are done you will have a really good appreciation of low level languages.
The final goal of the course was to develop a game that can run at a playable frame rate. Drawing on the screen, from a single dot to a diagonal line has a performance penalty. I was able to make performance optimisations that would have only been possible using low level languages. I spent hours and hours going through memory addresses and tracing every single pixel change in the graphics memory to make it work.
Once you are done, languages like C/C++ will become a breeze. Great course, highly recommend it.
Hi! Today I started learning C after passing my python exams. But I dont understand why C needs a compiler when I run it on visual studio code. When I installed python I only had to install visual code studio and an extension.
I am a high school student. I want to become a "good" software engineer in future. I want to learn programming due to my interest in computers and technology. I don't have any specific goal or interest, like web development or any other.
Some say to start with Python, as it will help to start easier, then learn other languages.
Some say to start with C, as it will teach me basics of programming and will make it easier to learn other languages. Python will make it difficult to learn complex languages, like C++, and I will learn bad habits from Python, as it is very easy.
I know I may be wrong, but I don't have much knowledge about programming. Please help me decide between Python and C.
I'm a beginner in programming and I saw several people saying that it will be easier to learn Python or any other programming language to start by learning the basics (C). Does it really make a difference?
I'm going to be a senior next year in high school, and I have a lot of free time, should I learn python or c++ or Java? I want to do cs in college and become a software engineer. also it would be great if you can provide a YouTube series/website that teaches it for free
Hi everyone ^ I have a question, I code almost all of my projects in Python, as I've bit more knowledge in this language, but I also know how to code in C and I wonder, in which case C is more appropriate than Python ? Thank you for the time you wast with my question, and Merry Christmas !
Hi all, it’s the same old question, which language should you start with as someone new to the world of programming.
Typical at university level in engineering majors (Electrical Engineering) you are usually taught C. Thats where i got introduced to programming for the first time. But the way universities are structured, it’s not always the best place to learn programming especially in a non-CS major.
Long story short, I find myself with this passion to dive deep and actually understands what programming is not just a language, but as they say, you have to start somewhere, hence the title statement, where do you start from in 2024?
I narrowed down these options as Python seems to be the most beginner friendly language whereas a languages like C/C++ has always been regarded as the languages to under to understand every other language with ease and especially to really understand the “source code” to programming itself.
Appreciate any advice/experiences, thanks!
Hey y'all, I'll be needing to choose either one of Java, python, c++ or web programming for my second semester in electronics and communications but i have no idea where to start from
I've learnt all the basics of c programming in my first semester and i have to choose between the above mentioned for the second semester and it's really rattling my brain
Which of them would be better for a beginner to programming language and which would be most helpful in the future, if you'd have to say?
Thanks in advance!
I'm taking a CS class next semester but I don't know if I should choose intro to Python or C++. I mean python is a popular programming language but I feel like if I want to understand software engineering C++ would be a better pick. Plus I already know JS..
I'm currently studying Data Science and AI, and I'm using Python as a main language but a friend told me to learn a high-level python and then migrate to C because C is better, faster etc. But now I'm confused, I don't know if I continue using Python or I already start now learning C. What do you guys think about that? PS: Thank you guys for the all support, now I understand a bit more about programming languages, thank you so much!
I was talking to a co=worker the other day. He said that for embedded or hardware C & C++ are the languages used. i asked why and he really didn't know
First, how much of a difference is there from Python vs. C, C++?
Second, what is C used for embedded or hardware?
Thank you
The whole point of python is that modern computers are amazingly fast and cheap, so python sacrifices run speed for programing ease. Much of the boilerplate code required in other languages is automatically done in python. So compared to other languages python is super fast to program, but slow to run. On a modern computer that slowdown is usually barely noticeable, so it's often a good choice.
Microcontrollers used in embedded applications are not that fast. So there's still a lot to be gained from optimized code only available with C or similar. However people can and do use python. Google "circuit python" sometime, it's really easy.
Python is interpreted; C/C++ are compiled. A Python file is read by a Python interpreter and executed by "compiling" each Python line into machine code on the fly. Note this means that the Python interpreter - itself a program - first needs to start.
C/C++ being compiled means their source code is fed through a C/C++ compiler and it outputs an executable. That's already in machine code so there's no separate program that needs to run first. And it can optimize lots of things, much better than the Python interpreters can.
In C/C++ you have direct control of memory so you can do things like actually free up memory right when you no longer need it. In Python, you let Python handle that for you and it will do it at some point. Basic structures are also smaller - for example, a Python list of 2 integers uses something like 150 bytes (ballpark, from memory so forgive me if that's wrong). In C/C++ an array of two integers is twice the size of one integer - so it would probably be 8 bytes total. The difference is less drastic when you compare, say, 1000 integers but for the most part arrays of 2 or 3 things are very common and C/C++ wins by a mile here. On an embedded system you not only have a slower CPU you have less memory and don't want to waste it on Python setting up pointers to structures and its own overhead just to store two integers. More esoteric, but in Python the list and the integers are all in the heap whereas in C/C++ you'd be able to put them on the stack - this may seem like "OK, whatever" but the heap itself has an overhead to request memory and with Python you'd probably have at least 3 hits to create a list of two integers but in C/C++ you can avoid the heap entirely.
This is of course a gross oversimplification. Key takeaways are the lack of overhead (interpreter), optimizations, and the principle of not paying for what you don't need (direct control over memory usage/heap vs stack/smaller structures).
Hi
So i'm a person who likes using MCUs as a hobby. I've been using Arduino and it's pseudo language but now i'm trying to step further into programming so I bought a couple of ESP32, which uses C instead of Pseudo C, but it can also be adapted to use python.
So I'm trying to decide which one is best for me to start learning more concepts.
I know python is easier but slower than C. That kind of time edge is not really important for my MCU projects. However, I also know that learning difficult things make easier for you to understand easier languages in the future (like python)
Any thoughts or advice about this?
I understand basic programming concepts and I have a small and brief history of front end webpage programming with HTML, CSS and very little js, as well as medium Powershell knowledge.
I learned Python as my first language. I am by no means good at programming, but I had to learn it so I did. It is pretty straightforward in terms of syntax and it reads kind of like English. I guess it was good for me to focus on the logic rather than the syntax and other things. Now I have to learn C++ and for the most part i am happy to have the logic part down and now it's just a matter of time to get used to the syntax and specific things of C++.
I think if I would have learned c++ first I would have been very overwhelmed, but I had no experience at all and everything was foreign to me so I can't say if this is the case for you.
C isn't that difficult, there's a few more operators and you use brackets instead of whitespace. People say python is easier, but the ergonomic things can make it harder in specific circumstances. I personally prefer strongly typed languages to dynamically or weakly typed ones, otherwise the data type could have conversion issues.
Most of my life I have worked on C programming language and used it in embedded programming, I love to code in it. But when I jump to Leetcode for solving things, I see C takes a lot of time, lines of code, whereas python does the job in few lines itself.
But still I think with C I am knowing what I am doing it gives me more freedom to actually see what is going in background whereas for python, boom, include some magic** and it works like a charm,
I am open to learn Python but not sure will it help me out in real world interviews, if someone asks me something, i am not a competitive programmer, I want to just learn new things and use them in my work,
any guidance should I go for python? or stick to C?
e.g. Sorting algos we need to implement in C to solve a question, max I can use is a qsort but python does the job using sort() function not sure if many python programmers know what goes in the background of sort() function, I may be wrong
I am particularly interested in AI development and I have heard that Python is really good for it, however I don't know much about the C++ side. Also in general, what language do you think I should learn and why?
I'm in my first year of CS engineering. I have learned C. Its about time I pick up new language but Im confused if i should learn python or C++ first.
I have to learn both of them ultimately(requirement) but what order would be easier and less hassling.
Hello, I'm a 21-year-old CS student facing quite a dilemma. Over the past year, I've been learning C as part of my university program. This curriculum covered basic concepts such as if statements, arrays, loops, and strings. (This year, we're delving into pointers and memory allocation.) However, I'm eager to secure a job. In my country, the two most popular languages for employment appear to be Python and JavaScript. Consequently, I've started learning Python. Nonetheless, I've come across opinions online suggesting that Python might not be the best choice due to its perceived limitations in data types. So, I'm left wondering: should I continue learning C or switch to Python and begin my job search?
Sorry in advance if this is the wrong place to ask this, but I wanted to do a small summer project and the program I was hoping to use is python based. I'm not at all an expert at c++ for starters, I just took a semester long class with the program and was hoping that at least some of taht knowledge would be easily transferable to python
Edit: looking at all the replies has been incredibly helpful. Looking through everything has really helped make the similarities and differences pretty clear between the two, so I’m sure it’ll be a process to get used to it but it doesn’t seem like figuring things out in python for what I want to use it for will be won’t be incredibly difficult.