Which Programming Language should i start with?

May be just love and easy writing is not the question here what about resources you get in c++ when you are doing CP.

For example almost every website provide code for topics in c++ for sure , Even in editorials , most of the time solutions are given in c++ . For example editorials of codechef and codeforces.

Most famous websites for learning DSA also uses c++ most of the time (Eg: cp-algorithms) , and having code in your preferred language and lots of theory about topic boosts your learning process.

I would also recommend beginners to start with DSA learning series provided by codechef it’s really helpful even i also started from there.

Yes exactly! You’re right, but I do think Codechef gives more time for TLE in Python (5 seconds when limit is written as 1, 10 when 2 is written). Also, after some experimenting, I saw that when the limit in Python was 5, it was 2 seconds in PyPy 3. Could someone confirm if I am right or not?

1 Like

Yes, PyPy3 is significantly faster than Python.
All multipliers for languages

2 Likes

@tanmay_garg yes thats why pypy3 is prefered over python in CP. you can vist this article of geeks for geeks for details in this topic.

@tanmay_garg maybe codechef provides more time but it isn’t obviously stated somewhere so I didn’t know. And @pst10 I understand that C++ has too many resources compared to Python3 but consider the fact that C++ is much older and Python is newer. Still Python is the hottest language in market right now. And resources for Python are also not less. I think Python is a highly successful language seeing the heights it reached in the time it had in market till now. Big applications like Spotify are also written in Python. I think if someone is not interested in programming after CP and just learning for sake of learning and CP then they can go with C++but for any other thing, C++ does not make sense now days. Different language is needed for different things but Python is hottest.

This trend keeps on changing and who knows which language will be hot in next 30-40 years. Any language takes time to lose its complete value but new languages come and replace old ones for big tasks very fast.

And just in case anyone thinks, I am not trying to argue or to give biased answers.
I am just trying to tell my opinion. :blush: :blush:

And like I said earlier - The answer to the topic of this post - Don’t ask others. See what really makes sense to learn for you. If you want to go into web development then you will need Django not Java or C++. If you need to go in Data Science then you will need Python or R(again not Java or C++). There are few industries that still need Java but it is also disappearing day by day. If you want to go only in CP then see which language you can easily get comfortable with because only basics seems super easy in any language. Things start to get complicated as you go(even in Python). So choose wisely instead of listening to others. For the speed of language, if someone tells you to do something in certain language then they are aware of speed and you shouldn’t worry about that. Like @tanmay_garg said, the time limit is given more for slower languages.

1 Like

If you have some free time, go through the editorial of PPDIV of April Long Challenge 2020. It’s setter has explicitly stated that it is not necessary that every question should be solvable in Python. :slight_smile:
For, CP , C++ > Python
Period.

4 Likes

C++ can be written in a pretty manner too
so you gave example of

for i in numbers:
     print(i)

here’s a similar code in C++

for(auto i:numbers) 
    cout<<i<<'\n';
1 Like

I have one argument against Python here.
Python is not preferred for Web Development that much honestly.
JS does the job and it’s much faster.
Python is good for prototyping and Data Science.

1 Like

@coder_indian4 Yeah thay’s the whole point i am recommendimg C++ for Competitive Programming.As I have mentioned in the blog
above.

@zappelectro Yeah sometimes time constraints can be set in this way that you need to code in language that is more closer to hardware.
thanks for mentioning link related to this.

1 Like

@shim98 Well can’t comment more on web development area but when i asked my professor that i want to start for network programming which language should i go for?
He said if you want a power start and want to get idea of field then go for python. But if you are interested in field and want to continue in it go with C programming language.

@shim98 yeah that’s right once you are familiar with it you can make it more English friendly.
Thanks giving this example.

@zappelectro I know very well that all questions can’t be solved with the given time constraints in Python. I faced that issue in last cook-off where I knew the answer to one question and the code was correct . I am sure. But Python wasn’t fast enough. In fact no one was able to do that question in Python and lot of people participate in Cook-off. maybe C++ is better for CP. (Who am I kidding! I know it is better). But I started with Python because it is gonna be a part of my school syllabus from next year and mostly I don’t face a problem with it.

1 Like

