Should Python Overthrow the Java Tyrant in APCS?

Shreya Chaudhary, Staff Writer

Traditionally in Keystone and in other schools, AP Computer Science (APCS) has been taught in Java, an extremely verbose language based in Object-Oriented Programming. Despite Java’s popularity, as a programmer who knows Java as well as other languages, I believe that APCS students would benefit more from Python than Java.

 First, what exactly makes programming language different from each other? Both Java and Python are considered high-level languages, or are more reader-friendly than computer-friendly. (Through a process called compiling or interpreting, the reader-friendly content turns into computer-friendly content.) Python is almost English; it is considered to be one of the easiest programming languages to learn. Java, on the other hand, is verbose with a rigid structure. In Python, one can write in functional programming as well as object-oriented, whereas Java only uses object-oriented. Finally, Java is typically faster than Python. I believe that every language has different uses, and the uses of Python generally outweigh those of Java for learning and applications.

The fundamental objective of APCS is to learn the basics of computer science. For many people taking the class, it’s their first time programming and a language like Java can be intimidating, as it has a lot of foreign words. Typically, in the first few weeks of APCS, students can’t create their own program by scratch, as the headers with a lot of words that are not easily explainable. Python, by contrast, is an easier introduction to APCS and can teach students the basics with students understanding every line of code. The language is a beginner-friendly language (which is the entire point of APCS—an introduction to CS!) Even for the simple task of printing the word “hello,” Python proves to be simpler and more concise:

Python:

print(“hello”)

Java:

public class Hello {

public static void main(String[] args) {

System.out.println(“hello”);

}

}

In terms of practical uses, Java is used primarily in Minecraft, Android Studios (creating Android applications), and in APCS. Java can also be found on some websites, though many websites are transitioning to JavaScript (a language completely different from Java) due to Java’s security issues. Java has its uses, yes, and due to its past popularity, it will most likely stay in our system for quite some time before being completely erased. However, Java is the language of the past, and APCS should be able to adapt to the changing times. Python, in contrast to Java, is used more for research and industry. Python is known for its application in Machine Learning, Deep Learning, and Data Science, and it’s even making its way into Quantum Computing. Python is the language of the future, and it is critical that students are exposed and can understand the upcoming technology. In addition, Python is a popular choice for game development, through mediums such as PyGames. Recently, in a Stack Overflow survey, Python beat Java as the most popular language. 

Of course, to make this change from Java to Python, one must look at precedents. I’m not the only one supportive of Python: in other high schools, the Computer Science III students learn how to program in Python, learning important skills such as web scraping and deep learning. AP Computer Science Principles is taught in Python. In addition, most universities will offer classes in Python if one wishes to pursue a career in Computer Science. APCS has transitioned between languages in the past: at first, it was taught Pascal (1984-1998), then in C++ (1999-2003), and, currently, in Java since 2004. If APCS has changed to reflect the current trends in languages, then APCS should transition to Python.

Though Java will be staying in its popularity, the needs of the future seem to be pointing towards Python. It’s an easy language to learn which can then spiral into many uses in research and industry. Python code is known to be short and elegant, a trend in programming today. Since APCS switched from C++/Pascal to Java to reflect the trends in programming languages, I hope that APCS will soon switch to Python, a language skyrocketing in popularity and promising a plethora of jobs in the future.