Is Java is a bad language for beginners?

Please compose all posts in Emacs.

Moderators: phlip, Prelates, Moderators General

Re: Why Java is a bad language for beginners

Postby OOPMan » Mon Dec 14, 2009 6:50 am UTC

0xBADFEED wrote:
BlueNight wrote:2. Conceptual overhead. It's the only language that will run on this "ideal machine" emulator.

I'm not sure what you mean. There are tons of languages that will run on the JVM.


Indeed, let us count the names:

  • Java
  • Scala
  • Groovy
  • Ruby
  • Python (Jaskell)
  • Haskell (Jaskell)
  • Clojure
  • PHP (Quercus and Project Zero)
  • JavaScript (Rhino)
  • Common LISP (ABCL)
  • And More...

Java's greatest weakness if the Java language
Java's greatest strength is the Java Virtual Machine

:-)
Image

Image
User avatar
OOPMan
 
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: Is Java is a bad language for beginners?

Postby qbg » Tue Dec 15, 2009 7:21 pm UTC

If a beginner starts with Java, they should move on before their mine is poisoned by design patterns.
qbg
 
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Is Java is a bad language for beginners?

Postby sigtau » Sat Dec 19, 2009 6:23 pm UTC

Java is good if you're willing to take a quick tutorial and then RTFM.

But most starting programmers don't want to, they want code examples they can copypasta and claim as their own...
sigtau
 
Posts: 0
Joined: Sat Dec 19, 2009 6:20 pm UTC

Re: Is Java is a bad language for beginners?

Postby 0xBADFEED » Sat Dec 19, 2009 6:50 pm UTC

qbg wrote:If a beginner starts with Java, they should move on before their mine is poisoned by design patterns.

I don't think there's anything inherently wrong with design patterns. In fact, knowing design patterns, understanding the problems they solve, and understanding why some of them are unnecessary in other languages gives you a better understanding of both language design and programming in general. Also, being able to easily recognize them and understand "where someone was coming from" with some design makes it a lot easier to read code out there in the wild.

Once you see them and then move on to another language you can think "Oh, OK so this language feature is solving problem X". I think there are some merits to starting with a safe, restrictive language like Java. I think most of the down-sides that come with Java as a beginner's language stem not so much from the language itself, but the ecosystem it lives in.
0xBADFEED
 
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Is Java is a bad language for beginners?

Postby Berengal » Sat Dec 19, 2009 8:40 pm UTC

Design patterns aren't themselves terrible. However, they're symptoms of lack of abstraction posibilities when they occur. There are also some problems with the patterns themselves; they're usually not compositional, they represent a large amount of boilerplate (breaking DRY) and they're monolithic and therefore hard to modify if their environment changes sufficiently.

The worst thing about design patterns as they're practiced today is how they cloud the mind. To quote Chrisopher Alexander, the invertor of the pattern language, "The elements of this language are entities called patterns. Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice."
That last part there spells death for compositional thinking. What it's basically saying is that you're going to write the same code over and over with only minor modifications. When you're using design patterns you're not solving a problem; you're solving a solved problem that you've probably solved a hundred times before already. This is also known as tedium.

Design Patterns aren't far from the Right Thing though; the only problem is design patterns are a human thing, but we want our computers to perform the repetetive task of "using a solution a million times over", not us. The Right Thing can also be called patterns, because they are, but unlike design patterns they're not fuzzy. To modify Alexander's quote a bit: "Each pattern describes a problem that occurs over and over again in our environment, and then describes the solution to that problem, in such a way that you can use this solution a million times over, without ever modifying it once." If you think about it, this is the same as solving a problem once and then never encountering it again.

Macros do this. Referential transparancy does this. First-class functions do this. Orthogonal feature sets do this. People are already using this, and have been for a long time. Not all languages have good enough support for these things, making people implement it themselves. This is what Greenspun had observed when he coined his tenth rule.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.
User avatar
Berengal
Superabacus Mystic of the First Rank
 
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway

Re: Is Java is a bad language for beginners?

