Java is not for beginners

As jobs become more tech-oriented and budding software developers attempt to join the field, it’s important that they’re not ‘gate-kept’ out of the industry. 

Unfortunately, this can happen before a new programmer ever even writes their first line of code.

There’s no shortage of reasons for why this might happen but a big culprit is that beginners are too often introduced to the wrong programming language.

/// Enter Java ///

Somehow, Java is still being touted as a ‘beginner-friendly’ language. It’s used in Universities worldwide to introduce new students to programming, and here in Ireland it’s commonly used in conversion courses*.

* Courses designed specifically to introduce those with little technical background to computer science and software development.

Let’s take a look at “Hello World!” in Java and Python

Java

public class Program
{
   public static void main(String[] args) {
       System.out.println("Hello World!");
   }
}

Python

print("Hello World!")

Spot the difference.

To a true beginner, the Java code raises far too many questions and ensures a learning curve that will throw many off. Java’s verbose syntax and boilerplate forces the introduction of concepts which are entirely unnecessary for a new student – it’s simpy not the time for learning about static methods, OOP concepts etc.

In contrast, the Python version is concise and easy to understand.

To hammer on this point again, let’s write a program to sum up the numbers from 1 to 10 and display the result.

Java

public class Program
{
   public static void main(String[] args) {
       int result = 0;
       for(int number = 1; number <= 10; number++){
           result += number;
       }
       System.out.println(result);
   }
}

Python

result = 0
for number in range(1, 10 + 1):
   result += number
print(result)

When beginning to learn about programming, a new students focus should be on getting comfortable with logical thinking and translating ideas into clear statements and procedures. Python allows for this more easily and enables beginners to become productive quickly. The technical details can come further down the road when a real interest and motivation is sparked.

Back to Top