Which language should one first start with ? JAVA or Python ?

I have done BSc IT and know quite a few programming languages. I had learnt basics of JAVA earlier. Now I want to start learning a new language and many of my collegues have suggested that Python and Ruby is the most used language in industry. So my question is, which one should i learn first, JAVA or Python ? Thanks

Well, i surely cannot give u a direct answer that u should use java or pyhton…

So, I’m gonna share with u pros and cons to both.

Syntax: JAVA might appear a bit more lengthy compared to python short code, but as you mentioned u have learnt basics of java, this wont be much of a problem for you.

Libraries: Python has much more libraries as conpared to java, also, its support of long integers is better than java. But, this all may appear quite overwhelming at first. I too know basic python, while my preferred lanugaue is java in which i have coded nearly an year.

Just one thing, do not try to start both languages simultaneously, because it might end up complicating both. Just choose a language and stick to it until u mastered it. At that point, it would be good to learn more languages.

PS:You can google and get different opinion. I just shared mine. Choose what suits u.

Java is sexy as well. <3

Not as much as C++ :wink:

1 Like

C++ can only be termed as fascinating trouble…

But i never got around liking it much except for its 0.00 time solutions.

Java is something like love at first sight :smiley:

PS: i like ur veiw @vijju123 :wink:

taran, you started coding a year from now?


Last september i started coding, if u dont count that i was studying ip for 1 year and a half in which i didnt even knew about arrays. (syllabus have java swing in netbeans only)

Only around last sept i started learning about arrays and programs.

U tell, when did u start coding?

1 Like

@taran_1407 Big reply so put it as answer

You’re really good coder then. I started coding this year in june, and its been 6 months and I still don’t know about graphs and dynamic programming and so many things to become a O.K coder!! Can you give me some tips to become a coder like you? Right now I’m learning data structures, I always use brute force in codechef to make my programs work, but now I want to learn algorithms and different data structures. What would be the best way to become a good coder? And I’m a sophomore(2nd year in CS) first semester about to end in few days, When I took CS in college I had no background knowledge about programming, my friends just suggested me to take it. And for the first and second semester of programming, I had teachers who didn’t really teach me why we’re doing programming and for the first and second semester, I used to learn the code for the test even for swapping two numbers. So, basically I started coding in September last year(2016). I learnt about what programming actually is when one of my friend challenged me to solve a question on codechef, it was a beginner question and it took me more than 10 tries to solve it but when I saw that green tick it made me so happy!! Then I finally learnt what programming is and we can solve problems like codechef problems with programming which is fun. So yeah, that basically is me!! And don’t forget to give me some tips :smiley:

I know @vijju123 starting coding a year from now too and he’s also an excellent coder like you

My first coding competition was Codejam this year, (almost clashing with my 12th exams :smiley: ).

PS: I too have submitted brute force solutions to problems in current long challenge which i cannot solve. It’s a common practice, and is understandable. Brute force is the base to full solution.

Post-post-script: Use Python, swapping two numbers is just a,b = b,a :smiley:

1 Like

How did you do on codejam?

I started seriously in April-May though. Before that coding was just a pastime,long story short I didnt seriously start it then XD. Its not a year, its just a few months. :3

Qualified the qualification round, Was near to qualify for 2nd round too in Round 1A, but wrong file upload…

All in all, didn’t make it to round 2.

Did u participate in codejam?

No, I didn’t participated in codejam I came to know about codejam 2 months ago lol

@kunnu120 - I started seriously in April-May though. Before that coding was just a pastime,long story short I didnt seriously start it then XD. Its not a year, its just a few months. :3

Also, brute force are important. Brute forcing means that atleast you know HOW to do it. Now to do it efficiently, you will see some tweaks and data structures being used, which should be easy to follow for Easy-medium problems. Take a step at a time, focus on what you should do now.

If you decided to do seg tree, give it time, perhaps 3 days to a week. You need to read various long blogs, practice questions (finding an easy question for a topic is hardest part- but once you do it, you are good to go).

Regarding how to learn algo, I am flexible. I first try to read from blogs. As usual, at times I STILL have a doubt at parts the blogger skipped, so I then refer to video tutorials (directly jumping to the doubtful part- videos take time to be seen).

The thing is, you should know your level and the next level. As of now, when people ask me for “How do you solve 5 questions each long?” Then honestly, I say there isnt much difference between your level and mine. Its just applying concepts.

For example, last long, p4 (that string question- “construct a string such that it has shortest possible substring which is palindrome”) it required nothing, just brute force. You just need to make the computer do the brute force for you. The problem MANY people faced was “unable to think the pattern.” Its alright, its not possible to always guess what the setter thought of while he made this type of a question. Many times alternative approaches are not there, and only a single approach gets AC. The clever thing to do was, to not to do tedious calculations and tweaking for small-moderate values of N, but rather writing a brute force which would give you answers for some values of N. The solution of first 18 values of N was enough to crack the question completely.

For the first 4 problems of long, I tell you, they are nothing special. They are simple concepts. (I replied this to yet another mail yesterday XD). p4 might be something from data structures or graph theory, it will be clear which one to use for that. From p5 things start getting serious. The jump from p4 to p5, p5 to p6, and p6 to p7 require lot of patience.

Another thing is, pry on others successful submissions. Just how many times is a single reading of editorial enough for us to get the question? And how many times is the setter and tester’s code even readable, or the most optimum? Abuse the feature that you can look on others solution. If you come across something new (eg- DS, or command)- learn it. Thats how you can introduce yourself to Data Structures and some “tricks” (:p). The hardest part, of course, is understanding that solution. But once you get the hang of it, you will be comfortable.

Lol, too many things at once, isnt it? XD

EDIT: Lol XD. Sorry for typo, :stuck_out_tongue:

1 Like

@vijju123 sorry, I didn’t know that please give me your blessing to become a coder like you (ಥـْـِـِـِـْಥ)

In what field do you want to go? Decide on basis of that. For CP, JAVA is preferable for me over python.

i am newbie too… and from my experience i can tell that python is much suitable for beginners…

Man that was really good information thank you so much but I wish you could spell my username right (ಥـْـِـِـِـْಥ)

@vijju123 you said reading blogs is a good thing. should I read any programming book, did you read any book? If so please recommend