Postby 0xBADFEED » Tue Dec 22, 2009 4:02 pm UTC

Berengal wrote:The worst thing about design patterns as they're practiced today is how they cloud the mind.

There's nothing about design patterns that cloud the mind. If anything they clarify many instances of problems that come up in OO languages that, previously, had been very wishy-washy vague ideas.

It's just that the people pushing them had only really used one language paradigm. I don't mean the GOF here. I'm talking more the rank-and-file Java/whatever developers. For them, design patterns were helpful. They are useful in Java and, to a lesser extent, in languages like C++. Their minds aren't clouded, they just don't know any better (or don't have any choice). Once you look around at other languages you start to see the morphisms between the traditional design patterns and language features. And that other languages have their own patterns.

The problem is that there are a bunch of one-language (Java being the big offender here) programmers. This isn't the fault of design patterns. It's just how it is. But it's getting better.
0xBADFEED
 
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Is Java is a bad language for beginners?

Postby rrwoods » Tue Dec 22, 2009 11:23 pm UTC

This is honestly the first time I've heard patterns being talked about in a negative light. I'd like to think I'm not a one-trick pony; Java is my favorite language for sure but I am capable in at least 6-7 others. Patterns have been useful for me almost everywhere. Not the same patterns, mind you, since language features can make patterns either impossible or unnecessary.

I do think Java is a terrible beginning language though. It's not fun* or easy -- honestly, no matter what a language can teach you, someone isn't going to make an effort if they aren't having fun with it.

* for a beginner. There's a reason it's my favorite language, of course.
26/M/taken/US
age/gender/interest/country

Belial wrote:The sex card is tournament legal. And I am tapping it for, like, six mana.
User avatar
rrwoods
 
Posts: 1507
Joined: Mon Sep 24, 2007 5:57 pm UTC
Location: US

Re: Is Java is a bad language for beginners?

Postby Indefinity » Thu Dec 24, 2009 9:37 pm UTC

I used to use Java exclusively, until I was turned onto dynamic languages that just *make sense* logically. Most people are not programmers from birth, so in order to have programming appeal to them, you need to relate it to the real world, and show how they're in fact very similar, except with the computer interpreting it instead of your brain. While I believe it's important to show them how the computer is in fact involved, you shouldn't start people out with that part or their eyes will glaze over like a Thanksgiving ham. I hate people that think that this is a way of "weeding out the weak". Those people are arrogant are the reason that Revenge of the Nerds stereotypes are common among programmers.


Certain things appear as artificial barriers to programming. For instance, declaring the type of a variable when you define it:
Code: Select all
String variable = "Joe";

Why must "variable" be a String? "variable" is simply a a name I'm giving to the string "Joe", but in real life, names don't really have any meaning outside of what they're actually naming. For instance, the term "my pet" can easily refer to any animal I might own, or even a rock, if I'm off my rocker. The astute OO programmer would then say, "But that means that the type of "my pet" would then be Ownable or some other abstract class like that." While true, most people don't think this way without some training first.

The overhead required to do just simple "Hey! Neat!" things in Java is also quite substantial. System.out.println() has gotta be the most annoying programming line ever. There's no reason there can't be a way to alias this function easily to something like "print()" like most other languages have. In Javascript, I could do something like:
Code: Select all
print = System.out.println;

And voila, I have an (global) alias to my print function. But alas, Java does not treat functions as objects, thus not allowing me to do much at all without going into nasty reflection.

And that brings me to another problem with Java as a beginning language: its number of inconsistencies that can't be explained without going into nitty gritty details. Why can't I treat functions like any other object? Why is String capitalized and not int or double? Why can't I use int inside of generics? (Similary, why can't I use generics when declaring new arrays?)

The final straw for me is dealing with checked exceptions all the time. Rarely do I ever see the need for beginner programmers to handle exceptions gracefully. There are a lot of times when I am writing a more complex program and even I don't care about handling exceptions. In fact, many frameworks (including Spring and Hibernate, if I remember correctly) are getting to the point where they just throw subclasses of RuntimeException so the user doesn't have to use try/catch blocks unless they want to.