@shim98 you are wrong!
The best language for web-development is Python. Not Python directly but the Python based web-framework Django is currently the best for web-development. And it is crazy fast somehow so speed is not an issue. :slightly_smiling_face: :slightly_smiling_face:

@shim98 I don’t know you are at what level. Maybe you are in high school like me or you might be in college or maybe even a professional.

I am sure there is a way to work around with every language and I tried my best not to give biased replies just because I like Python. I had next to no idea about programming before I started Python and honestly I started just to get a headstart because of the JEE pressure coming up next year. I came to know that something like CP exists after 1 month of learning Python.

Honestly I do CP just to improve myself and not to win(off course winning is a motivation). I plan on taking Data Science after class 12 and Python is really helpful for that.

I like to emphasize on my thought that no language is easy and no language is tough. All are same once you get the hang of it. Just see which language makes sense to learn for your goals and go with it.

Period

@coder_indian4 Yeah that was the point of whole discussion.The speed factor of C or C++ and limitless resources we have for it.
Thankyou for sharing your contest experience.

@pst10 I don’t think you got my point. I replied to the topic of post which is “Which programming language should I start with?” not “Which programming language should I start with for CP?”

for CP there is no one good language. Almost all languages are good. Even the people in world’s top coding contests like FB Hacker Cup and Google Code Jam use languages other than C++ and make it to final. I agree most people use C++ but that does not make C++ the best. But if you have to completely rely on self-learning then I will say only one thing - go with either C++, Java or Python. Languages like Go and Swift are new with very few developers and it is really hard to get them from self-learning.

1 Like

You are biased towards Python.
I am not in High School or College. I just said python is a bad example for web development because there are more powerful backend languages people prefer. Like Go,PHP and NodeJS. Most of the companies don’t use one language for everything btw. Python has limitations in a few things. C++ does too.
The question of the discuss forum is “Which Programming language should i start with?”
I would say Python is not at all good. It’s very easy to catch on and implementation seems simpler in python.
We see people giving examples like swapping in C/C++/Java like

int temp=a;
a=b;
b=temp;

and python is

a,b=b,a

which is also outdated most languages have swap functions etc and like how hard is it to write a swap function.
Anyway i am trailing away from my point.
I am biased on the fact that starting language should be C/C++ because of the fact it is closer to assembly language.
C/C++ has concepts of pointers which is a very important topic when you begin to learn coding.
When you have learnt programming in general, you see the problem you have and then you decide the language to use. There are many ways you can solve one certain problem. For example, Data Science you can use Python. However, many statisticians prefer R and MATLAB for such work because it’s easier for them to understand and work with.

1 Like

@coder_indian4 Well yes my comments are especially related to CP , thats how the discussion turns out.

In starting of this blog in last line i wrote something in bold thats what i was saying.

Thanks for clearing you view.

@shim98 I never said that Python is used for everything. I clearly said different languages are required for different purposes.

And I get it that my answers are a little biased but it is the best I can say.

I don’t know much about web-development but from my research I know that Django and there was one more framework of some other language whose name I don’t remember are best for web-development. I don’t know much about Django except the fact that it is based on Python and crazy fast.

I get it that C++ is a nice language but my friend from what my research says, C++ is not good for market anymore. new languages take over very fast. Today is time of Python and some other languages but they won’t be on top forever. Some other language will come to dethrone them and that is the truth. Swift is also good for market right now as I know but it has limitations to apple products.

no language is perfect my friend I know that. And you say that Python is too easy then you are right!!!

Python is meant to make development fast not to be fast.

now you see the 2 examples you gave. Don’t you think my friend the python one took less time to type. Also in languages like C++ and Java, you need to specify the variable type every time which is not needed in Python. It makes out which variable type the thing is itself. In today’s world every second counts and people want fast. Also for an average person new to programming, Python will be easy to start with. The person can take up new languages according to need afterwards but with Python the person can focus on most important aspect of programming - the algorithms and logics to solve the problem. Knowing a language is of no use without knowing how to solve the problem.

Also every language has perks with disadvantages. one example is that Python is better with big numbers(very big ones) compared to C++. I don’t really know for sure but I read on GitHub so it must be right. So in some cases, one language is better in other cases other language is better.