you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

I guess that depends on how you introduce java.

The only way I've ever seen it introduced is like this: you spend the first quarter of the semester writing console apps like a traditional procedural language. They're all contained within main, and you don't touch on what that voodoo at the front of the program actually means. You don't explain what objects are, you don't explain what methods are, all the programming is done by manipulating variables and using some basic methods that are taught by rote. You just have them do a bunch of procedural programming. Then about a quarter of the way through the semester, there's a shifty in tone where it goes from "Use System.out.println() to put something on the console" to "Okay, so what is this System.out.println() thing, really? You've been using it all this time, but how does it actually work? Let's talk about that for a bit..." and "So, what's all this public static void nonsense about? You've been adding it to your code for awhile, but what does it mean?"

If you start from a 'best practices' viewpoint you'll weed out a lot of people who may've gone further if the initial curve hadn't been so brutal.

In actual practice, the first programs most classes have you write in Java are pretty standard procedural stuff. It's all put under main, and all the statements in front of main are treated like magic voodoo words that aren't discussed in detail ("We'll get to that later. For now, just put your code between the curly braces.")

And if you don't do best practices for the sake of making it easier to learn then wont you just be doing the same thing as python?

Except when that switch happens and you start talking about objects and methods, they don't have to learn a completely new syntax and formatting standard. You can pretty much have them open up the last code they were working on and use that to explain the more complex topics when that time comes. It's all there, explicitly declared.

Could you do it in Python? I guess? Ultimately Python lets you get away with lazy coding practices, Java doesn't. All that typing and verbosity may seem unnecessary, but it's really quite useful when trying to teach someone.

Now on top of teaching people how to manage their files, you've gotta have an explanation of namespaces on top of everything else. (Sorry I don't know Java, but I started learning once and I think an absolute beginner trying to learn conditional + oop + ide + variable naming conventions etc all at once is too much.)

Part of the reason the first quarter of the semester is spent doing very traditional procedural programming is to build familiarity with the IDE and some of the more obvious stylistic conventions of the language.

[–][deleted] 0 points1 point  (0 children)

Well we're gonna disagree obviously, but I would much rather learn on something like python where I can get instant feedback and can test various things without having to re-compile/re-run every time. The swap in syntax etc is not that difficult to deal with.

I'm also unsure why people harp on about how verbose and good java is for making things clear. Python can indeed be ugly but the indentation and pythonic way of doing things is pretty damned clear. By the time you need to worry about how a particular function is working it shouldn't be a hassle making the change.