I could go on for another hour as to why Java is poorly designed for beginners (and a lot of experts... going back to Java hashtables after dynamic-language hashtables is like trying to itch your nose with a fishhook), but I'll spare you.


As for design patterns... they don't really apply just to Java... it's just that they're talked about more in Java than in most other languages currently. Java EE aims currently to fit a niche market ("Enterprise Applications") which is basically just a big design pattern to control access to a database. Rails is based on the same idea.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby achan1058 » Sun Jan 31, 2010 5:10 am UTC

I would say beginners should learn C++ if they are using console I/O, and Java if they using graphics. Java's graphics packages are just so much easier to use. You code can possibly fit in 1 page if you are doing something simple. That isn't going to happen with C/C++.

As for why C++ instead of C? cin/cout. Finally, if all you are going to do is to talk about algorithms, but never actually coding them, (ex. a mathematician) pseudo code is the best choice.
achan1058
 
Posts: 1791
Joined: Sun Nov 30, 2008 9:50 pm UTC

Re: Is Java is a bad language for beginners?

Postby Indefinity » Sun Jan 31, 2010 5:25 am UTC

achan1058 wrote:Java's graphics packages are just so much easier to use. You code can possibly fit in 1 page if you are doing something simple.

You are probably the only person ever to say that. Granted, you're comparing to C++, but Java graphics are notoriously complex. HTML+JavaScript is a nice, MUCH easier to use method for doing graphics. And for console IO, I'd recommend Python. (I'd also recommend Python for graphics, but I don't have any personal experience with that.)
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby achan1058 » Sun Jan 31, 2010 5:36 am UTC

Indefinity wrote:
achan1058 wrote:Java's graphics packages are just so much easier to use. You code can possibly fit in 1 page if you are doing something simple.

You are probably the only person ever to say that. Granted, you're comparing to C++, but Java graphics are notoriously complex. HTML+JavaScript is a nice, MUCH easier to use method for doing graphics.
Ah, I forgot JavaScript. It's definitely easier by a very large margin, though it does encourage some bad habits.
achan1058
 
Posts: 1791
Joined: Sun Nov 30, 2008 9:50 pm UTC

Re: Is Java is a bad language for beginners?

Postby suicidal pencil » Fri Feb 05, 2010 9:20 pm UTC

Possibly, one of the better languages to begin your programming adventures with would be Perl. It does much for the new user, so that they can focus on building fun little scripts, instead of worrying about the language. Although, it can be a bit of a bitch with 'use strict'...
User avatar
suicidal pencil
 
Posts: 2
Joined: Fri Feb 05, 2010 8:28 pm UTC
Location: Canada, bitches!

Re: Is Java is a bad language for beginners?

Postby Indefinity » Fri Feb 05, 2010 9:36 pm UTC

suicidal pencil wrote:Possibly, one of the better languages to begin your programming adventures with would be Perl. It does much for the new user, so that they can focus on building fun little scripts, instead of worrying about the language. Although, it can be a bit of a bitch with 'use strict'...

Noooo! Don't teach them a hack language. Learn Python if you want something that can churn out something quick. The only good part about Perl is that it's got a billion libraries to do almost anything with. A beginner should be focused on libraries, but of the core ideas. And besides, Python has just as many useful libraries to someone new at programming, if they find the need to learn them. Perl, in my opinion, is best for sys-admins who need to do some more complicated scripting than a shell script would provide. Other than that, it should not be used for most things.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby headprogrammingczar » Fri Feb 05, 2010 10:52 pm UTC

Do not teach someone Perl as a first language, ever. It doesn't even have a standard grammar:
Wikipedia wrote:No written specification or standard for the Perl language exists for Perl versions through Perl 5, and there are no plans to create one for the current version of Perl. There has been only one implementation of the interpreter, and the language has evolved along with it. That interpreter, together with its functional tests, stands as a de facto specification of the language. Perl 6, however, started with a specification[31], and several projects[32] aim to implement some or all of the specification.

