Hacker News new | ask | show | jobs
by mratzloff 4813 days ago
So yes, while you're startup may choose Python or Ruby or the latest language of the day, Java is a great system to teach a lot of fundamental computer science topics with.

Are you implying that Python (1991) and Ruby (1995) are some sort of flavor of the day compared to Java (1995)? :-)

    import java.util.LinkedList;
    import java.util.List;

    public class Pets {
        private List<String> pets;
        
        public Pets() {
            this.pets = new LinkedList<String>();
            this.pets.add("cat");
            this.pets.add("dog");
            this.pets.add("bird");
        }
    }
or whatever may be great for transitioning people to C++ later on (not exactly where all the jobs are...), but

    pets = ["cat", "dog", "bird"]
is probably a gentler introduction for elementary school students.
4 comments

List<String> pets = Arrays.asList("cat", "dog", "bird");

You were saying?

> List<String> pets = Arrays.asList("cat", "dog", "bird");

Yeah...

This is a language that has its (very large) niche... education is not in that niche. Not out of merit anyway.

It's telling that you feel that is actually a counter example.
C++ comes in second behind java in terms of jobs according to stats from indeed: http://www.indeed.com/jobtrends?q=java%2C+C%2B%2B%2C+C%23%2C... . It might not be the new hotness, but there's still plenty of work for C and C++ programmers.
The point is not jobs, the point is going from zero to coding without scaring too many people off.
Gentler for a weekend hacker, but not for a student. Java is verbose for a reason - safety and reliability. Things enterprises value.

Students need to learn what is most pervasive in the field they plan to enter. That being Java. Starting them out on a "lite" version of a programming language simply because it is easier is just setting them up for failure.

I don't agree with the Java hate (why not teach kids to use Java? it's rather condescending if you think they can't learn it), but I will say: having learned to program on my own, I found it both easy and rewarding (lots of immediate, rapid growth and feedback) learning with Python for a few weeks before getting into Java. For some people, and maybe kids are NOT this group (but the group exists), the initial syntax barrier for the complete novice is much more intimidating in Java than it is in Python (or Ruby). I mean, arguably even C has an easier-to-grok-for-the-total-noob 'Hello, World!' than Java...

[insert examples of runnable 'Hello, World!' and 'Hello, <name>!' programs in Python v Ruby v Java here]

Thus, anyone who learns a first language other than Java is setting himself up for failure?

My first language was Basic on an Atari 800. My second was C++. I've made a respectable career from programming since then, in both serious and "lite" languages alike, including Java. I seem to have avoided these dire consequences. :-)

List<String> pets = Arrays.asList("cat", "dot, "bird");

Bad usage does not equal bad language.