@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.
@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.
@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.
@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.
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
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.
@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.
@pst10 I got it that your answers inclined towards CP that’s why I made my point clear. My first reply in this post isn’t biased to be honest. It was a general view that how to pick up new language and I chose Python so the perks of learning Python as first language were included in it. But the discussion slowly drifted away from the actual topic but I think it is clear now.
Thanks for letting me be a part of this discussion. It is the first actual discussion I have been a part of. Other posts to which I replied never got 10+ views and mostly ended with 1 reply that was mine.
Thanks for the discussion buddy. It was fun
in C++ you can also do
You didn’t read my point of pointers and what python ignores. Read up about linked lists and pointers in general.
Anyway, C is used for Operating Systems work and Companies such as Apple, Google. C++ is still in use for game development. Java is still used for backend for many companies. C/C++/Java languages haven’t died yet or anything. They are required to teach the fundamentals that’s what my point is. Wherever you go, the hiring rounds require you to have mastery in these languages. Python skips the fundamentals because it assumes you already know that.
This is my final reply to why Python is not a language to start with.
Read this very carefully before replying to it.
Now regarding problem solving, I won’t lie but i find it harder to think of a solution in python than C++. I am easily able to think of edge cases and my understanding of overflow and basic errors is better in C++ than Python. That comes from practise. You only used python so you find it easier to visualise in that. This is called personal opinion, it’s not a fact.
C/C++/Java have different memory allocations like int and long. Python’s int can store upto 2^128.
C/C++/Java have variables that can support that too. (Java has BigInt for example)
No language dies as such. They go through a lot of changes and advancements as well.
@shim98 I don’t know if C++ is still used but Java is still used I said that but maybe you are right. You are a professional and I am just a naive kid on Code Chef trying CP with Python when people from colleges and Professionals are trying in better languages like C++ and Java. I don’t know what I am doing here and why I am here. I am sorry I tried to put forth my views on a platform I got for first time in my life.
I am sorry I wasted your time.
To whoever reads this searching for answer to the question which is the title of this post:
go with C++ blindly because @shim98 says to and don’t go for Python at all. You will be wasting your time with Python. It will be a sin ok. It doesn’t matter what you want to do, just learn C++.
I am sorry I came here and I doubt I will ever come back to Code Chef discuss because of the professionals here. A naive kid who doesn’t even know what exactly he wants to do doesn’t belong here. I never had faith in our country’s education system at any level including the IITs and now I am losing faith in Code Chef discuss also because I am being outspoken everywhere.
I want to go abroad but I am so naive that I don’t know what to do!! If I go with JEE then no extra-curriculars. No extra-curriculars mean no US top colleges with perfect exam scores also. I can’t afford other countries who have english courses. I can afford only few US colleges who give full financial aid.
I don’t know why I even said all this.
Atleast I held back my language to keep the friendly spirit of this platform to some extent.
I am so naive I came here in this discussion.
Sorry again for wasting your time reader
I am not offending you or anything. I plainly put my points through that is all. Did I even sound a bit annoyed by your replies? Nope.
Did I even once said you were wrong? I just provided examples which are common misconceptions.
I did say i am not a college student. I am pursuing a job in a field you are interested which is Data Science.
I never said this
I said this because I experienced problems as I started out with Python too.
Codechef discuss is a good platform for discussing internships/CP doubts/interview problems. Don’t stop using it just because you feel people are “professionals”. (not even kidding there are millions of people who are better than me in coding and are still in college and high school)
When you further learn more about coding you will need to learn things out of your comfort zone.
I agreed with this. There is a lot to learn when you go forward
So yeah don’t be so disheartened.
I overreacted I guess
I have a short temper
Now I get it why you say Python is not good to start with: you faced problems when you started so it was personal experience. I get it now.
But I said Python is good because I didn’t face any problem with it and found ample resources to help me and this platform seemed nice to get help so question specific problems were also not an issue anymore.
According to me Python isn’t bad to start
If it was then it wouldn’t be the first language taught in schools to a child I guess but never mind this is a topic on which debate can go on forever.
Thanks for clearing your views.
BTW is Python really very important for Data Science or is it misconception everywhere?
It’s very good. No doubt about that.
If you go into coding interviews and all they strictly focus on C/C++/Java in first few rounds.
Yeah, resources are ample agreed. Python CP repositories exist idr but a few IM posted that.
I was taught Python in School. It messed up my fundamentals a bit. Because in college we were being taught in everything in C. I would recommend anyone to start with C/C++/Java like language that’s why. Then shift to Python/JS etc depending on whatever you want to do.
which college did you go to?
I think in most Indian colleges they teach C++ as first language but in world’s best college for engineering - The one and only MIT in USA, they teach language based on course and I checked out what is the structure of their course and I found out Python was taught not C++.
So I don’t know if Python messes up the concepts. Maybe it happened because of bad mentors(maybe computer teachers in your school were also no good like mine).
Manipal Jaipur ;_;
Not familiar with outside countries tbh. Indian Colleges especially third tier don’t give such liberty.
Yeah I have seen MITOCW Algorithms course it’s amazing and there’s no restrictions in languages.
Talking from Indian perspective.
ya I don’t plan on going to tier 3 universities as my academics are good enough to get me atleast NIT and maybe IIT(It is the aim but you know not everyone who is good gets in and also I don’t believe in the selection system so that makes things tough) also in India. I don’t think I will be able to go abroad for Undergraduate but after 1-2 years in industry I will go abroad for studies.
ya MITOCW is amazing if someone has time for it
The options we are having in choosing a language are really amazing.Language is a medium to communicate with a machine and algorithm that has been developed is independent of any language it is an idea you came up with now you can implement it in different forms.
May be that’s Why almost every programming book you prefer in beginning uses pseudo codes so you can fit you algorithm according to environment you use in later stages.
Thank you For Being part of this discussion mate.
exactly you got my point!!!
the algorithms and logics matter the most. If you don’t end up spending much time learning language then you can spend time on that but I think that topic is close now so I won’t take it any further.
BTW @pst10 you are from which university?
I am currently Studying in India. UIET , Punjab University , Chandigarh
Codechef and every other platform which is being provided these days is also equivalet to our universtities so i am also part of it.
Thanks Codechef for providing such an enviorment