The citation for the Perl 6 specification says it is unfinished and is being designed after-the-fact, based on what gets implemented in the compiler. I hate to imagine what Perl 7 will be like.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
User avatar
headprogrammingczar
 
Posts: 3024
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: Is Java is a bad language for beginners?

Postby Indefinity » Fri Feb 05, 2010 11:04 pm UTC

Perl 7 will support embedded Brainfuck.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby suicidal pencil » Fri Feb 05, 2010 11:27 pm UTC

...why do I feel like yelling "get the hell off my lawn, you damn kids?"

The point of your first language is to teach you design patterns. That's pretty much it. The simpler the better. I won't deny that Basic isn't good for it, but for some strange reason, people tend to twist languages into doing stuff they were not supposed to do.

Having said that...

Code: Select all
print "get the hell off my lawn\n";
User avatar
suicidal pencil
 
Posts: 2
Joined: Fri Feb 05, 2010 8:28 pm UTC
Location: Canada, bitches!

Re: Is Java is a bad language for beginners?

Postby Indefinity » Fri Feb 05, 2010 11:58 pm UTC

suicidal pencil wrote:
Code: Select all
print "get the hell off my lawn\n";

Looks like Python code to me.

The point is that Perl has soooo many inconsistencies, and what's worse, a lot of the nifty features that Perl has have no direct translation to other languages. That makes it a rather horrible stepping stone to other languages.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby headprogrammingczar » Sat Feb 06, 2010 12:54 am UTC

That, plus the ridiculous and ambiguous syntax. There is no reason to have qq||qq as a substitute for "" (in fact, it is strictly less useful, since you can't escape the closing element). Using parenthesis for lists is just asking for trouble, especially when you see code like this:
Code: Select all
my ($thing);
my $thing2;

and end up with thing and thing2 having different enough to cause trouble with even the simplest things, like printing the output of cal.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
User avatar
headprogrammingczar
 
Posts: 3024
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: Is Java is a bad language for beginners?

Postby Indefinity » Sat Feb 06, 2010 6:11 pm UTC

See the QQ operator is one thing in Perl that made CGI stuff really nice to work with. Being able to QQ things like long HTML, multi-line, strings made life a lot easier. It's not as powerful, no, but if I want to print 20 lines of HTML, it's a hell of a lot easier to just QQ it then to try to escape every single quote that appears in there. Picking a delimiter that doesn't appear in the source is much easier usually. How often do you use ^ in HTML? And Python has something similar to QQ, with """.

And the list thing is only weird because in pretty every other language (sans LISP), the parentheses are used to signify only functions and precedence. Unfortunately, Perl uses parentheses for these too, which is why it leads to a lot of confusing things.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby Berengal » Sat Feb 06, 2010 6:51 pm UTC

Indefinity wrote:See the QQ operator is one thing in Perl that made CGI stuff really nice to work with.
Yeah, and see what that got us.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.
User avatar
Berengal
Superabacus Mystic of the First Rank
 
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway

Re: Is Java is a bad language for beginners?

Postby Indefinity » Sat Feb 06, 2010 7:16 pm UTC

And using the "synchronized" keyword is not the optimal solution for multi-threading, but it sure beats doing locks and semaphores by hand. Don't fault the solution when the problem itself is faulty.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby suicidal pencil » Sat Feb 06, 2010 7:59 pm UTC

Indefinity wrote:
suicidal pencil wrote:
Code: Select all
print "get the hell off my lawn\n";

Looks like Python code to me.


Don't know the first thing about Python. Maybe when I'm bored one day and have nothing better to do, I'll give it a go.

Indef. Has some of the point. Those are there for people who want to use them, and are not forced to. The beauty of programming: There are more than just one right way to do anything. Another key note are problems that we are having a hard time dealing with. When we encounter these, we tend to default to the language that we know best, and that usually turns out to be the first language we have learned. So it's pretty important that we learn a language that was made to actually do something beyond teaching (referring to Basic...oh how we've twisted that poor language). So Perl, Python, Ruby, and etc. all fall in that category of 'easy to learn, and was made to do shit'.

