Live data from Hacker News

Don't Make Students Use Eclipse

nora.codes

231–240 of 255 posts

Re: Don't Make Students Use Eclipse

#231

Earlier quoted context omitted.

You are right about first time programmers. But should people come to university without any prior programming knowledge? If someone applying for an architecture degree or engineering degree is required to have basic drawing skills and basic math knowledge, why we shouldn't assume the same for CS?

Because computer science isn't about programming? That's exactly why a simple and elegant language should be chosen, one that allows to express the concepts that are taught. Java is such a horrible choice that it's laughable that it enjoyed this success at universities.

Yes, a simple language is better to teach CS. CS is not just about programming, but I think CS is about programming too and having a reasonable level of programming is useful.

If I was a teacher and I'm going to teach someone what a linked list is, or what a binary tree is, I can of course use natural language and drawing, I can use abstract algebraic concepts.

But the student should be also able to construct said structures and observe how they work. The same for any other concept.

Re: Don't Make Students Use Eclipse

#232

Earlier quoted context omitted.

Thats a different argument, and a much stronger one. "Universities should offer a class on comparative programming languages and language tooling." is much different than "Intro-to-programming classes should not have a strongly-recommended IDE"

I actually think that would mostly confuse a lot of new undergrads. Fundamentals first, variety later (but it's definitely important!)

I agree. The intro class should use whatever IDE & config will most enable them to teach the fundamentals.

Understanding the details of packages and javac and other things should be left for a later class which can put them in the context of other languages.

Re: Don't Make Students Use Eclipse

#233

Earlier quoted context omitted.

Because computer science isn't about programming? That's exactly why a simple and elegant language should be chosen, one that allows to express the concepts that are taught. Java is such a horrible choice that it's laughable that it enjoyed this success at universities.

Yes, a simple language is better to teach CS. CS is not just about programming, but I think CS is about programming too and having a reasonable level of programming is useful. If I was a teacher and I'm going to teach someone what a linked list is, or what a binary tree is, I can of course use natural language and drawing, I can use abstract algebraic concepts. But the student should be also able to construct said st…

Yes, and that's why a simple language is always preferrable to Java. It doesn't matter if a student has previous exposure to programming languages if this language can be taught in about two or three weeks worth of class.

Re: Don't Make Students Use Eclipse

#234

Earlier quoted context omitted.

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 eit…

I don't think either of your points has anything to do with type erasure, and everything to do with allowing generics to take value types. This was an easy decision in Java, since it doesn't (yet?) allow user-defined value types. But C# has had `struct` since the beginning.

C# creates one instance of a generic for all reference types. The general consideration in instantiating multiple versions is object size. All reference types are the same size, so not a concern. Value types, however, range wildly in size and so generally get their own specialized versions during code generation.

The same choice effects the ability to wildcard. C# probably could implement wildcards over reference types, but it would feel inconsistent without value types. And, honestly, a good portion of wildcarding in my experience is to handwave away the compiler when you know what you're doing without reified types. Simply not an issue in C# -- its stronger guarantees around generic types means I can make that same code generic over the type I'm wildcarding in Java.

Re: Don't Make Students Use Eclipse

#235

Earlier quoted context omitted.

Not to mention those classes would make good programmer candidates start hate programming. I can't imagine why people start teaching teens from C and Java and make them think programming is boring and annoying. Absolutely worse than not taking the class.

What is boring and annoying in C? The only thing simpler than C is Basic.

What do you ask teens to accomplish with C? And all the memory management and pointers? The worst way to enter programming. It needs to be taught with what is meant to be fun by doing it.

Re: Don't Make Students Use Eclipse

#236

Earlier quoted context omitted.

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 eit…

I don't think either of your points has anything to do with type erasure, and everything to do with allowing generics to take value types. This was an easy decision in Java, since it doesn't (yet?) allow user-defined value types. But C# has had `struct` since the beginning. C# creates one instance of a generic for all reference types. The general consideration in instantiating multiple versions is object size. All re…

Code generation is definitely important to talk about, but that really wasn't the focus of my first example. Even if Foo and Bar were both reference types, the same reasoning would apply.

In C#, you can do:

    class MyClass : IList, IList { ... }
In Java, you can't do:

    class MyClass implements List, List { ... }
I know this is commonly viewed as an annoying restriction, but, IMO, it's rather an indication that you're writing code that doesn't respect the contract of the generic interface. For example, what should the `Count` property return if you're implementing IList twice? (C# wiggles around this with explicit interface implementations, but I think it's fair to argue that that's not a strictly superior approach to Java's).

Re: Don't Make Students Use Eclipse

#237

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…

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.

I used to feel that way a few years ago, but my opinion has shifted over time. C# has its own issues with verbosity and bloat. For example, although I appreciate the readability increase from overloaded comparison operators, it's a lot of boilerplate to write a class that implements IEquatable and IComparable and overloads all of the related operators.

Re: Don't Make Students Use Eclipse

#238

Earlier quoted context omitted.

Python is perfect for learning programming logic. Wouldn't have wanted it any other way.

Nope, it's only slightly better than java. Lisps and MLs are objectively better when it comes to teaching Cs materials.

Nope.

Re: Don't Make Students Use Eclipse

#239

Earlier quoted context omitted.

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…

For a good "what's programming really is" class mobile app development and some web dev would be great. First a mobile hello world. Kotlin preferably. Then they can whip up a very basic backend (it just spews out rows from a DB), again in Kotlin. And then they can slap an admin UI on top in HTML.

And then over the next few years it would be great to dissect this. CPU, ALU, ASM, raw memory, network basics, IP (BGP ~ distance vector routing), TCP, buffers, syscalls. RDBMS, MVCC, B-trees, merge sort, heap sort, and so on.

Oh well, one can dream. But usually students are just bombarded with completely disconnected courses.

Re: Don't Make Students Use Eclipse

#240

Earlier quoted context omitted.

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

In the context of higher education it is OK.

I was thinking of higher education. I think it's far more useful to teach algorithm design first and the nitty gritty of computer implementation later. This is, after all, how the field actually evolved. We had algorithms and programs far before we had the first computer.
Post reply on HN