Is Python really the language to start with?
Learning Python was my first time in the world of programming and after a lot of practice and learning from several sources I reached a level where 'If I could understand the question, I could solve it in Python'. I learnt how it was way slower than the other languages and I thought that I could learn another language as a secondary language. I tried C++ and I realized I was really frustrated because 1. I had become used to the simplicity of Python and had to search the web for how to do things in C++. 2. I had become used to using built-in methods of Python. 3. I always had to debug my program for semi-colons, data types etc. 4. I couldn't deal with very big numbers due to the limit of digits(maybe I can deal with, don't know how) .....and ultimately, thanks to my low patience, I quit. So my question is, is Python really the language to start with and if so, where did I go wrong in my course? Should I encourage others to start with another language? Please note: *almost* all concepts in C++ were clear.
1/2/2020 4:43:45 PMXXX
91 AnswersNew Answer
When you learned Python, I'm sure, stuff was difficult. You got indentation wrong, forgot parentheses, didn't understand error messages, wrote messy code, had a lot of bugs... Then you became fluent. All you have to do is accept that you're not yet finished, and there is more to learn. So on to the next level, where you suddenly have types, overflowing ints, pointers, includes, compilers etc. and learn all of that just as successfully as you learned Python.
C is the language that rules them all. C is king. Other languages are all derived in one way or another from the C syntax. Learning C is like learning the universal language of programming. C++ has extensive STL library for many "built in" methods in python. python is a good language for beginner, but a beginner should not stop after learning python. one should seek to gain different tools as there are best tools for different jobs.
No, Python is a pretty bad language to start with IF you want to dive into computer science. People recommend it to beginners because it's easy and lazy (many modules make your coding way too easy). And, as you stated, the syntax is fairly unique to Python so switching to and from will be awkward. Your 4 points are pretty much why Python isnt a great starter for comp. sci. students. Pretty much every popular language you will come across use data types, semi colons, braces, etc. so getting used to that early is a must. Data types determine the size of a number. long and BigInt are the largest and you can even do long long. My first serious language was cpp, then Java, and when I used Python I was very confused; it was just too easy and way to many little hacks. I learned it quite quickly because cpp and java helped with concepts, but lost interest just as fast; I loved thinking and doing things my way and hated the spacing syntax
When you learn a new programming language then learn it separately and don't think about other programming concepts here. Start fresh and you will understand everything without confusion. C++ is a language which is more close to the machine and hence it will be difficult in the beginning. Don't give up but keep enhancing your learning. You will succeed.
Also Python has a quite uncommon syntax that doesn't use semicolons which also makes it harder learning other languages. Btw. Pythons indentation syntax is probably as painful for me as semicolons are for you: a simple space can break your whole code... It all depends also on which things you value. Each language has key values and Python provides simplicity. And this simplicity certainly helps a lot of people getting into programming. But it comes at a high cost: About 200 to 400 times slower programs (compared to C/C++). If don't need to be efficient with resources that's fine but if you need speed that's by far too slow. To summarize all points: Python is good for beginners but can make it hard to make progress in other languages. Therefore I wouldn't recommend it as "the generally best language for beginners". It might be but depending on your goals you might also better start with a different language.
Youre welcome, happy learning!
「ＨＡＰＰＹ ＴＯ ＨＥＬＰ」 . Thanks for your time, but I really want to learn C++ because after all, that's real programming, but at the same time I don't want to let go of Python. Any advice or tips that you can give..... Or any books which make C++ easier.
Instagram and Google use python and the video game Civ IV used it for some algorithm so reading that python is only for begginer is just wrong. Python has different purpose and there is no reason to praise c++ so much. As one of the engineer at Google said "python where we can, c++ when we must"
I am late to write something in here. Anyway, let me add one thing. In my opinion, proceeding from Python to another language is *merely* a psychological problem. I get a feeling in quite a few of the posts here as if starting with Python would spoil you forever for learning a different language. I think that's just not true. All one needs to do is accept that you have get used to do more, to take care of more things in, let's say, C++, and then get to work and write a lot of code in it until it feels normal. If it's necessary to be 'abstinent' from Python for a while, in order to stand the 'shock', so be it. I also see value in starting with e. g. C instead, because you get the basis for understanding how higher languages work, but I don't believe this is an absolute must.
Thanks HonFu . You are actually right. I feel C++ is hard more because everyone says it is. When I'm tryna do some stuff in C++, I can almost feel my brain say 'You're just an idiot. C++ is too big for you'.
HonFu what you're saying makes sense. Thank you.
Bassam Salim Abdulrazak for me semi-colons aren't a problem any more as the compiler tells you the line number. But the syntax change is still a bit hard. Thankfully now, I'm starting to understand C++(a bit).
XXX Depends how you like to learn. I love reading many books on one subject and taking parts I liked and making my own style. The books I thought where great for starters were -Starting out with C++ from Control Structures through Objects by Tony Gaddis. I have the physical copy since it was new and not available online at the time but i bet a pdf lies around somewhere. This book is also likely outdated but everything should work. I THINK it uses c++11 -Jumping into C++ by Alex Allain. I belive its free lol its just cprogramming.com in a pdf format. The teaching style is alright but it covers many topics. I say read Gaddis first then Allain (I did)
NixxTV bro/sis, HTML is not a programming language
Who knows... maybe if you tried to learn C++ as your first langauge, you MIGHT have given up on programming sooner.
That's indeed a good question. I think it's good to learn things "the hard way" at least if you plan to go further. If you just want to write a couple of scripts Python is fine, but if you're a professional programmer you'll need other languages eventually. Now the problem is that Python has such a high level of abstraction that you have no idea of what's happening behind the facade of the syntax and built-in functions. If you learn C for example first you understand quite a lot of what's happening when your code runs and also understand how other languages build abstractions on top of that and therefore you automatically understand all other languages more in depth. And as you said once you're used to certain features you miss them in other languages and get frustrated. However if you are used to a limited set of functions you need to implement certain things yourself or look for existing libraries, something that might be tedious first but again helps you again understanding the underlaying problem better.
Guys please, let me make one thing clear. Python is clear to me. The problem I'm facing is in learning another language. Please don't give answers saying Python is in demand or that I should learn Python.
HonFu you make alot of sense, and coming from the same lane i did say exactly similar. Your view is quite objective and unbiased. In school I was taught with C+Lang and Java. But learnt PHP on my own for quick development. I learnt python and its quite interesting and a tool for alot of things n sticked to it. XXX using library is not so necessary but to speed up work. Me love solving without libraries to see if i understood before using libraries. Happy coding##