Spoiler:
I feel like a murderer when I tell scripts to die()...
User avatar
suicidal pencil
 
Posts: 2
Joined: Fri Feb 05, 2010 8:28 pm UTC
Location: Canada, bitches!

Re: Is Java is a bad language for beginners?

Postby Jplus » Wed Apr 21, 2010 3:24 pm UTC

It depends on your goals whether Java is fit as a first (imperative) programming language. You can definitely teach a student what it means to write a program with Java, and the student will probably be able to do anything with it they want (for a while). However, as you can read in another thread I'm not particularly fond of Java, and I think it will be a waste if students become so accustomed to Java that they wouldn't consider other languages anymore.

C++ and Python are probably better candidates as first languages. C++ because you expose the student to all problems and techniques they might need in real world situations (if you do it properly), and it fits tasks which require high performance. Python because it's probably the easiest and cleanest language around while still being very versatile and portable.

For an introduction to declarative programming, Haskell is the primary candidate. Prolog might be better for some restricted areas of application.
Feel free to call me Julian. J+ is just an abbreviation.
Image coding and xkcd combined
User avatar
Jplus
 
Posts: 1551
Joined: Wed Apr 21, 2010 12:29 pm UTC
Location: classified

Re: Is Java is a bad language for beginners?

Postby jendral_hxr » Mon Apr 26, 2010 4:20 pm UTC

I went first with (C | C++), some taste of Perl :D
Still looking forward for Python
I wish I weren't so stupid
User avatar
jendral_hxr
 
Posts: 44
Joined: Wed Jan 21, 2009 1:57 am UTC

Re: Is Java is a bad language for beginners?

Postby 0rm » Thu Jun 17, 2010 4:17 pm UTC

My intro CS course used C# and I absolutely hated it. Not only because of it's proprietary nature, but because it is too much like Java to justify its usage.

My progression was this.

Python - never bothered with OOP here
C#
C++ - Currently use
Perl - Use when needed.
They say it's unhackable; I think it can be hacked.
They say it's fast; I think it could be faster.
They say it's the best; I think it can be done better.
0rm
 
Posts: 81
Joined: Wed Feb 17, 2010 2:30 pm UTC

Re: Is Java is a bad language for beginners?

Postby Indefinity » Thu Jun 17, 2010 11:58 pm UTC

Having worked with both C# and Java, I personally feel that C# is the superior of the two languages. It supports many things from other paradigms that Java just simply can't do (delegates, semi-dynamic variables, properties, preprocessor commands, real generics), as well as doing some things that Java has since ripped off from (autoboxing, Java generics). Yes, they share a lot in common, and one could easily say that C# copied its syntax from Java, but it also added so much that I would hardly call it a clone. If C# happened to run on the JVM, I'd take it any day over Java. Seeing how your work is mostly in C++, you probably wouldn't appreciate things like dynamic variables and delegates as much as someone with a lot of Ruby/Lisp experience.

Yes, C# is developed by MS and there will probably be patent issues in the future, but for now the language definition is an ISO standard that can be developed, and other platforms can theoretically support C#. Not surprisingly, MS is only interested in developing a C# implementation for Windows. The patent issues is a tricky dance for other potential language implementors, and, for better or for worse, MS updating the language definition every few years is probably helping open source implementations like Mono. However, just as I prefer not to judge Java by the libraries available, I prefer to not judge C# by the platforms that it is currently supported on. (Hey, maybe MS will gets it out head out of its ass soon and will realize that there's money to made putting C# on Linux and doing consulting work for it!)
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby Berengal » Fri Jun 18, 2010 4:32 am UTC

