Live data from Hacker News

Don't Make Students Use Eclipse

nora.codes

201–210 of 255 posts

Re: Don't Make Students Use Eclipse

#201

Earlier quoted context omitted.

Java is great for exactly that reason. It gives students an introduction to compilation, runtimes, stacks and heaps etc. Perhaps you had a poor learning experience due to who/what was teaching you rather than Java? My second comp sci course in college (first if you count high school AP credits), taught me all of this, and prepared me for the "full details" of MIPS and C.

The point is, it's a terrible first language because it's impossible to actually understand what's going on even in a basic "hello world" program until halfway through the semester. So inevitably you have to start them off by saying "here's a bunch of noise that you don't understand, but that's OK, just copy and paste it" which is a terrible habit to reinforce. You need to understand * access modifiers (public/privat…

Actually, the hello world doesn't seem that bad to me. And I program mostly in Python nowadays.

    class Test {
        public static void main(String[] args) {
            System.out.println("Hello world");
        }
    }
And then

    javac Test.java
    java Test
The class acts as a kind of namespace here, you don't need to go into OOP concepts for hello world at all. The beginner will have to understand

* Class is in file with the same name ¯\_(ツ)_/¯ and contains functions (maybe it'll help me later in organizing code?).

* Command line arguments (not strictly necessary concept but not too problematic either)

* Types - why is there String[] in the definition? (A must have in a statically typed language anyway)

* void - the function doesn't return anything (OK)

* public (not OK, some magic here)

* static (not OK, some magic here)

* Compilation vs. run step (a must have in a compiled language)

So IMHO there are just two concepts that could be thrown away. Or three, if you accessed CLI args from a library. But the meaning of public and static will come naturally when the students will learn about OOP.

Re: Don't Make Students Use Eclipse

#202

Earlier quoted context omitted.

Actually I agree for the Java world here. Thanks to the design of Java and many Java libraries you cannot write a little more complex Java code from your mind. Even importing all this nested OOP libraries is complicated without an IDE. For me Java is really a language which is impossible or too time consuming to master without a good IDE. Working for many years in the python world professionally some people are still…

Java is special since the whole compile/link/run loop is relatively slow and there's no REPL. In Nodejs or python you are expected to just run your code. Any error like a bad import/require statement you can correct quickly and re-run. Maybe even add/remove print statements while at it. And it's not just dynamic languages! You can have the same experience in Haskell.

There is a REPL as of JDK 9: https://en.wikipedia.org/wiki/JShell

Re: Don't Make Students Use Eclipse

#203

I think a better alternative would be "Don't Make Students Use Java", I seriously can't think of a worse language for training beginner/intermediate programmers, I certainly wish my schooling experience consisted of something else. From day one you're introduced to magic on top of magic: "Open up and click 'new project' and name it 'MyProj' and now click on the file in the side menu that says 'MyProj' and inside `pub…

A lot of hate for Java in this thread. Just want to try to counterbalance it with some things that I, personally, like about Java. 1. Java enums 2. Java's generics, especially covariance/contravariance with wildcards (erasure really isn't as bad as people make it out to be) 3. Java's standard collections library 4. Java's method override rules (lets you extend return types on derived classes) 5. Default interface met…

When you are teaching programming from first principles...

- portability is not a high priority.

- garbage collection is not a high priority.

Those are 2 reasons why you don't want to start with Java. You can teach it later, sure. But it's not a good start.

Re: Don't Make Students Use Eclipse

#204

I think a better alternative would be "Don't Make Students Use Java", I seriously can't think of a worse language for training beginner/intermediate programmers, I certainly wish my schooling experience consisted of something else. From day one you're introduced to magic on top of magic: "Open up and click 'new project' and name it 'MyProj' and now click on the file in the side menu that says 'MyProj' and inside `pub…

When I become a student in 1998 we used C and C++ for CS courses. C is simple enough of a language and low level enough to understand what your code does when running on the hardware.

Fast forward to 2 years ago, I did MsC at the same University and most courses were done using Java. I guess that's due to the long arm of Sillicon Valley.

Although Java was used for teaching material, the teachers allowed assignments in your language of your choice if the problem permitted. I did most of the assignments in C#. One I did in Java because I needed a powerful search tool and C# version of Apache Lucene was old. Other people used Java for assignments, one guy was using Python.

I have nothing against Java or using Java for teaching. I think it's better to use Java than Python since it has strong typing, enables parallel computing and it's faster being a compiled language.

However, I dread Java and I avoid it as much as I can. It feels verbose, boilerplate code is too much, it lacks some features. C# feels a lot cleaner. Even if it does have many libraries and enables you to target anything and do all kind of programming, it lacks the massive ecosystem of Java.

If someone would force me to choose between C++ and Java, I'd happily choose C++ if the task permits (i.e. I won't use C++ for web). And that says a lot since I am not very fond of solving the kind of bugs C++ almost guarantees you will have if the code is large enough. I'd rather solve C++ bugs than deal with the boilerplate and bloat and verbosity of Java.

