Live data from Hacker News

Overkill: Java as a first programming language (2010)

matthias-endler.de

11–20 of 70 posts

Re: Overkill: Java as a first programming language (2010)

#11
post #3

What's the point in hiding the fundamentals of OOP, rather than starting with them very quickly? You can't get very far before you're calling methods on the strings you're printing. I'm genuinely curious, I sat through an intro to programming & follow-up course in PHP and that line of thinking seemed to confuse the students. They weren't sure of what a function was even though they were using functions! The professor…

It's not about hiding OOP, it's about being overwhelmed with too many new concepts at the same time. Put yourself in the shoes of a beginner: the runtime, the IDE, the language keywords,... everything is new to them. Once you know your way around simple functions you can start adding another layer of abstraction. But slowly. Maybe Ruby would be an easier start for OOP than Java.

Re: Overkill: Java as a first programming language (2010)

#12
Java is my favorite language now, but its power comes with a lot of potentially confusing constructs. The sheer complexity of the syntax is bad for beginners as well.

It's harder to create program that compiles and runs, at least until you understand compiler and syntax errors well enough to avoid them.

I learned Java as my second language after Perl and I remember how horrible it was to grok all the concepts at once.

At the same time, like I said, it's my favorite language now. The syntax, constructs, and standard library are built in a very sensible way. There's nothing I can look at in Java and say "wow this really fucking sucks" which is rare among languages. C# is the only language I can think of that definitely has cleaner design.

Re: Overkill: Java as a first programming language (2010)

#13
I'm on board with Java not being a great first language but I'm pretty tired of posts constantly citing ancient unidiomatic Java to prove how bad of a language it is. Their file i/o example could just as easily be

  import java.io.IOException;
  import java.nio.file.Files;
  import java.nio.file.Paths;
  
  public class fileIO {
    public static void main(String[] args) throws IOException {
      Files.copy(Paths.get("test.txt"), System.out);
    }
  }
Granted that Files utility was added in 2011. Even in 2010 there were plenty of better ways to write that example.

Re: Overkill: Java as a first programming language (2010)

#15
If you're going to take CS AP classes in high school, it's gonna be Java. This probably explains why a lot of people learn Java as a "first" language. (And no, not everybody started programming when they were five.)

https://apstudent.collegeboard.org/apcourse/ap-computer-scie...

https://en.wikipedia.org/wiki/AP_Computer_Science

Re: Overkill: Java as a first programming language (2010)

#16
post #13

I'm on board with Java not being a great first language but I'm pretty tired of posts constantly citing ancient unidiomatic Java to prove how bad of a language it is. Their file i/o example could just as easily be import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; public class fileIO { public static void main(String[] args) throws IOException { Files.copy(Paths.get("test.txt"), System…

I don't see how this is much easier for a beginner. :)

Re: Overkill: Java as a first programming language (2010)

#18
Seems like if you did spend the time and effort to understand all the parts of the Java example, you'd be well on your way to being a coding badass. But it's important for someone forming their first impressions to be able to have a quick turnaround from having an idea, to telling the computer to do something, to having the computer do it. That's the part that gets 'em hooked!

Re: Overkill: Java as a first programming language (2010)

#19
post #15

If you're going to take CS AP classes in high school, it's gonna be Java. This probably explains why a lot of people learn Java as a "first" language. (And no, not everybody started programming when they were five.) https://apstudent.collegeboard.org/apcourse/ap-computer-scie... https://en.wikipedia.org/wiki/AP_Computer_Science

In Europe I'm not aware of any country offering Java classes in high-school. It's typically Python or other languages with a low barrier to entry. Maybe JS today.

Yet most good universities stick to Java for CS101, and for good reasons imho. On the other hand, non-CS majors at my school were sent right away to "useful" languages in their field (C++ at that time, I assume Python is more common nowadays).

Re: Overkill: Java as a first programming language (2010)

#20
post #3

What's the point in hiding the fundamentals of OOP, rather than starting with them very quickly? You can't get very far before you're calling methods on the strings you're printing. I'm genuinely curious, I sat through an intro to programming & follow-up course in PHP and that line of thinking seemed to confuse the students. They weren't sure of what a function was even though they were using functions! The professor…

> What's the point in hiding the fundamentals of OOP, rather than starting with them very quickly?

Fewer concepts to learn. I've worked with people who have been programming professionally for decades and still don't use OOP well. OOP is hard.

With a novice user, you want to get them making a computer do cool stuff as soon as possible with as few concepts as possible. Everything else runs the risk of scaring them away forever.

Post reply on HN