The best way to understand computers and bend them to our will is to learn to speak their language so they will understand our commands.
The people who love fantasy novels sometimes imagine that they’re learning magical spells and incantations. The practically minded use more grounded language to represent the logical structure of numbers and data. In any case, it’s all about understanding which sequence of keystrokes and mouse clicks will make the computer jump through metaphorical hoops and execute virtual dances.
Java is classic
The Advanced Placement test chose Java long ago when Java was young and exploding. Perhaps Java never reached the apex of its initial trajectory, when everyone seemed to assume it would be completely dominant, but it remains the backbone of many websites, smartphones, televisions, and small devices.
Choosing a language with a strong following allows the student to jump on a bandwagon already fully stocked with sophisticated development tools. Moreover, there are bazillions of lines of open source code that the student can study, revise, and extend for their own work. They’re joining a big movement and it’s easy for them to fit in.
Python is new
In fact Python is not so new—the project began more than 30 years ago—but it feels new because its success has come slowly. Only recently has Python broken out and found widespread adoption with casual programmers.
The novelty means that the schools that are embracing Python are creating new lesson plans, writing new exams, and developing new decks of slides. They’re not digging out some dusty old questions from the 1990s with references to Pets.com and MySpace.
The newest AP course, called Computer Science Principles, lets the teacher choose the computer language and many are choosing Python because of its freshness. The newness may be skin deep, but all languages are just some clever syntax that hides the if-then-else decision structure of assembly code.
All of this success is building a positive feedback loop. The November 2020 edition of the Tiobe index marked the first time that Python climbed into the number-two slot (behind C), recognising how the language was growing more popular than Java.
It’s in the browser and the browser is the foundation for your desktop, your phone, and all of those kiosks you see everywhere.
Java is typed
You may not like spending the time to specify the type of each variable, but it doesn’t take that much time to click three keys to add “int” to your code. When you do that, you gain all of the power that comes from letting the compiler double-check your code immediately and find the stupid mistakes before it’s deployed.
Type-checked languages force us to think more rigorously about the logic in our code, and that’s an essential lesson for new programmers. Java’s type structure reduces bugs and builds better code.
Python isn’t typed
The typed-language lovers are smart and they write good code, but if you think your code is good enough to run smoothly without the extra information about the data types for each variable, well, Python is ready for you. The computer can figure out the type of the data when you store it in a variable. Why make extra work for yourself?
Note that this freewheeling approach may be changing, albeit slowly. The Python documentation announces that the Python runtime does not enforce function and variable type annotations but they can still be used. Perhaps in time adding types will become the dominant way to program in the language, but for now it’s all your choice.
Java rules devices
The most popular cell phone platform in the world is Android, a huge stack of code built on top of Java. But that’s just the most visible platform. Set-top boxes, new Chromebooks, and even some desktops run Android apps just like the smartphones.
A close cousin of Java, C#, dominates the Windows world. C# is not exactly the same as Java but it’s very close. If you’re going to be writing an application for a fixed piece of hardware, there’s a good chance Java is the best choice.
Python rules data science
If you’re writing software to work with data, there’s a good chance you’ll want to use Python. The simple syntax has hooked many scientists, and the language has found a strong following in the labs around the country. Now that data science is taking hold in all layers of the business world, Python is following.
One of the best inventions for creating and sharing interactive documents, the Jupyter Notebook, began with the Python community before embracing other languages. It’s one of the best ways to mix together software, data, and the text that explains what’s happening. Readers can absorb the words and then push buttons to run the software on the data.
Java runs everything
These two languages aren’t the only ones that rely upon the rock-solid performance of the JVM. Many functional programming languages like Scala, Clojure, and Kotlin also rely on the same foundations. This helps everyone by making it simpler to link these JVM-based languages together if you want to use them in the same project.
Python runs everywhere
Python isn’t the first choice or even the last choice for people writing emulators for other languages. Still, it’s easy to find Python on many computers. The language’s creators have always distributed the code as open source and the packages are pretty much everywhere.
Indeed, you’ll find Python included in MacOS and most full-featured distributions of Linux. And while it’s not included in Windows, it’s a breeze to install—just do it the smart way.
Java has strong IDEs
Eclipse, NetBeans, and IntelliJ are some of the best integrated development environments around. They were created by the Java community and nurtured over the years to create one of the most supportive environments for writing code.
The code completion and code generation algorithms may not write all of your software, but they can type out a significant amount. All of this hand-holding really helps new developers get the syntax correct.
These IDEs were so popular that developers from other languages found a way to run their code inside them. If you become a professional Java programmer, you will almost certainly be using one of them. In the meantime, if you want a simpler and friendlier Java programming experience, try BlueJ or Greenfoot. These “beginner IDEs” were designed specifically for learning Java.
Python has the cloud
The Python language found its first home in the world of Unix and so it’s no surprise that the clouds filled with Linux boxes are natural places to find plenty of Python code. Some of the latest tools like Jupyter bundle together code, data, and explanation so people can share their insights with others as research papers that come alive. Jupyter notebooks are not static documents, but interactive tools for exploring.
Others are building sophisticated tools around the language to enhance research. PyTorch, for instance, is a deep learning toolkit filled with code, data, and the algorithms for analysis. Environments like this will dominate the future of data science.
There are also several good hosts for notebooks that add extra features for sharing data and handling big, intensive computational data analysis jobs. Google, for instance, runs the Colaboratory, which will store your data and offer some free access to GPUs for faster computation. The Saturn Cloud touts performance that may be 100 times faster than your desktop.
Learn any — or all three
Smart developers have also created tools to automatically translate, link, and integrate the different languages with each other.
In short, the three languages do not need to be islands, isolated from each other. You don’t need to pick just one in the long run. But start with one at first.