Is Java is a bad language for beginners?

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Is Java is a bad language for beginners?

Postby EvanED » Tue Nov 22, 2011 1:48 pm UTC

I still don't get why we're putting "is used professionally" as more than an incidental benefit when discussing languages to learn.

User avatar
Yakk
Poster with most posts but no title.
Posts: 11115
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Is Java is a bad language for beginners?

Postby Yakk » Tue Nov 22, 2011 2:00 pm UTC

Some people want to be working as soon as possible after learning or mastering a language. Like most of the world's population, they might not be financially stable or supported by others. So it seems to be a reasonable thing to quantify.

Learning an esoteric language might give you long term skills, but it probably won't get you a job in a few months.

On top of that, many people are motivated by practicality, perceived or otherwise.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Is Java is a bad language for beginners?

Postby Steax » Tue Nov 22, 2011 2:16 pm UTC

Yakk wrote:On top of that, many people are motivated by practicality, perceived or otherwise.


I found this to be particularly true.

It's not uncommon for people to ask me about Java, and when I ask them about their choice, they respond with "well, all the universities and corporate systems use it, can't be wrong, right?"
In Minecraft, I use the username Rirez.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Is Java is a bad language for beginners?

Postby EvanED » Tue Nov 22, 2011 3:18 pm UTC

Yakk wrote:Some people want to be working as soon as possible after learning or mastering a language. Like most of the world's population, they might not be financially stable or supported by others. So it seems to be a reasonable thing to quantify.

Learning an esoteric language might give you long term skills, but it probably won't get you a job in a few months.

I can see it in that situation... but who is really on that short of a timeline? Most people learning it for their own edification aren't. Almost no one going through a CS intro sequence is. (I suppose there might be a couple.)

Steak wrote:It's not uncommon for people to ask me about Java, and when I ask them about their choice, they respond with "well, all the universities and corporate systems use it, can't be wrong, right?"

Not true of the "best" CS schools, though.

(I went through the US News & World Report top 10 or 20 a few months ago, and I think it came out roughly 50/50 between Java/C/C++ (almost all Java) and Python/Scheme/ML (mostly Python).)

User avatar
0x783czar
Posts: 13
Joined: Fri Sep 12, 2008 12:15 pm UTC

Re: Is Java is a bad language for beginners?

Postby 0x783czar » Wed Nov 23, 2011 11:10 pm UTC

OK, I'll dive in too, (why not).

Java is a great language for beginning Object-Oriented Programming. However I would not say it is the best for starting out in general. I also don't feel that BASIC is the best beginners language (although I started out on QBASIC, myself and still feel fond of it). I think that MIT has it right by teaching Python first. Python may not be the perfect all-purpose language, but it teaches basic concepts while constraining the programmer to use good programming style. After Python I would graduate the coder to Java to learn good OOP concepts, then migrate them over to C++ to introduce them to a true compiled language with OOP capabilities, as well as introduce more advanced OOP concepts, and have them learn how to implement a wide array of GUI libraries. From that point on, I'd consider them fully fledged programmers and they can begin their life-long quest to refine their skills.

Also, teaching them Python, C++, & Java will have taught them three majorly marketable programming languages and introduced them to the concepts of Scripting, as well as given them a well-rounded knowledge of the C-Paradigm.

After that they can discover the joy of Objective-C programming! :P

