6 ms·
That's not the fault of the language, though I'd say maybe Kotlin is a considerably better choice nowadays. If by blockly you mean the visual interface, what yo
by dchftcs 5y ago
That's not the fault of the language, though I'd say maybe Kotlin is a considerably better choice nowadays. If by blockly you mean the visual interface, what you said is going to be true for any language. If by blockly you mean javascript, maybe, but honestly if it's an exercise to build foundations (and not just for personal gratification), javascript (or python) isn't much easier for kids than Java, because it has more footguns. And if there's any fault in the language chosen for AP computer science, the blame should go to the designer of the curriculum.
- ModernMech 5y ago> And if there's any fault in the language chosen for AP computer science, the blame should go to the designer of the curriculum. Java was recommended for AP CS 22 years ago. At this point I lay less fault at their feet and I'm more interested in why it's still there at long last. > If by blockly you mean the visual interface, what you said is going to be true for any language. My research isn't published yet but I've found this is not necessarily true. This is a product of taking a thing not built for kids but rather professional programmers, and then forcing kids to use it. The problem with Java is that it's the kind of system where you need to know everything about it to use it all. Going from 0 to "hello world" requires over a dozen distinct Java concepts explained. public class MyFirstJavaProgram { public static void main(String []args) { System.out.println("Hello World"); } } We've got access modifiers, classes, scopes, lifetimes, variable types, void variables, methods and in particular the main method, String types, arrays of strings, input arguments to main method, the System class, output streams, function calls, string literals, and to top it all off a good old fashioned statement terminator as the cherry on top of that feature sundae. The great irony is that the AP Computer Science Ad Hoc Committee call this behemoth "simple". That's lesson one, and all it gets you is "Hello World". Most instructors handle this as "Ignore all the things you're writing down, we'll talk about them over the course of the next 3 months." Because that's how long it really takes. This leaves students in a perpetual state of confusion, where they feel like they never really understand what's going on. Everything is a mysterious incantation and nothing really makes sense. Do wrong thing and it tells you it's wrong, but you won't understand why. Students spend a lot of time memorizing "static void pub main()"... or was it public void static main? Or static public void class? I dunno, let's consult the spellbook. Because on day one their instructor said "ignore all of that, it's too complicated for you." Well students do ignore all of that, and it teaches exactly the wrong lesson -- they don't learn Java or programming, they learn that programming is hard and not for them yet. It's beyond them, but they're going to do it, and maybe one day they will understand, but not today. Today just write the code and run it. At this point, most students give up. And I will say that yes, this is Java's fault. Not all programming languages require you to learn a dozen very deep and nuanced concepts to get to "Hello World". Here's the ideal Hello World program for students and honestly for me too: "Hello World" That's it. That's the ideal. You get that in languages like Matlab, and I've had great success teaching robotics using Matlab. With Matlab, students are writing real robot programs within a few hours, whereas with Java students are still raising their hand asking "Wait, so what's the difference between an object and a class? What's a method versus a function? What's static mean? What does void mean? What does []args mean?" It's my contention that the design of the Java language frequently turns away all but the most technically minded students at precisely the time when they are the most impressionable when it comes to their perceptions of computing, and we're all worse off for it.
- ethbr0 5y agoWell said! Java is the exact opposite of sane defaults: the programmer must explicitly choose defaults at every turn. Furthermore, it constantly feels like the arcane minutiae required in Java is Java-specific, in a way that other languages (C-based, functional) aren't. In Java, if I memorize an incantation, most of the information I've just learned is Java-specific. In C or C++, it's more computing specific. Other languages will use different syntax, but I will be doing the same thing. But I guess that's one of the weaknesses of reimplementing a computer in the JVM, and then writing a high-performance language to target that abstracted machine.
- pjmlp 5y ago> Java is the exact opposite of sane defaults That honour belongs to C derived languages.
- kergonath 5y ago> In C or C++, it's more computing specific. Other languages will use different syntax, but I will be doing the same thing. I think you’ve just internalised C-isms. The core Java language is as close to conventional OOP as it gets, and the model is not that different from most OOP languages. It certainly isn’t alien. We ended up conflating C and computing, but it is more an accident of history and because so many languages borrowed so heavily from it.
- ethbr0 5y agoJava pass by reference vs pass by value vs C pass by reference vs pass by value?
- kaba0 5y agoBoth 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++.