Indefinity wrote:(Hey, maybe MS will gets it out head out of its ass soon and will realize that there's money to made putting C# on Linux and doing consulting work for it!)
They seem perfectly happy with giving Mono semi-support in the form of signing "we won't sue you" contracts and general displays of thumbs up. They even made their "Install silverlight nao!" site redirect to moonlight when it detected that I was running Linux. Microsoft aren't pushing Mono in an effort to get .NET onto Linux, Mono is still fending for itself like most open-source projects, but they're gently nudging it whenever there's a lot to gain for little effort.

But indeed, the libraries available or supported platforms doesn't affect the languages themselves, and in those regards I too think C# wins out.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.
User avatar
Berengal
Superabacus Mystic of the First Rank
 
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway

Re: Is Java is a bad language for beginners?

Postby styrofoam » Mon Jun 21, 2010 2:34 am UTC

First, yes, I think Java is a bad language to start with. It forces you to teach OOP right from the get-go, instead of starting with imperative and growing into OOP when the students can actually see the reason for it.

What would I recommend instead? I personally started with Perl, but in retrospect I wouldn't recommend it to anyone else. Probably C++, slowly mixing Qt in after the basics are down (who doesn't want to show off a GUI program?).
aadams wrote:I am a very nice whatever it is I am.
User avatar
styrofoam
 
Posts: 252
Joined: Sat May 08, 2010 3:28 am UTC

Re: Is Java is a bad language for beginners?

Postby bytbox » Mon Jun 21, 2010 5:34 am UTC

Maybe this isn't the right thing to say in the middle of a holy war, but... it doesn't actually matter. That is to say, the language with which you /start/ doesn't actually matter - it is important, while learning, to cover a certain spread, otherwise you'll find you're missing out.

I could argue for megabytes about this, but I have a better suggestion. Let's assume everybody participating here enjoys programming, and is reasonably good at it. What (turing-complete) language did you start with? Hypothesis: no clear pattern will emerge, except that few people started with postscript or x86 assembly. (But I wouldn't be surprised to encounter a few skilled programmers who started with z80 assembly - in fact I know at least 2 who learned TI BASIC and then z80 assembly before any more common languages.)

Javascript.

Spoiler:
Oh I'm sorry - did I spoil a holy war? Let me make up for that.

Java has got to be one of the worst languages invented, and the now-common practice of using it for "introductory" programming classes churns my stomach. Java places a huge amount of emphasis on structured programming, hence the fact that you can't even write a "Hello world" program without creating a class. At every keystroke, you must resist the temptation to improve your framework - but you find that, without a huge scaffold to hold you up, it's impossible to move anywhere. So you write 3 interfaces and 5 classes to pop up a dialog box.

OOP good, maybe - but in java, it's really shoved in your face. Then we have crude hacks like anonymous inner crap that just confuse people (I guess that's a way to reduce the number of named classes?), and the java reflections API. Most teachers don't even mention it, and after peeking around (with three sacrifices ready for the almighty daemons of Sun/Oracle should it be necessary) I can see why - its just one great megakludge that usually doesn't work. Most java programmers seem to think its really powerful - I started with javascript and am a great fan of python and lisp, and reflections is just awful.
bytbox
 
Posts: 56
Joined: Wed Aug 19, 2009 5:43 am UTC

Re: Is Java is a bad language for beginners?

Postby Indefinity » Tue Jun 22, 2010 12:53 am UTC

Geez, you had me there for a minute!

I think you raised an interesting point when you said "Let's assume everybody participating here enjoys programming..." because not everyone who takes an intro programming course actually likes programming. And I think that's the problem with languages like C and C++ to start with: you have to want to be a programmer/hacker to really learn it or those languages will be about as enjoyable as writing ones and zeros. So what language is best for beginners? Well a hacker language for wannabe hackers, and maybe an easier-to-get-stuff-language for the people who want to get stuff done. Then maybe Java for the super-structured boring student.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby bytbox » Tue Jun 22, 2010 1:34 am UTC

Indefinity wrote:because not everyone who takes an intro programming course actually likes programming.


My point was that everyone participating /here/ likes programming. I'm not calling something a good beginner language unless it leads you to like programming and continue programming - which pretty much all languages can do.

Indefinity wrote:And I think that's the problem with languages like C and C++ to start with: you have to want to be a programmer/hacker to really learn it or those languages will be about as enjoyable as writing ones and zeros. So what language is best for beginners? Well a hacker language for wannabe hackers, and maybe an easier-to-get-stuff-language for the people who want to get stuff done. Then maybe Java for the super-structured boring student.