(However, of course, they're going to be Web-Programmers, then they should be taught Java-Script in conjunction with HTML, followed by PHP and beyond.)

User avatar
Meteorswarm
Posts: 979
Joined: Sun Dec 27, 2009 12:28 am UTC
Location: Ithaca, NY

Re: Is Java is a bad language for beginners?

Postby Meteorswarm » Fri Nov 25, 2011 4:22 am UTC

0x783czar wrote:OK, I'll dive in too, (why not).

Java is a great language for beginning Object-Oriented Programming. However I would not say it is the best for starting out in general. I also don't feel that BASIC is the best beginners language (although I started out on QBASIC, myself and still feel fond of it). I think that MIT has it right by teaching Python first. Python may not be the perfect all-purpose language, but it teaches basic concepts while constraining the programmer to use good programming style. After Python I would graduate the coder to Java to learn good OOP concepts, then migrate them over to C++ to introduce them to a true compiled language with OOP capabilities, as well as introduce more advanced OOP concepts, and have them learn how to implement a wide array of GUI libraries. From that point on, I'd consider them fully fledged programmers and they can begin their life-long quest to refine their skills.

Also, teaching them Python, C++, & Java will have taught them three majorly marketable programming languages and introduced them to the concepts of Scripting, as well as given them a well-rounded knowledge of the C-Paradigm.

After that they can discover the joy of Objective-C programming! :P

(However, of course, they're going to be Web-Programmers, then they should be taught Java-Script in conjunction with HTML, followed by PHP and beyond.)


Truly, spoken like someone who's never used a lambda in their life.

I still fail to see the usefulness of placing object-orientedness on such a pedastel. Sure, it has advantages in architecting large intricate systems where you need certain kinds of modularity. Why on earth push it on beginners, who, universally, aren't writing such programs?

RE practicality, I think it's important to keep in mind the goals of your introductory course. If you want to produce someone capable of working as a low-grade code writer in industry ASAP, then perhaps you want to start off with a language they'll use. But in a university setting, where you've got 3-4 years between your class and graduation, there's no need to. Presumably, your CS program will expose them to enough languages by the end of it that the original language's particulars will be irrelevant, so you should pick something that will get them started on the best foot, and not necessarily something with the most usefulness down the road.
The same as the old Meteorswarm, now with fewer posts!

lalop
Posts: 210
Joined: Mon May 23, 2011 5:29 pm UTC

Re: Is Java is a bad language for beginners?

Postby lalop » Fri Nov 25, 2011 12:10 pm UTC

I've been thinking "where does clojure fall into this?" which may be bit of a rushed question since clojure is still in development, but it seems to me clojure has the capacity to become the most popular lisp (JVM compatibility + libraries make all the difference in the world). The issue however, is that it seems to be a pain in the ass to learn, what with all the Java details. But, given that a lisp is something that schools should teach, clojure seems to be something you shouldn't miss out on.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Is Java is a bad language for beginners?

Postby EvanED » Fri Nov 25, 2011 1:22 pm UTC

lalop wrote:I've been thinking "where does clojure fall into this?" which may be bit of a rushed question since clojure is still in development, but it seems to me clojure has the capacity to become the most popular lisp (JVM compatibility + libraries make all the difference in the world). The issue however, is that it seems to be a pain in the ass to learn, what with all the Java details. But, given that a lisp is something that schools should teach, clojure seems to be something you shouldn't miss out on.

Clojure has a ton of good stuff going for it; it's already easily my favorite Lisp as a whole.

To be fair however, JVM compatibility isn't completely new; SISC is an implementation of Scheme that runs on the JVM and has coherent integration with Java. (It's not quite as nice as Clojure -- e.g. there are still separate Scheme types and Java types in SISC.)

However, I'm not sure what you mean by it's obnoxious to learn with all the Java details; I mean, if you're talking about teaching a language in a class, you don't have to do that at all, at least for quite a while. You can treat it as just a Lisp from a pedagogical perspective. This is especially true in a class setting, where the instructor can write wrappers if there is a Java library they want to bring into the class. If anything, I'd say that the biggest impediment to learning is that for some reason I find using the Clojure documentation to be about as easy as trying to take out a bad guy at 100 meters with a staple gun after spinning around in circles. (I just got done watching maybe 30 minutes of Zero Punctuation... I think I might be channeling a little Yahtzee in that comparison.)

Servant-of_Christ
Posts: 15
Joined: Wed Mar 14, 2012 10:55 pm UTC

Re: Is Java is a bad language for beginners?

Postby Servant-of_Christ » Fri Apr 13, 2012 10:12 pm UTC

Our high school offers Java as it's only language, in AP comp. sci. I will be taking it next year. so far my expierience with coding is:
a little HTML (the old HTML, not really a programming language, but it's where I started)
some BASIC(I think) for batch files in windows
my TI-92
Am i prepared for java?

User avatar
Yakk
Poster with most posts but no title.
Posts: 11115
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Is Java is a bad language for beginners?

Postby Yakk » Sat Apr 14, 2012 2:40 am UTC

Asking if you are ready for Java is like asking if you are ready to read a book. I do not know what is in the book - It could be see Dick run' or it could be War and peace - and I do not know what material you will be taught in Java.

But probably yes. An intro course is an intro course. You might fail but little in your level of prep will allow us to determine if you will grok programming or not.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Meem1029
Posts: 379
Joined: Wed Jul 21, 2010 1:11 am UTC

Re: Is Java is a bad language for beginners?

Postby Meem1029 » Sat Apr 14, 2012 3:48 am UTC

An intro to programming class should focus on teaching you programming using Java as a tool, not teaching you Java. This is also true for the AP test. I have a friend who took the AP CS test and now a year later is still taking the class he could have tested out of since he says he doesn't know Java and never really learned it for the test.
cjmcjmcjmcjm wrote:If it can't be done in an 80x24 terminal, it's not worth doing

freeTheInfo
Posts: 4
Joined: Fri May 04, 2012 2:26 pm UTC

Re: Is Java is a bad language for beginners?

Postby freeTheInfo » Fri May 04, 2012 3:28 pm UTC

I took an intro CS class in Java at college, and I hated every minute of it.

For one thing, we were forced into using Eclipse.
This meant that it was a monumental effort to debug even the simplest of errors, and that it took a good minute to get going on a project.
Our assignments typically gave us source code which pulled all the data and stuff out of files, because all of the TA's time would have been consumed with dealing with errors popping up from that otherwise.

And you are required to use an enormous amount of unnecessary class abstractions to do anything useful.

But I still managed to get 95's on all the Exams, so there is that.

I also learned Python at the same time for work, doing Django dev work at the Chemistry department. There was a night and day difference. I see no reason why we didn't teach in Python. The only result of teaching in Java was to ensure inexperienced but hopeful kids who wanted to learn CS decided on another major, and kids who already knew programming got annoyed.

User avatar
cjmcjmcjmcjm
Posts: 1158
Joined: Tue Jan 05, 2010 5:15 am UTC
Location: Anywhere the internet is strong

Re: Is Java is a bad language for beginners?

Postby cjmcjmcjmcjm » Sat May 05, 2012 8:58 pm UTC

freeTheInfo wrote:I took an intro CS class in Java at college, and I hated every minute of it.

For one thing, we were forced into using Eclipse.
This meant that it was a monumental effort to debug even the simplest of errors, and that it took a good minute to get going on a project.
Our assignments typically gave us source code which pulled all the data and stuff out of files, because all of the TA's time would have been consumed with dealing with errors popping up from that otherwise.

And you are required to use an enormous amount of unnecessary class abstractions to do anything useful.

But I still managed to get 95's on all the Exams, so there is that.

I also learned Python at the same time for work, doing Django dev work at the Chemistry department. There was a night and day difference. I see no reason why we didn't teach in Python. The only result of teaching in Java was to ensure inexperienced but hopeful kids who wanted to learn CS decided on another major, and kids who already knew programming got annoyed.

I do understand the part about giving pre-written file loading code. It's not like people actually sanitize their files in real life.
frezik wrote:Anti-photons move at the speed of dark

DemonDeluxe wrote:Paying to have laws written that allow you to do what you want, is a lot cheaper than paying off the judge every time you want to get away with something shady.

Derek
Posts: 2180
Joined: Wed Aug 18, 2010 4:15 am UTC

Re: Is Java is a bad language for beginners?

Postby Derek » Tue May 08, 2012 2:32 pm UTC

freeTheInfo wrote:For one thing, we were forced into using Eclipse.
This meant that it was a monumental effort to debug even the simplest of errors,

How so? My experience with Eclipse is limited, but from what I've seen the debugger is pretty good. Certainly much better than just using jdb. What do you suggest as a better debugger?

User avatar
sam_i_am
Posts: 624
Joined: Mon Jun 18, 2012 3:38 pm UTC
Location: Urbana, Illinois, USA

Re: Is Java is a bad language for beginners?

Postby sam_i_am » Thu Jul 19, 2012 1:30 am UTC

When I was taking java in class, we used emacs(and i personally started using gedit instead), and compiled with the command line. By the time I graduated however, that same class was using Eclipse.

Pingouin7
Posts: 91
Joined: Thu Oct 27, 2011 4:50 pm UTC
Location: ~/

Re: Is Java is a bad language for beginners?

Postby Pingouin7 » Tue Sep 25, 2012 4:45 pm UTC

My progression went:

C
C#

Used Dev-C++ for C and command-line compiling with csc for C# before moving on to Visual Studio.
Dason wrote:
Kewangji wrote:I confess I am actually scared of peanuts, and tend to avoid them, given how lethal they are to some people.

I'm not. I do my part in the fight against peanuts by destroying them with my powerful teeth. Take that peanut! How does being digested feel!?

tkbx
Posts: 0
Joined: Wed Sep 26, 2012 12:22 am UTC

Re: Is Java is a bad language for beginners?

Postby tkbx » Wed Sep 26, 2012 12:24 am UTC

Java is a bad language altogether. Were it not so cross-compatible, whitespace and brainfuck would be better.

Trasvi
Posts: 310
Joined: Thu Feb 17, 2011 12:11 pm UTC

Re: Is Java is a bad language for beginners?

Postby Trasvi » Sun Sep 30, 2012 7:52 am UTC

tkbx wrote:Java is a bad language altogether. Were it not so cross-compatible, whitespace and brainfuck would be better.


Some mighty strong feelings there. Care to explain?

User avatar
WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Is Java is a bad language for beginners?

Postby WarDaft » Wed Sep 04, 2013 6:34 am UTC

Trasvi wrote:Some mighty strong feelings there. Care to explain?

I think can understand the sentiment if not actually agree with it. Java gets a lot of stuff wrong. (My opinion can probably be summed up as 'design patterns, while removing code smells, are themselves a LANGUAGE smell')


Learn Haskell first. Almost* no exceptions. Once you get to the point where you really enjoy it but can't find a library to do what you want, then you are ready for other languages. Haskell is one of the approximately two 'academic' languages. Using it in the real world is not easy. But very, very, few concessions are made in the language itself. Things like pointers, the stack, OO, memory management, etc, are just one more odd convention once you have a sufficient understanding of CS. I think I'd rather actually say something like Scheme over Haskell, but Scheme lets you cheat far too easily.


*If you already have some kind of math degree, you should probably go with something even more pure.


A common saying in this thread is 'down to the metal' as a good thing ... this is one of the WORST reasons to learn a language. The constraints set by execution on physical hardware are just that... a set of constraints. One of many sets of constraints you will encounter as a programmer. Learning this set first offers you... what? You're better at solving this problem, but why promote it over every other problem you will ever have to solve? As a programmer, you are a problem solver. Problem solving techniques should be the first thing you learn.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

lalop
Posts: 210
Joined: Mon May 23, 2011 5:29 pm UTC

Re: Is Java is a bad language for beginners?

Postby lalop » Wed Sep 04, 2013 8:54 am UTC

What's more pure than Haskell?

How would you respond to the assertion that languages that are too abstract are also bad for beginners, since having to learn too much abstraction beforehand is itself difficult? Indeed, I think one could argue that Haskell has many "odd conventions" that may be even more difficult to understand than pointers, the stack, etc.

User avatar
Jplus
Posts: 1721
Joined: Wed Apr 21, 2010 12:29 pm UTC
Location: Netherlands

Re: Is Java is a bad language for beginners?

Postby Jplus » Wed Sep 04, 2013 11:22 am UTC

Re WarDaft (also somewhat in line with lalop's post above):

Object-oriented design patterns in themselves are insightful and potentially useful. When a language forces them upon you however it's not so great anymore. Unless they are the fibers of everything the language is made of, like in Smalltalk. Ultimately all languages are built on design principles, though not necessarily OO design principles. The clearer the design principles are and the more consistently they are applied, the better the language is suited for its intended purposes. This is what made Lisp, Forth, C, Smalltalk and ML (among others) so influential.

Haskell has a very firm and clear set of design principles and applies them very, very consistently. These design principles make it an excellent language for mathematical problem solving. These same design principles make it rubbish for dealing with the real world, where things have mutable state and operations can have side effects. I like to say that Haskell has an explicit preference for the Platonic world over the Aristotelian world. C++ is Haskell's twin with exactly the opposite preference. Ocaml is in between though of course in most other respects it's more like Haskell.

I agree that "close to the metal" (which in itself is mostly an illusion) is not a good reason to prefer one language over another for beginners. As in, I don't think that messing around with (potentially dangling or zero) pointers is particularly helpful. "Close to the real world" however is definitely an advantage. It is helpful for most beginners if they can easily play around with the kind of things that a computer, which is ultimately a machine in the real world, can do: this includes printing or drawing things on a screen, processing user input, modifying collections of data in-place, working with files and perhaps a little bit of networking. Haskell is not great for any of these things.

Because of this I think Haskell is only suitable for a small subset of beginners, i.e. those that are primarily interested in mathematical problem solving and not much else. And by "mathematical problem solving" I mean more than just number crunching, iteration and branching. Nearly all programming languages offer convenient ways to do those.

By the way, you (WarDaft) seem to conflate mathematical problem solving and computer science, but it's not the same. Computer science, as the name implies, is about what can be computed and how; depending on your interests the real world can be highly relevant for CS, while it's never relevant for mathematical problem solving. Besides, people who want to learn to program, even those mostly interested in mathematical problem solving, don't necessarily want to learn CS -- in fact I believe in most cases they don't.

To stay on topic, I think it's hard to directly compare Java with Haskell in terms of suitability for beginners. Haskell is very elegant for the Platonic bits and a kludge of the Aristotelian bits. Java is a kludge for everything, but on average arguably slightly less so for the Aristotelian bits than Haskell. Overall I think neither is really appropriate for most beginners.

If the purpose is just to get a feel of what programming is like ("programming preschool" so to speak) the language must be easy to relate to as a human being. As far as I know Logo is the ultimate choice for that purpose. Just tell the turtle where to go. Smalltalk is a next best, objects "chat" with each other but these objects are a bit abstract. On the other hand Smalltalk remains fairly useful if you want to do something other than drawing figures on the screen.

The next step (which might be the first since preschool is optional) is a language that lets you play around with as little resistance as possible. Python is really the obvious choice here because it has very low verbosity levels, is consistent and straightforward, has good tutorials available, is backed by a large community and comes with batteries included. It also helps to develop good indentation habits. Ruby, Scala and Ocaml might be nearly as good. Javascript (with HTML and CSS) is nice for those mostly interested in websites and Lua for those mostly interested in application scripting.

On this however I agree with WarDaft: after the first language you deepen your understanding by learning more languages. The more diverse the better.


Reading back through my own posts in this thread it's funny to see how my opinion has evolved. In my first post I advocated learning either C++ or Python over Java. Later I said that Python is better for self-training than C++ because it is easier, but I thought C++ and other complicated languages were fine for teaching in class. Now I believe easier is always better, whether the beginner is guided by a teacher or not.
"There are only two hard problems in computer science: cache coherence, naming things, and off-by-one errors." (Phil Karlton and Leon Bambrick)

coding and xkcd combined

(Julian/Julian's)

User avatar
WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Is Java is a bad language for beginners?

Postby WarDaft » Wed Sep 04, 2013 10:28 pm UTC

What's more pure than Haskell?
Things like Agda or Coq. I'm not sure if Prolog is as well, depends if it has anything comparable to unsafePerformIO.

By the way, you (WarDaft) seem to conflate mathematical problem solving and computer science, but it's not the same. Computer science, as the name implies, is about what can be computed and how; depending on your interests the real world can be highly relevant for CS, while it's never relevant for mathematical problem solving. Besides, people who want to learn to program, even those mostly interested in mathematical problem solving, don't necessarily want to learn CS -- in fact I believe in most cases they don't.


I don't see how they differ particularly. You have a much larger amount of information problem specification typically, and a much broader selection of things that constitute a solution, but you're still problem solving.

And as far as doing nitty-gritty IO/GUI/etc stuff in Haskell, well, not really much to argue there, it.. needs improvement. It's naturally the hardest kind of thing to make sure it's right, so really, I'd say it's the kind of thing you shouldn't learn first, because you'll probably get it sort-of right and not notice for quite a while, and then you've got bad habits. That's why I say Haskell first then move on when you hit it's limits (if the limits haven't moved by that time, who knows)

How would you respond to the assertion that languages that are too abstract are also bad for beginners, since having to learn too much abstraction beforehand is itself difficult? Indeed, I think one could argue that Haskell has many "odd conventions" that may be even more difficult to understand than pointers, the stack, etc.
They can be, depending on the abstraction. I mean, they can be made almost arbitrarily difficult to learn. I'm not sure a language that's challenging to learn is strictly a bad thing though, so long as you can feel like you're making tangible progress and can do new things as you learn.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

User avatar
cjmcjmcjmcjm
Posts: 1158
Joined: Tue Jan 05, 2010 5:15 am UTC
Location: Anywhere the internet is strong

Re: Is Java is a bad language for beginners?

Postby cjmcjmcjmcjm » Thu Sep 05, 2013 1:02 am UTC

Jplus wrote:Reading back through my own posts in this thread it's funny to see how my opinion has evolved. In my first post I advocated learning either C++ or Python over Java. Later I said that Python is better for self-training than C++ because it is easier, but I thought C++ and other complicated languages were fine for teaching in class. Now I believe easier is always better, whether the beginner is guided by a teacher or not.

Interesting observation. My girlfriend too some intro CS class that was required for her major for some reason that was Python-based and had to drop it. I actually think all 10 students in that class eventually dropped—I know when she dropped (near the deadline) the prof almost didn't let her drop because she had the highest grade in the class (I tidied up her code, so her homework was head and shoulders above the other students). However, they three tests that were supposed to be 50% of her grade were reduced to two and she failed the first one and the other was pushed back past the drop date and she couldn't figure out the tests. Now, she's going to take some C++ or Java class that a friend will have taken the previous semester so she can study his notes.
frezik wrote:Anti-photons move at the speed of dark

DemonDeluxe wrote:Paying to have laws written that allow you to do what you want, is a lot cheaper than paying off the judge every time you want to get away with something shady.

User avatar
Jplus
Posts: 1721
Joined: Wed Apr 21, 2010 12:29 pm UTC
Location: Netherlands

Re: Is Java is a bad language for beginners?

Postby Jplus » Thu Sep 05, 2013 6:04 am UTC

Well of course, good language choice doesn't automatically make the class any good. And a very good class might compensate for a poor language choice. But I believe the very good class would be even better with an easier language, and the bad class would be even worse with a more complicated language.

@WarDaft: Haskell's "monad wall" is what allows the language to be so purely functional, it's there by design and to be honest I think they could have done much worse. But I don't think real world stuff will ever become less of a kludge. And you can't tell a beginner "here's how to do problem solving, exercise this for a while and then we'll cover how to do I/O".

As for CS, it's science which is really more than just problem solving. As a matter of fact you can't do CS by just programming, like any other science (ask any CS student and they'll confirm programming is only a small part of it). Problem solving is something you can learn and do in Haskell, science isn't. And being interested in programming, or problem solving, doesn't entail being interested in complexity analysis, finite state automatons, the Chomsky hierarchy, information theory or even the Curry-Howard correspondence.
"There are only two hard problems in computer science: cache coherence, naming things, and off-by-one errors." (Phil Karlton and Leon Bambrick)

coding and xkcd combined

(Julian/Julian's)

Story
Posts: 78
Joined: Wed Aug 26, 2009 9:03 pm UTC

Re: Is Java is a bad language for beginners?

Postby Story » Sat Sep 28, 2013 2:06 am UTC

Personally, I see Java as a largely obsolete language with numerous design flaws, surrounded by an ecosystem that encourages poor programming practices.

Jiffy
Posts: 15
Joined: Mon Sep 23, 2013 9:30 am UTC

Re: Is Java is a bad language for beginners?

Postby Jiffy » Tue Jan 14, 2014 11:01 am UTC

Confession: Do you really need a class to print "Hello World"? Never knew that.

Below is my programming career/history:
1. Actionscript (Adobe/Macromedia Flash)
2. C (in Anjuata)
3. Unityscript (Unity, duh?...)
4. Back to C
5. Java/xml (Android Programming)

Personally, I've despised programs that use a GUI to write your code for you. In Flash, at least the only un-coded things are animations and drawings. But when I got into GTK+ with Anjuta, I didn't even try Glade. When I arrived at Android, I didn't use the built-in layout editor. I try to do everything in code. However, due to my incapability of writing code in an environment without someone to continously tell you about your coding errors as you write (I'm terrible, I know), I stuck to IDEs. I'm early into Android, so I'm still not very sure on how Java works. As I've worked with structs in C and dealt with the similar hierarchy stuff in Flash and Unity (I admmittedly didn't really understand what was going on at that time), I was off building my classes and writing my first program in Java within days.

I don't know about Java, but I feel like Actionscript is a good way to get started - except that Flash costs money. It's extremely satisfying to search at a tutorial and write your first three lines of code and see your square move across the screen (it's actually more simple than printing "Hello World"), and then the 14 lines of code following shortly after to allow you to navigate the same square with the arrow keys. It's hard to be actually GOOD at it, but to be suitably proficient and getting a good programming base is easy and simple.

Side note:
I feel like Google is like a god. If you've used Android Studio, the new IDE for android programming, you'll find that it has multiple features that aid programming, ranging from variable renaming, "safe" file deletion that removes all related references and shortcut-key instant adding of required library imports to spellchecks that tell you if there's an English typo in your variable naming and detailed "more info" buttons that tell you specifically what is wrong with the line of code, the reasons it is wrong and how to make it not wrong. Truly amazing.

gamerfan
Posts: 1
Joined: Sun Jan 19, 2014 8:58 pm UTC

Re: Is Java is a bad language for beginners?

Postby gamerfan » Sun Jan 19, 2014 9:31 pm UTC

No, it's pretty good, I think. My dad has said it's a good starting language, and my friend learned Java in middle school as his first language.

johnie104
Posts: 248
Joined: Tue Jan 08, 2008 6:44 pm UTC
Contact:

Re: Is Java is a bad language for beginners?

Postby johnie104 » Sat Jan 25, 2014 9:04 pm UTC

I personally believe the first programming class should be given in a language that allows people to do 'impressive' stuf as soon as possible. Once you've learned to program in that language and see what the possibilities are with programming, you can do a more formal introduction to more abstract concepts or more bare-bones languages.
The best choice for such a language would be Python IMO, as it comes with batteries-included, and source code can almost read like english if you do it correctly.
Alternatively you could teach a language that makes it very easy to do graphical stuff, like javascript, actionstript or something like GML from Gamemaker, but apart from javascript these are proprietary.
Signature removed because of it's blinding awesomeness.

User avatar
Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: Is Java is a bad language for beginners?

Postby Dason » Sun Jan 26, 2014 1:55 am UTC

gamerfan wrote:No, it's pretty good, I think. My dad has said it's a good starting language, and my friend learned Java in middle school as his first language.


That's an impressive argument you put together. Nobody is denying that you *can* learn java first - the question is if it's a good idea for it to be the first language for beginners.
double epsilon = -.0000001;

User avatar
SpringLoaded12
Posts: 350
Joined: Wed Oct 08, 2008 1:58 am UTC
Location: Guarding the Super Missile
Contact:

Re: Is Java is a bad language for beginners?

Postby SpringLoaded12 » Sat Mar 01, 2014 11:48 am UTC

As someone whose first language was Java, and who studied alongside many students whose first language was Java: No, it is not.

Note in this story that I live and study in New England. I first learned Java (I hesitate to even call it "learned," and I'm about to explain why) in high school. Our CS program underwent many changes each year, to the extent that it was surprising to see the same teacher two years in a row. We learned from an introductory Java textbook. Most students were able to grasp the early material at an adequate level with no more difficulty than was posed by most other subjects. But at a certain point in the curriculum, each class hit a brick wall in their learning, and even the students with the strongest grip on the material struggled a lot. The next year, again due to the CS program constantly changing and some very poor management, the same curriculum would be restarted. This happened 3 times. While it led me to learn nothing, it did let me find the point where the material went over everyone's heads each year: it was when the textbook first introduced the use of classes and objects. One would think that topic would be covered before students were even asked to write their first Java code, and it wasn't until freshman year of college that I discovered what had happened.
The textbooks we had been using in high school were not actually Java textbooks, they were C textbooks that had been cheaply repurposed as introductory Java textbooks. Apparently it amounted to no more than replacing the coding examples with their Java equivalents. As a result, everyone in my high school class had been taught to write procedural programs in an object-oriented language, which is one of the most wasteful and counterproductive things you can do. This led to a fundamental misunderstanding of how object-oriented languages work, which is why every student was unable to absorb the material that actually pertained to object-oriented programming. I had to forget all I had learned about Java in order to properly take the university OO programming course, after learning functional programming in an introductory course.
Discussing with one of the TAs in the OO course, I found out that his high school experience had been the same.
It is apparently remarkably common for high schools to teach procedural programming style in Java, and it is an extraordinary waste of time. They would be much better off learning a procedural or functional language, or maybe a scripting language.
"It's easy to forget what a sin is in the middle of a battlefield." "Opposite over hypotenuse, dipshit."

User avatar
Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: Is Java is a bad language for beginners?

Postby Dason » Sat Mar 01, 2014 8:49 pm UTC

I'm failing to see how your "I was taught Java improperly" story lends evidence towards "Java isn't a bad language for beginners".
double epsilon = -.0000001;

User avatar
cjmcjmcjmcjm
Posts: 1158
Joined: Tue Jan 05, 2010 5:15 am UTC
Location: Anywhere the internet is strong

Re: Is Java is a bad language for beginners?

Postby cjmcjmcjmcjm » Mon Mar 03, 2014 6:23 am UTC

Dason wrote:I'm failing to see how your "I was taught Java improperly" story lends evidence towards "Java isn't a bad language for beginners".

To be fair, this thread is filled with anecdotes, and the plural of anecdote is not data.
frezik wrote:Anti-photons move at the speed of dark

DemonDeluxe wrote:Paying to have laws written that allow you to do what you want, is a lot cheaper than paying off the judge every time you want to get away with something shady.

User avatar
Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: Is Java is a bad language for beginners?

Postby Dason » Mon Mar 03, 2014 7:53 pm UTC

cjmcjmcjmcjm wrote:
Dason wrote:I'm failing to see how your "I was taught Java improperly" story lends evidence towards "Java isn't a bad language for beginners".

To be fair, this thread is filled with anecdotes, and the plural of anecdote is not data.

That's fine - I just don't really see how their anecdote supports their position.
double epsilon = -.0000001;

User avatar
chasesan
Posts: 6
Joined: Thu Oct 13, 2011 3:53 pm UTC
Location: Walking the orbits of electrons.

Re: Is Java is a bad language for beginners?

Postby chasesan » Tue Jun 03, 2014 10:53 am UTC

I am pretty much 100% self taught so my progression was a little strange...

BASIC
C
Bash
Javascript
Visual Basic
C++
PHP
Java
Lua
Fortran (T_T)
Z80 ASM
ARM9 ASM
C#
Perl (Never again)
Scala
Java Bytecode
AMD64 ASM
Python (a.k.a. BASIC 2.0)
Go

User avatar
Yakk
Poster with most posts but no title.
Posts: 11115
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Is Java is a bad language for beginners?

Postby Yakk » Tue Jun 03, 2014 2:56 pm UTC

There are many stumbling blocks along the way to becoming a competent programmer, and in some languages you can somewhat avoid them and still produce useful code.

Simple Statements
Functions and Flow Control (ifs)
Recursion and Looping
Indirection (pointers and references) and resource management
Abstraction (objects, ADTs, type erasure)
Concurrency (locks, threads, lock-free, distributed computation, etc)
Metaprogramming (writing code that writes code for you, from parsers to template tomfoolery)

The above is roughly (very roughly) the order in which a C curriculum will introduce each concept. The fact that people "fell down" at one of the above steps is not evidence that they where taught "Java wrong" or that "Java is a poor language": people have been trying to learn how to teach programming for almost a century, and we still suck at it.

Many modern languages seek to make one or more of the above problems easier, often by hiding details, such as automatic garbage collection of memory allocations. In an ideal world, this lets people who have not mastered that problem solve problems that would otherwise require that mastery and has no other ill effects.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 6 guests