That being said, I don't blame Java or people who designed Java and Java libraries. Allmost all old systems have their share of problems and Java is kind of old now.

Never programming languages and their ecosystems are solving some of Java's problems but if they will still exist in 20 years, we'll see they will bring their own baggage of problems.

I guess a perfect programming language is like an unicorn: we strive to catch it even if we know it doesn't exist.

What matters to me most these days is productivity, the speed something decent can be brought to market. By decent I mean something somewhat testable, somehow easy to understand in the future, somehow extendable and somehow maintainable.

There will always going to be trade-offs, making the right trade-offs based on the particular problem and resources is an art.

Re: Don't Make Students Use Eclipse

#205
post #164

Earlier quoted context omitted.

My main complaint about Java as a pedagogical language is that it's just so big, with so many complexities around semantics, compilation, runtimes, etc. So my fear is you end up spending as much time learning Java as you do learning how to build software. I wouldn't choose C# or C++, either. My sense, from working with others who came out of CS programs that relied on Java, is that they end up only really knowing how…

Pass by reference / pass by value is so syntactically batshit insane in Java that it shouldn't even be considered as an intro language option. And before someone points out that, actually-technically, Java is always pass by value, I will pre-retort that reference-as-value isn't an argument we should ever be having about an intro programming language. Either teach a systems language with unambiguous pointers, or teach…

The only problem here is using the term "reference" for reference variables. If you would say "these are pointers to objects, but you can't actually do any pointer arithmetic", this would be a non-issue. The pass by value is not the problem here.

Re: Don't Make Students Use Eclipse

#206

I think a better alternative would be "Don't Make Students Use Java", I seriously can't think of a worse language for training beginner/intermediate programmers, I certainly wish my schooling experience consisted of something else. From day one you're introduced to magic on top of magic: "Open up and click 'new project' and name it 'MyProj' and now click on the file in the side menu that says 'MyProj' and inside `pub…

A lot of hate for Java in this thread. Just want to try to counterbalance it with some things that I, personally, like about Java. 1. Java enums 2. Java's generics, especially covariance/contravariance with wildcards (erasure really isn't as bad as people make it out to be) 3. Java's standard collections library 4. Java's method override rules (lets you extend return types on derived classes) 5. Default interface met…

I still feel like C# is a better Java. It has most of Java features, has other features, implemented important features before Java and it doesn't reach Java level of verbosity and bloatness.

Re: Don't Make Students Use Eclipse

#207

Earlier quoted context omitted.

Java is great for exactly that reason. It gives students an introduction to compilation, runtimes, stacks and heaps etc. Perhaps you had a poor learning experience due to who/what was teaching you rather than Java? My second comp sci course in college (first if you count high school AP credits), taught me all of this, and prepared me for the "full details" of MIPS and C.

My main complaint about Java as a pedagogical language is that it's just so big, with so many complexities around semantics, compilation, runtimes, etc. So my fear is you end up spending as much time learning Java as you do learning how to build software. I wouldn't choose C# or C++, either. My sense, from working with others who came out of CS programs that relied on Java, is that they end up only really knowing how…

C# while isn't as bloated as Java isn't a good choice because, like Java forces OOP on you and doesn't allow free functions.

C++ is ok. Students can use a very simple subset of C++, they don't have to use the more advanced parts of it.

C is even better.

Go is fine, too.

Typescript is a good enough choice.

Re: Don't Make Students Use Eclipse

#209
post #164

Earlier quoted context omitted.

Pass by reference / pass by value is so syntactically batshit insane in Java that it shouldn't even be considered as an intro language option. And before someone points out that, actually-technically, Java is always pass by value, I will pre-retort that reference-as-value isn't an argument we should ever be having about an intro programming language. Either teach a systems language with unambiguous pointers, or teach…

The only problem here is using the term "reference" for reference variables. If you would say "these are pointers to objects, but you can't actually do any pointer arithmetic", this would be a non-issue. The pass by value is not the problem here.

C and Pascal and even C++ have a very simple model. An address of a variable is a pointer. You can actually understand how memory is layed out on hardware and why you would want to pass references or pointers instead of copying very large data structures.

Re: Don't Make Students Use Eclipse

#210

Earlier quoted context omitted.

A lot of hate for Java in this thread. Just want to try to counterbalance it with some things that I, personally, like about Java. 1. Java enums 2. Java's generics, especially covariance/contravariance with wildcards (erasure really isn't as bad as people make it out to be) 3. Java's standard collections library 4. Java's method override rules (lets you extend return types on derived classes) 5. Default interface met…

When you are teaching programming from first principles... - portability is not a high priority. - garbage collection is not a high priority. Those are 2 reasons why you don't want to start with Java. You can teach it later, sure. But it's not a good start.

> garbage collection is not a high priority

Here I disagree. I would not start teaching programming in a manual memory language (though that is how I started) because memory corruption is really hard to deal with and completely inconsequential to the basics of programming.

I do think it's important that every programmer should know how to work with raw memory and pointers, but it is a good subject for an intermediate class, after you have the basics of what you are supposed to do while programming.

Post reply on HN