I don't think that it makes a difference, though - I see no reason a wannabe hacker couldn't start with Java (or BASIC), nor do I see a reason a boring ol' foo' couldn't start with Forth. Lets be extreme, just to make a point - lets compare the merits of assembly vs. Java.

Java: you can do mildly cool stuff without much effort.
Assembly: you can do insanely cool stuff with quite a bit of effort.

Now we could say, "aha! Java is good for people who don't want to put in much effort, whereas assembly is good for wannabe hackers who are going to put a great deal of effort in!" But that's using the wrong definition of "good" - I don't give a shit what my mentee thinks of the language; I know for a fact (s)he won't care about it, because (s)he doesn't know any others. Thus the important thing is: does the language encourage them to continue? And in assembly, the prospect of doing phenomenally cool things with little code is very tempting, especially when, in the early stages, its easy to copy&paste the harder bits together. That logical thinking is required is a lucky side-effect, not what makes the language "good".
bytbox
 
Posts: 56
Joined: Wed Aug 19, 2009 5:43 am UTC

Re: Is Java is a bad language for beginners?

Postby Indefinity » Wed Jun 23, 2010 9:08 pm UTC

The point is that most people require some sort of motivation to learn. Some people are quite happy putting in endless hours of seemingly meaningless work in assembly with the knowledge or hope that one day they'll be able to do something really cool. Others won't be happy working hours to get an assembly program that simply writes "hello world" when they could do that in 10 seconds in another language like Python. If you want to make a web page do cool stuff, then assembly or C is probably a pointless starting language, and the student will be hopelessly uninterested because it doesn't lead them towards their goal. Likewise, someone who wants to program so they can one day hack the memory of their favorite game so they can fly will be rather disinterested in learning Java. While few languages are "bad" to learn on, they each have the specialties which makes them more well suited to different folks. All roads may lead to the same place eventually, but some people would rather go through the desert while others may prefer the mountains.
Indefinity
 
Posts: 87
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby flying sheep » Mon Jun 28, 2010 11:21 pm UTC

it’s about motivation, so you are right. but i think you can draw motivation out of hours in assembly ‒ if you already have the experience.

a friend knows a guy who worked months on one assembly vst plugin whichnow can deal with 12 channels at 3% cpu workload…
User avatar
flying sheep
 
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Is Java is a bad language for beginners?

Postby tuseroni » Thu Jul 22, 2010 2:24 am UTC

i think a beginner language should be easy to write in. a lot of people say people should begin with c, but think how long you would be learning before you could make something you wanted to make, or even something useful. and then there is the huge chasm between console programs and graphical programs. if you cant do something useful or fun in a language right off the bat, you probably wont keep at it.

for me, my first language was Qbasic when i was 10. back then pokemon had just come out and i was a big fan, so i made a pokedex...mostly transcribing stats and such from my players guide....has 1 input and 151 if's and when it was done i was so proud of myself, i loved my pokedex, and i learned newer things and made more qbasic programs and put some of them into my pokedex (the pokedex would start up with the word nintendo dropping down and with the little sound effect from the games and show an ascii drawing of the outside of a pokedex, then press enter and it changes to an ascii drawing of an open pokedex) i wouldnt be programming today if it wasnt for the pride i felt back then when i made my first program. and then i tried dark basic...not as successful. eventually i got into irc and learned mirc script. first it was basic aliases to make things easier, copying other peoples code and modifying it, then remote scripts, soon i was making my own, after some time i made my own fserver, then my own suite (called it total xenocide...i was like 13 ok...) away, menu, fserver, and raw server scripts. i had even made my own spam catching bot which was so successful it filled up the ban list...many times...usually stopped the spammer before they could get down the line.
then i learned c/c++
then php,javascript,html
and some python

i cant speak to java personally but i can say the best language for beginners is one that lets them make programs easily. it doesnt have to be a good language, it doesnt have to be a production language. i certainly wouldnt make anything important in qbasic...or even visual basic. but i could see its usefulness as a programming language for beginners.
Image
tuseroni
 
