Request Brochure

Blog & News

Speak the (Programming) Language - Python Vs. Java

happy boy working at computer smiling

iD Tech offers a variety of courses in a great deal of programming languages. Choosing the right one can be difficult, like deciding if you want the latest Apple device, or if an old corer will work just fine.

When writing a program, do you want it to take 2 to 4 hours to run, or 5 to 17 hours? When you’re reading that code again later, do you want it to be 100 lines, or 200 lines? Finally how set are you on your program actually working when you try to run it?

A Look at the Python Programming Language

With Python you’ll write half as many lines of code compared to a C++ or Java program. Python also assumes certain things to make your life easier. For example, if you make a variable equal to 4, Python goes ahead and assumes it’s a number. (What is a “variable” in programming?) So in Python you can just say, “Hey, make a variable that’s equal to 4!” In other languages you have to be a little clearer: “Hey Java, I want to make a whole number variable, and I want it to be equal to 4.”

Python is one of the most concise languages you can code with. Consider the following comparison:

  • Python variable declaration: my_age = 14
  • Java variable declaration: public static int myAge = 14;

Python will consistently be the most succinct and thus simple to read and write new code.

On the other side, Java and C++ programs are more likely to work as expected when you run them. That’s because if they notice anything out of the ordinary they’ll stop you from progressing until it’s fixed. That being said, sometimes it’s a little too particular for beginning students. A Java error message could read (and I’m absolutely not paraphrasing here), “Dear student. You accidentally placed a single point of punctuation where I didn’t expect it. I cannot go on. You must fix this egregious error. Come back to me when it’s complete. It was on the 3rd line at the 33rd character, probably.”

The Bottom Line

The ability to solve problems and think critically is more important than the programming language someone is using. A good programmer in any language can make a program more quickly than a bad programmer in another language. If you’re looking to get into programming, pick the course and language that seems most fun, whether it’s Python and game design, Java and Minecraft, or regular C++. If you’re excited about it you’ll get more out of it, and everywhere you’ll learn the same fundamentals.

Nanz & Furia. “A Comparative Study of Programming Languages in Rosetta Code” Department of Computer Science, ETH Zurich, Switzerland. Accessed April 01, 2015.
Prechelt, Lutz “ An empirical comparison of C, C++, Java, Python, Rexx, and Tcl” Fakult¨at f¨ur Informatik, Universit¨at Karlsruhe. Accessed April 01, 2015