Live data from Hacker News

Don't Make Students Use Eclipse

nora.codes

191–200 of 255 posts

Re: Don't Make Students Use Eclipse

#191

Earlier quoted context omitted.

I'm not the OP, but look up "type erasure" for one criticism.

Type erasure gets an unfairly bad rap. Yes, it makes reflection difficult sometimes. Yes, it doesn't play well with value types. But other than that, erasure is a very powerful concept.

My understanding is that the only value in type erasure is that it maintains compatibility with libraries compiled in ancient versions of Java. Are there language-level benefits to type erasure?

Re: Don't Make Students Use Eclipse

#192

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 methods (.Net has them too now, but Java was first)

6. @Functional interfaces. They may seem a bit funny at first, but they are very useful (especially when combined with default interface methods)

Re: Don't Make Students Use Eclipse

#193

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…

My undergrad was a while ago, but we also did assembly and prolog first. The lecturer basically said assembler was almost to shock us into seeing how preferably the magic was. I still don't understand why prolog.

I struggled with the Java, but got my teeth into it on my own time to the detriment of my marks in other modules. Eventually it clicked enough, I got a degree and walked into a career where my skills have been in demand for 15 years. I'm pretty happy with that, I'd go so far as to say Java was by far the best part of the course for me.

Re: Don't Make Students Use Eclipse

#194
post #41
post #16

I'm not sure I agree much with this. When I first started learning Java I had six or seven years of programming experience and I still found dealing with matters of classpath and javac remarkably complicated. I had things down well enough with the tools I used before, but it all seemed so foreign in the Java world. And to this day I find junior devs struggle with the same things unless they have a maven/gradle projec…

> And to this day I find junior devs struggle with the same things unless they have a maven/gradle project all set up for them. Personally I’m still shocked that learning the common build tools for whatever language is used for a CS course is not the standard. If you’re teaching Java you should be teaching Maven, if you’re teaching C++ you should be teaching CMake. Not to the “I can write my own plugins/macros level”…

> ...if you’re teaching C++ you should be teaching CMake.

I've been programming very advanced C++ for close to 20 years now.

Never had any reason to use CMake.

Plain old make for when you just want to build something without expending effort and brain cells, or (nowadays) nix if you're putting together an industrial-strength build environment.

CMake is the worst of all worlds, and provides no benefit unless you really want to build Windows exe's with Microsoft's proprietary tooling. (And let's face it, Windows is a legacy dying platform here in 2020.)

Re: Don't Make Students Use Eclipse

#195

Earlier quoted context omitted.

Type erasure gets an unfairly bad rap. Yes, it makes reflection difficult sometimes. Yes, it doesn't play well with value types. But other than that, erasure is a very powerful concept.

My understanding is that the only value in type erasure is that it maintains compatibility with libraries compiled in ancient versions of Java. Are there language-level benefits to type erasure?

Absolutely. Erasure lets you write code that's actually generic, instead of code that appears to be generic.

For example, in C# IList and IList are two different interfaces that happen to have similar methods. Whereas in Java, List and List are the same interface. This means you can do things like this in Java:

    List list = ...
    Object o = list.get(0);
To do something similar in C# is significantly more effort. You either have to duplicate all of your interfaces (IList + IList), use `dynamic`, or use reflection to compile delegates at runtime.

A common complaint is "but erasure lets you add an integer to a list of strings". But as long as you follow PECS[1] rules you can avoid most of those situations.

[1] Producer: extends. Consumer: super

Re: Don't Make Students Use Eclipse

#196
Maybe eclipse is too much IDE. Maybe a advanced editors like VS Code hit the sweet point. The tasks infrastructure there - as bad as it is - will force you to understand details. It also has a terminal.

I do not understand the Java bashing. Python is nice, but it is an interpreter, does not compile, link or create executables. It misses so much in the compilation chain that it is neither a good language in the regard of this post.

C++ has all, but well, editors are crappy and pointers for a first lesson student are hard.

Re: Don't Make Students Use Eclipse

#197

Earlier quoted context omitted.

Type erasure gets an unfairly bad rap. Yes, it makes reflection difficult sometimes. Yes, it doesn't play well with value types. But other than that, erasure is a very powerful concept.

My understanding is that the only value in type erasure is that it maintains compatibility with libraries compiled in ancient versions of Java. Are there language-level benefits to type erasure?

Yes, Scala could not map their generics concepts to .NET due to reified generics and their developers gave up on Scala.NET.

Re: Don't Make Students Use Eclipse

#198

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…

for very beginners, yes... Java is not the right programing language to teach. (I'd say Python is). But for intermediate/advanced classes I think Java is a must learn for every CS graduate. 1. While it is bloated, it has so many modern and not so modern concepts into it, that learning it makes you understand those concepts better. (eg: It is hard to understand Generics if your favorite language doesn't have them) 2.…

I'd like to stress on the second point. When I graduated at 2015, and have done multiple interviews with enterprises, Java or .NET were critical. Don't know if it's the same, but looking into job postings, I'd say it is.

It'd definitely different if you work for an IT company, but not always.

Re: Don't Make Students Use Eclipse

#199

Earlier quoted context omitted.

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…

> * access modifiers (public/private) I think you can omit the "public"s in the Java hello world (thereby making everything package protected, and sneakily sidestep the issue), but I don't want to ruin this machine by installing Java on it to make sure. To be super thorough, you would also have to understand: - semicolons (and the related issue of newlines being semantically equivalent to normal spaces) - naming conv…

I've just tried it and the main method indeed needs to be public.

Re: Don't Make Students Use Eclipse

#200

Earlier quoted context omitted.

CS50 looks quite like what you're describing. One learns: - C - Python (+ Flask) - JavaScript - SQL I think this was the order. They learn C the most.

That sounds wonderful! A real overview of the programming landscape, and definitely a good start assuming they follow my other points as well. I'd love to take that course.

You can do that on edx.org
Post reply on HN