Live data from Hacker News

Overkill: Java as a first programming language (2010)

matthias-endler.de

1–10 of 70 posts

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

#2
I would partially agree with this even though Java is a great language.

I can firmly recall in my CS 101 class where they were teaching basic programming using Java, and the teacher seriously told us "just put static in all of your method declarations, don't worry about why yet otherwise you won't be able to use them in your main".

...didn't fully learn what static meant until over a year in my programming career.

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

#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 never got around to explaining OO or any fundamentals.

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

#4

I would partially agree with this even though Java is a great language. I can firmly recall in my CS 101 class where they were teaching basic programming using Java, and the teacher seriously told us "just put static in all of your method declarations, don't worry about why yet otherwise you won't be able to use them in your main". ...didn't fully learn what static meant until over a year in my programming career.

It was even worse starting in C++. Almost half the code in any project was opaque black magic. What is char and why do I need it? Why do I need `using namespace std`? Why do I need to create a Pair in order to insert into a Map?

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

#5
post #4

I would partially agree with this even though Java is a great language. I can firmly recall in my CS 101 class where they were teaching basic programming using Java, and the teacher seriously told us "just put static in all of your method declarations, don't worry about why yet otherwise you won't be able to use them in your main". ...didn't fully learn what static meant until over a year in my programming career.

It was even worse starting in C++. Almost half the code in any project was opaque black magic. What is char and why do I need it? Why do I need `using namespace std`? Why do I need to create a Pair in order to insert into a Map?

I don't think it's worse in C++. You can make purely imperative C-like programs in C++ with essentially no boilerplate (with the exception of maybe needing io from the standard library), and build things up as they go.

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

#6
Logo[0] was my first programming language on an Apple IIe. I was in 2nd grade and I loved it. You had subroutines, but that's it. Essentially all state was visible (although you could do increasingly more magical-seeming things the more state you hid - a truism that has held since then). It was a lovely way to see the thread of execution.

What an amazing experience to read Papert's[1] Mind Storms[2] as an adult to understand the profound thinking behind Logo.

Why not teach Logo as the first programming language?

0. https://en.wikipedia.org/wiki/Logo_(programming_language)

1. https://en.wikipedia.org/wiki/Seymour_Papert

2. https://en.wikipedia.org/wiki/Mindstorms_(book)

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

#7
I disagree with this. The second course most [software] engineering students at my university are exposed to, after basic MATLAB and C programming, is 'Object Oriented Design', which teaches the fundamentals of OOP using Java.

It's very useful to have a consistent mental model of classes, methods, variable lifetimes, etc. early on.

Of course, if you're teaching yourself to program (or recommending a language for self-teaching) then Java probably isn't the way to go. However, with a competent teacher, fundamental Java knowledge can be invaluable.

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

#8
post #4

I would partially agree with this even though Java is a great language. I can firmly recall in my CS 101 class where they were teaching basic programming using Java, and the teacher seriously told us "just put static in all of your method declarations, don't worry about why yet otherwise you won't be able to use them in your main". ...didn't fully learn what static meant until over a year in my programming career.

It was even worse starting in C++. Almost half the code in any project was opaque black magic. What is char and why do I need it? Why do I need `using namespace std`? Why do I need to create a Pair in order to insert into a Map?

It would of been better to start you with C then transitioned to C++ later on or skip it all together and go directly to java/ocamel/haskell then come back to C++ at a later date.

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

#9
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…

I believe it is to teach the fundamentals of the CPU, Machine code before the student has any knowledge of the abstraction's that currently exist. Then after the fundamentals have been established introduce the abstractions and different approaches to improve productivity.

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

#10

I would partially agree with this even though Java is a great language. I can firmly recall in my CS 101 class where they were teaching basic programming using Java, and the teacher seriously told us "just put static in all of your method declarations, don't worry about why yet otherwise you won't be able to use them in your main". ...didn't fully learn what static meant until over a year in my programming career.

In my CS101 class I asked what the "public static void main(String[] args)" meant at the beginning of the java code we kept getting and got the response: "It's some magic, don't worry about it."
Post reply on HN