Posts: 123
Joined: Fri Jun 25, 2010 10:41 pm UTC

Re: Is Java is a bad language for beginners?

Postby stands2reason » Mon Jul 26, 2010 1:51 am UTC

TBH, OOP still feels like a dumb abstraction to me. It's not how code actually runs. If you write in C, getting your hands dirty with pointers and dynamic memory, you get a lot closer to the The Real Thing, and it makes actually understanding CPU & memory architecture a lot easier.

Though I have to admit the sheer amount of typing it can save is nice, as is the exception handling stuff you'll find in Java and Python. And the extensive libraries. So as a tool, Java is fine. As a learning experience, I'm not so sure. I say start with the lowest-level language you can handle until you really get it, and then move on to whatever you want.
stands2reason
 
Posts: 16
Joined: Wed Jun 09, 2010 2:32 pm UTC

Re: Is Java is a bad language for beginners?

Postby tuseroni » Mon Jul 26, 2010 3:07 am UTC

OOP is not how the program runs sure, but it tends to be how people think (least some people...im in some sorta limbo between oop and procedural) if you want to be closest to how the program runs use assembly...

i have found that procedural programming tends to be the easiest and as such the most fun way to learn, but it can make it that much harder to make the jump to OOP.
Image
tuseroni
 
Posts: 123
Joined: Fri Jun 25, 2010 10:41 pm UTC

Re: Is Java is a bad language for beginners?

Postby Zardek » Mon Jul 26, 2010 5:17 pm UTC

Personally I was taught C/C++ first. After understanding and being able to work with it, getting to understand and use Java was not hard (but I had to use a lot a reference guide).

Dont know if that was the best, my university used to teach Java first... And my classmates and me will always have an eternal debate in which is a better idea.
Dont know...
User avatar
Zardek
 
Posts: 2
Joined: Mon Jul 26, 2010 4:49 pm UTC

Re: Is Java is a bad language for beginners?

Postby rrwoods » Wed Jul 28, 2010 2:07 pm UTC

stands2reason wrote:TBH, OOP still feels like a dumb abstraction to me. It's not how code actually runs. If you write in C, getting your hands dirty with pointers and dynamic memory, you get a lot closer to the The Real Thing, and it makes actually understanding CPU & memory architecture a lot easier.

Though I have to admit the sheer amount of typing it can save is nice, as is the exception handling stuff you'll find in Java and Python. And the extensive libraries. So as a tool, Java is fine. As a learning experience, I'm not so sure. I say start with the lowest-level language you can handle until you really get it, and then move on to whatever you want.

Misconception: Code is for computers.

Don't get me wrong. C is an important experience to have, and C is very, very good at what it does. However, also s/C/Java/. Neither are good beginner languages IMO.
26/M/taken/US
age/gender/interest/country

Belial wrote:The sex card is tournament legal. And I am tapping it for, like, six mana.
User avatar
rrwoods
 
Posts: 1507
Joined: Mon Sep 24, 2007 5:57 pm UTC
Location: US

Re: Is Java is a bad language for beginners?

Postby qbg » Wed Jul 28, 2010 4:41 pm UTC

stands2reason wrote:TBH, OOP still feels like a dumb abstraction to me. It's not how code actually runs. If you write in C, getting your hands dirty with pointers and dynamic memory, you get a lot closer to the The Real Thing, and it makes actually understanding CPU & memory architecture a lot easier.

C? Running C is going to be a complete hack (and not at all like The Real Thing) on my graph reduction machine.
qbg
 
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Is Java is a bad language for beginners?

Postby GoC » Sun Aug 01, 2010 1:12 am UTC

My progression was: BASIC, Redcode*, C, Java. No doubt I'm going to get flamed for that last transition. :roll:
Why don't more people write in assembly? I could do boatloads of stuff in Redcode and I've heard C is considerably slower than assembly.
Belial wrote:I'm just being a dick. It happens.
GoC
 
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

PreviousNext

Return to Religious Wars

Who is online

Users browsing this forum: No registered users and 2 guests