Computer Science Department needs a language change

Daniel Garcia, Website Manager

Computer science is currently one of the most in-demand fields. However, the Computer Science department’s standard of teaching Java for Pre-AP Computer Science class is a misguided way of exposing kids to this amazing field.

For the pre-AP course, students must begin by learning Java. This course leads into the more complicated AP Computer Science course which puts students on track for a CS major.

I have worked with Java for three years, and I can honestly say that it is incredibly complicated as a programming language. It is not just because computer science is complicated that this language is hard to learn and use, but because of the quirks of the language itself. Because of the language’s insistence on using object orientation, even simple programs have many parts that must be ignored by new students.

Here is a simple example program. It takes two numbers, 10 and 20, adds them together, and shows the output on the screen.

public MyClass {
public static void main(String[] args) {
int a = 10;
int b = 20;
System.out.println(a + b);

Looks super complicated, right? You can probably understand a and b corresponding to 10 and 20 and the sum being printed, but what about the rest of it? What’s with this public business? What does static mean? Why does String have those bracket thingies on the end?

All that complication is required for even the simplest of programs to execute, but it’s impossible to explain what it means all at once. The concepts are simply too complicated.

Instead of that, look at that same program, but written in another, simpler language, Python.

a = 10
b = 20
print(a + b)

That’s much simpler, right? Just the bits a beginner can understand and nothing else. This program executes perfectly, and students can easily experiment with the entirety of the program, and the entire program can be explained inside of thirty seconds.

Now, I’m not trying to argue that Java is a bad language to use, or that it shouldn’t be used in industry. However, the extra complication turns many beginning students off of computer science. Computer science should be about experimentation and asking questions, and if a student asks about any of those keywords in the Java program and is told “Just ignore it, it has to be there because of reasons I can’t explain right now,” kids will get discouraged from asking future questions.

Java works great as a second or third language, but as a first one, it is far too complicated to force onto a beginner. Python (or another simple scripting language like Javascript, which is different to and much simpler than normal Java) can teach the same fundamentals and give the exposure to computer science that the entry-level course needs, but do it at a fraction of the complication. Students may eventually need to learn concepts like object orientation, but forcing them to do it immediately is like forcing someone learning algebra to maneuver around material from a calculus class.

Yes, Java is the standard language of the AP Computer Science 1 exam and some students will want to continue onto that class. Some believe that they should begin to learn Java so that the knowledge can transfer. However, this argument doesn’t hold up to scrutiny.

The self-proclaimed goal of the computer science department is to teach students how to be programmers: how to think like a computer, how to debug a program, how to think logically and critically. Their syllabi state that the courses are not simply there to teach kids Java.

By the time I graduate college, it will have been eight years since I took Pre-AP Computer Science. Eight years from now, the computer science industry may have moved on to the point where other languages are the norm and Java will be relegated to the history books. Java is already a dated language, with the main internet browsers dropping support for it and alternatives like Javascript, PHP, Ruby, and others becoming more popular. For non-browser applications like the video games I develop, C++ is more powerful and lighter weight, and Python and C# are used to work with game engines because of their ease of use compared to Java.

Therefore, having courses with two different languages would be an advantage, since students will learn what is common between languages as a “computer science concept” and what is specific to the language they are using. I experienced this myself when I branched from Java to C++ and Python, where I learned that things like the forced object orientation are not always the case in languages.

Overall, using Java as a first language for the JPIIHS computer science students isn’t the best choice. There exist other, simpler languages that would be more beneficial to students, allowing them to get coding and experimenting as soon as possible. While the best option would be to get the College Board to change its Computer Science test to a simpler language, teaching Python or a similar language for the intro course at JPIIHS is still a better alternative to what we have now.