Teaching Only One Language in School

Here at San Jose State, all computer science classes are taught using Java (with the exception of inherently low level classes like computer architecture). I get it… when a brand new student that has never written a line of code before enters your classroom, it’s tempting to teach them one language so they gain some degree of comfort. This is fine for an introductory class, but other languages should be introduced and encouraged later in one’s academic career.

I learned to program in C. I’m not one to say a given language is better than another, but I will say that C forces you to understand concepts such as memory addressing and allocation. Additionally, I used a Linux distro and the terminal for compilation and running. This let me understand the exact process of developing a C program since it didn’t abstract anything away.  A solid understanding of these concepts has helped me a lot throughout both my academic and professional careers.

At Portland Community College, I learned object-oriented concepts in C++. Then, once I moved to SJSU, classes were all taught in Java. Instead of seeing it as a hurdle I’d need to jump to be successful here, I saw it as an opportunity.

Once you understand core programming concepts, you should be able to translate them to any language. This is a critical skill that is not being encouraged at “uni-lingual” universities.

Of course each language has their own quirks: C has pointers, Java automatically deallocates your memory, PHP uses associative arrays, Haskell variables are immutable by default, etc, but this should not be that big of an issue! The central concepts are able to translate.

Source: https://xkcd.com/1306/

Coming from C, my biggest challenge in learning Java was figuring out how many built in methods a standard Java environment has (I don’t have to figure out array length manually!? Awesome!). For the majority of syntactic questions I had, I could just Google what I was trying to do and the first Stack Overflow link would have the answer I was looking for.

I think many programming concepts should be taught from a language-agnostic standpoint. For example, AVL trees, as a data structure, are not specific to any language, so why would a data structures teacher only show an implementation in Java? If you look at the Wikipedia article for AVL trees, you’ll notice that no specific language is mentioned and the example implementations are written in pseudo-code.

My current operating systems professor agreed that having a class full of people who only knew Java was not acceptable. For one of our assignments, he required that we write the code in C or C++. The class was extremely troubled by this requirement. Participants in my group had no clue what to do… one of them just wrote Java code and put a .c extension on it! When I asked if the code compiled for him, he said he didn’t know what that meant. Yes, this is an extreme case, but the lack of understanding of basic programming concepts is prevalent here. Talking to any given student for about two minutes, you can tell if they’re a self-motivated programmer who takes the time to understand the core concepts of his/her craft, or if they’re a programmer that has never left the confines of their IDE and is simply in the major because they heard there are a lot of jobs in the industry.

In a lot of ways, programming languages are similar to spoken languages. Most high schools these days require some amount of coursework in the foreign languages. It gives students an understanding of how language works and how even though there are differences, they’re all designed to help humans communicate with each other. I think this is an incredibly valuable thing to learn. Even though I don’t remember much from my high school Spanish courses, I gained a lot of core, linguistic understanding. Programming languages are designed to help humans communicate with computers. Why not have students learn more than one?

What do you think about which programming languages should be taught in college? Let me know in the comments section below – I’d love to hear from you!

Leave a Reply