4 ms·
I am pretty sure it was your tone.
by dcurtis 18y ago
I am pretty sure it was your tone.
- mynameishere 18y agoJava is a whipping boy, and I also have my problems with it, but one of its minor strengths is that it is clean enough for a teaching language (especially for total neophytes). Here is the much lambasted manner of outputting: System.out.println("Hello world"); ...in fact, this is well organized. "System" is a namespace. "out" is a static variable. "println" is a static function. "Hello world" is a String. These things all exist in an orderly world. A professor could explain a lot of key elements of language design with that one line. What's this: print("Hello world") ...it's shorthand for much the same. Easier? Yep. But it's glossing over a lot of details that students need to know. So when you come at it from a teaching angle, you're maybe making a mistake. Python/Ruby/LISP all have their WTFs that will throw off students, even if they're all better languages than Java.
- gnaritas 18y agoJava's a horrible language for teaching. If you think this... System.out.println("Hello world"); Is easier to understand than this... print("Hello world") Then you've forgotten what it's like to be a beginner. Java's not even a good example of what OO is, and it has way too much syntax and special keywords (something like 50) for teaching. Python is a far better language for teaching, Smalltalk would be even better because it's much simpler, has only a handful of keywords, and a much more consistent and simpler syntax. In any case, students should begins with a dynamic language where they don't have to think about manifest types that they aren't ready to understand anyway. It's also much faster working in a workspace or REPL where you have instant feedback and can experiment without messing around with compilers.
- pg 18y agoThen you've forgotten what it's like to be a beginner. Not just that, but what programming should be like. Hello-world shouldn't need more than two elements.
- gnaritas 18y agoI think some people just forget that the machine should be working for the human rather than vice versa.
- axod 18y agoI think judging a language by "Hello-world" is a mistake. Sure, some languages have a fixed overhead for creating a program. Some have needless syntax fluff that doesn't do all that much, but it's actually a good skill IMHO to be able to identify and see through that fluff to the core elements of the code. When we pick up a book do we judge it based on the index at the back and the preface and the publishing info at the start? We probably just ignore those bits. I think in these sorts of classes it'd actually be a good idea to spend several weeks looking at other peoples code and analyzing what it does. Being able to read code properly is a really important skill I think people should master before they even start with writing hello-world themselves.
- baha_man 18y ago"I think in these sorts of classes it'd actually be a good idea to spend several weeks looking at other peoples code and analyzing what it does." I think that would just result in a lot of students dropping out. As a beginner, it's nice to get the computer to actually do something - even if it's just printing out a stupid message.
- axod 18y ago"I think that would just result in a lot of students dropping out." Good. Perhaps there would be less mediocre/bad developers around.
- gnaritas 18y agoLike I said earlier, you've forgotten what it's like to be a beginner or you've not had much experience with teaching them. Beginners don't need to be able to see through fluff, they can't, the fluff needs to be gone entirely. They need to be taught with languages that have no fluff so they learn the basics of thinking logically, algorithmically. They aren't ready to deal with the complexities of dealing with a particular languages quirks and learning to please its compiler with voodoo incantations like int, char, string, long, etc. They aren't even ready to understand that there are differences between languages, so their first language needs to be one that teaches concepts that apply to all languages. They need to learn what functions are, what conditionals are, what loops are, what recursion is, in their simplest forms, and more than anything they need to see immediate success and running programs or they won't maintain interest long enough to get anywhere near the harder optional stuff like types and compiled languages. As soon as types come into play, you've advanced to an intermediate level, way over the head of beginners. Beginners and manifest/statically typed languages do not mix well. The closest a student should get to Java, is JavaScript, but they'd be much better off learning Python, Scheme, and Smalltalk before getting anywhere near any of C's bastard children.
- gnaritas 18y agoI should also point out that your Java example won't even compile, you need to wrap it in a class and a main function to even attempt to compile and run it. Tell me again how simple this is.. class World { public static void main(String args[]) { System.out.println("Hello World!"); } } compared to this... print("Hellow World!")
- gaius 18y agoNot to mention that you have to save it in a file called World.java and it will compile to World.class. If you change the contents of a file, the first line, you also have to change the name of the file. How does that make sense to a beginner?
- jrockway 18y agoHow does that make sense to anyone? I still think Java is just a cruel joke on the part of the authors. I don't think they really thought manifest typing was a good idea. I don't think they really thought that Java's OO system was any good. I think we will be seeing a paper soon that has a title like, "How bad could a programming language be before people stopped using it? A case study on Java."
- mynameishere 18y agoOkay. Here's my real opinion: If I was setting up a curricula, each incoming student would deal with a digital logic trainer. Okay? Wires and transistors. An 18 year old should learn the fundamentals and not the shortcuts. That's my opinion--maybe I'm wrong. Java is hardly the best teaching language, but it is closer to the bone than a lot of things....
- rglullis 18y agoThe problem is that you're confusing a concept with its implementation. If it is a basic programming class, there are a whole lot of concepts that should be learned before worrying about the implementation. Algorithms, variables, program flow, functions. Those are the real fundamentals... things that can even be analyzed in pseudo-code, no need to get into a particular language's idiosyncrasies.
- rms 18y ago>glossing over a lot of details that students need to know. If you're teaching them object oriented programming. Why would you be teaching beginners object oriented programming? I give the engineering programming classes at Pitt a fair amount of credit. Two semesters -- the first semester covers HTML as a reasonably useful introduction to the idea of structured text files, then Matlab to introduce if statements, loops, and functions in an environment with a friendly console. The second semester was C. Mostly everyone got it -- those that failed out of engineering didn't fail because of programming class. The classes were taught/conceived by a professor whose primary research interest is engineering education.
- marius 18y ago<pedant mode> java.lang.System is class, not a namespace (although classes in Java are overloaded to function as namespaces as well as modules and data type definitions). println() is not a static method, but an instance method of the java.io.PrintStream class. out is a static variable in the System class of type PrintStream which refers to an instance of that class, on which we invoke the method println(). </pedant mode> ...which is a lot to demand of a beginner to understand in his very first program. I'm self-taught myself, and for me, having a humanities background, C/assembly and Scheme was a perfect combination for understanding both how computers actually work and what computation is all about (to the extent that I understand either!). I think Java is a nice language in many ways, but I think its dominant position as a teaching language is due to market demand more than any inherent suitability for that role.
- ii 18y agoIn Python you can always do: import sys sys.stdout.write("Hello world!\n") if you really need this level of detail as a teacher.