Nice to see that Java works pretty well for indie games these days -it's a more pleasant language & ecosystem to work with than C++, and you don't need to deal with Unity's bullshit. Slay The Spire and Mindustry were written in it.
I heard Slay the Spire was also ported to Nintendo Switch. Any idea how they did it?
The decline and fall of Java on the desktop
321–330 of 362 posts
Re: The decline and fall of Java on the desktop
#322Earlier quoted context omitted.
As discussed in the article, it's slow and has compatability/portability issues. And I don't really want to play the log4j card, but...
Other than startup times, modern Java is not slow at all. In fact, it's way faster than many other popular languages today such as Python and Ruby.
Maybe we should teach them both a compiled language and a language like Python to show them that each one has its place and specific uses.
Re: The decline and fall of Java on the desktop
#323Earlier quoted context omitted.
> you can streamline the process a lot by just starting with a template and let students fill in the gaps. So you don't necessarily make them spend time on "public static final void main", but setup a project in which students can type code, build and see results. By all means, if you think you can come up with a way to teach Java to children that's fun and efficient be my guest. We've been trying for decades and hav…
Java has a shell by default since forever now. You can start it by issuing jshell of any semi-modern JDK. Also, are you sure matlab is a good language for learning? I only have experience with learning this language not teaching but to me it was a giant oddball compared to many many languages I have learnt.
Yes, I'm aware of Jshell. Jshell is what you get when you take a static strongly typed compiled language and you give it an interactive shell. It's not exactly coherent, and still doesn't solve the most salient issues. Using JShell is better than an IDE IMO, but if we're going that direction then why are we still using Java? There are far better interactive languages out there.
> to me it was a giant oddball
It is an oddball language, because most languages are written by developers for developers to do the things developers do. Matlab was written for scientists to do science, and because scientists are not developers, Matlab is designed in a way that is more friendly to them. Sure, learning Matlab is not going to help you in a job interview at an OOP shop, if only just because the interviewers there have an opinion about Matlab being an oddball language (although I've managed to get an interviewer to call in his colleagues to see my one liner Matlab solution to a whiteboard coding question, "We've certainly never gotten that answer before" they said). But the things that make it odd to professional programmers make it more understandable to children, I have found. 1 indexing is the best example. People here will complain about it endlessly, but children will consider it obvious and won't think twice about indexing an array with 1 as the first element.
Here's the difference.
Matlab: To access the first element, do x(1).
Student: okay.
And then we move on to the next topic or the activity at hand. All other languages: To access the first element, do x[0].
Student: Wait, why? Why is the first thing 0? What can't the first thing be 1? That makes no sense whatsoever.
And then we spend the next amount of time talking about indexing, not doing fun things like the activity at hand. The difference between 1 indexing and 0 indexing is trivial in the grand scheme of things. But it's and example of something where just a slight change is the difference between understanding and confusion.> Also, are you sure matlab is a good language for learning?
I am not sure, that's why I'm doing research on it. But the reason I'm doing research here is because I saw a dramatic result from an experiment, and I want to pull on that thread. The experiment was teaching robotics to middle school students (11-13) using C++ and Matlab. Both groups with little to no computing experience. One was taught C++ in the context of making a robot do a task. The other was taught Matlab. The Matlab group finished the task with ample time to spare, while the C++ had barely gotten past the C++ preliminaries and needed extra time to finish the task. There's got to be something here, it's not like we were trying to make Matlab win. We thought maybe it would have a slight edge but it was just a blowout.
Re: The decline and fall of Java on the desktop
#324IMO the real decline was Oracle. Java used to be a slowly rising language and set of platforms with benevolent oversight from SUN and at least the outlook that it was one of a few things you might want to add after Microsoft's Windows or Apple's OS (Macintosh or later OSX). Then Oracle bought SUN and everyone knew all of the good would eventually be strangled out by the lawyers and models that sought to dominate and…
Oracle certainly wasn't good for Java. But Java-on-the-desktop had been struggling for years before that. You either bundled a complete JVM with your application (fine if you're making a 500MB IDE, not so good for anything smaller) or you had the embarrassment of directing your users to an installer that bundled the Ask toolbar. They might even end up with the security-hole-riddled java browser plugin. And even once…
But the bundling of Ask toolbar came about in 2013, so that was definitely Oracles doing.
Re: The decline and fall of Java on the desktop
#325Successfully using JavaFX (or OpenJFX as it is now called) in a mission-critical cross-platform app with 50k+ installs. It’s not that bad really. Package size and RAM usage is a bit of an issue, as we bundle it with a jlink’ed (stripped down to what is needed, thanks to Java 9 modules) JDK. Other options like Electron or native Windows/macOS wrappers around a shared core written in C++ were discussed but ultimately d…
What's your product - if you don't mind sharing?
Re: The decline and fall of Java on the desktop
#326Earlier quoted context omitted.
Java pass by reference vs pass by value vs C pass by reference vs pass by value?
Both languages are strictly pass by value. Java pretty much uses pointers (references in name only) and primitives only, and both languages copies these all by value. For actual reference you have to go to c++.
Said as someone who took intro computer science at 2 universities across 3 courses (C/C++, Python, Java), due engineering to art to computer science major switching.
I understand why Java did what they did, from a performance standpoint, but that's a poor highest value to hold for education use.
And in retrospect, was batshit user-hostile. F.ex. with a few more keywords and rules, C# smoothed off so many rough edges.
Re: The decline and fall of Java on the desktop
#327Earlier quoted context omitted.
Java has a shell by default since forever now. You can start it by issuing jshell of any semi-modern JDK. Also, are you sure matlab is a good language for learning? I only have experience with learning this language not teaching but to me it was a giant oddball compared to many many languages I have learnt.
> Java has a shell by default since forever now. You can start it by issuing jshell of any semi-modern JDK. Yes, I'm aware of Jshell. Jshell is what you get when you take a static strongly typed compiled language and you give it an interactive shell. It's not exactly coherent, and still doesn't solve the most salient issues. Using JShell is better than an IDE IMO, but if we're going that direction then why are we sti…
Re: The decline and fall of Java on the desktop
#328The only Java desktop app I use regularly is Bitwig, a DAW for music production. At least the UI is written in Java and it's fantastic.
If you want to learn more about its background story, https://dawbench.libsyn.com/episode-10-daw-evolution-iii-bit...
Re: The decline and fall of Java on the desktop
#329Earlier quoted context omitted.
I think Electron is neither here nor there. It is the "stroad" of software distribution: the sluggishness and poor performance of a web interface, coupled with the difficulty to upgrade of a desktop package. Personally I push for either native apps or web apps, to regain at least one of the benefits lost by packaging web apps.
> coupled with the difficulty to upgrade of a desktop package Huh? Two Electron apps that I use are Github Desktop and VSC. Neither is sluggish and both have streamlined automatic updates.
Sure, from the user's perspective. But from the provider's perspective, there is a lot of infrastructure needed to reliably and automatically update on various platforms.
Compiling files per-platform, hosting them securely, checking checksums, binary self-replacement, settings migration for many possible settings...
Compare with deploying the server code, migration only for one data set (the one on the server), and then hitting refresh in a web browser.
Re: The decline and fall of Java on the desktop
#330Earlier quoted context omitted.
For just a lesson of writing code to achieve a specific functionality, you can streamline the process a lot by just starting with a template and let students fill in the gaps. So you don't necessarily make them spend time on "public static final void main", but setup a project in which students can type code, build and see results. To teach them to write robotics code, you can create a Robot class for them to play wi…
> you can streamline the process a lot by just starting with a template and let students fill in the gaps. So you don't necessarily make them spend time on "public static final void main", but setup a project in which students can type code, build and see results. By all means, if you think you can come up with a way to teach Java to children that's fun and efficient be my guest. We've been trying for decades and hav…
Admittedly both of these contexts correlate to more maturity and stronger motivation in the students, especially when CS wasn't so hot.
It's still hard for me to believe there's no way one can make a novice productive with templated Java compared to blank-slate Matlab. It's easy to get people off the ground with dynamic typing, I agree. But novices easily drown in the complexity they create, if they're ever allowed to go far without discipline, at which point it's also harder to grade and help them debug when things go wrong.
Templated exercises also provide more structure and predictability, and allow teachers to do more with the same amount of resources. That said, it wasn't necessarily my intention to advocate for using Java for pedagogy (I'd prefer something that's less verbose and has more novice-friendly I/O and GUI libraries), so I'll stop here.