Learning JAVA, any advice?

Status
Not open for further replies.

MilleniX

Ars Tribunus Angusticlavius
8,138
Subscriptor++
JustinS":10mrgabf said:
Richard Berg":10mrgabf said:
Python++

Actually wait, let me revise that. Anything_but_Java++

Having skimmed a large portion of both, I definitely recommend How to Think Like a Computer Scientist over Learn Python the Hard Way.
I'm late to this thread but that is an excellent recommendation. It's the only truly introductory text I'm aware of that deals with recursion.

The text has some other great qualities, as Richard mentioned. The recursion thing is a pet peeve of mine. Downey proves with this textbook that the subject's difficulty is not great enough to justify its omission from an introductory text. I seriously don't know why it's always missing.
I assume you exclude The Structure and Interpretation of Computer Programs from the 'introductory' appellation?
 

JustinS

Ars Legatus Legionis
10,123
MilleniX":1d89iu1u said:
JustinS":1d89iu1u said:
Richard Berg":1d89iu1u said:
Python++

Actually wait, let me revise that. Anything_but_Java++

Having skimmed a large portion of both, I definitely recommend How to Think Like a Computer Scientist over Learn Python the Hard Way.
I'm late to this thread but that is an excellent recommendation. It's the only truly introductory text I'm aware of that deals with recursion.

The text has some other great qualities, as Richard mentioned. The recursion thing is a pet peeve of mine. Downey proves with this textbook that the subject's difficulty is not great enough to justify its omission from an introductory text. I seriously don't know why it's always missing.
I assume you exclude The Structure and Interpretation of Computer Programs from the 'introductory' appellation?
Yeah, I italicized "truly introductory" for a reason. SICP just seems higher level to me, useful as a more advanced text. Rather than get into a pedagogical argument about it I'll defend my statement by saying I doubt very, very much that SICP was ever used by anyone to achieve their first "hello world" moment.
 

MilleniX

Ars Tribunus Angusticlavius
8,138
Subscriptor++
JustinS":1hks699e said:
MilleniX":1hks699e said:
JustinS":1hks699e said:
Richard Berg":1hks699e said:
Python++

Actually wait, let me revise that. Anything_but_Java++

Having skimmed a large portion of both, I definitely recommend How to Think Like a Computer Scientist over Learn Python the Hard Way.
I'm late to this thread but that is an excellent recommendation. It's the only truly introductory text I'm aware of that deals with recursion.

The text has some other great qualities, as Richard mentioned. The recursion thing is a pet peeve of mine. Downey proves with this textbook that the subject's difficulty is not great enough to justify its omission from an introductory text. I seriously don't know why it's always missing.
I assume you exclude The Structure and Interpretation of Computer Programs from the 'introductory' appellation?
Yeah, I italicized "truly introductory" for a reason. SICP just seems higher level to me, useful as a more advanced text. Rather than get into a pedagogical argument about it I'll defend my statement by saying I doubt very, very much that SICP was ever used by anyone to achieve their first "hello world" moment.
I believe a large fraction of MIT freshmen for over a decade had exactly that experience, actually. They only just moved away from it in the last couple years.
 

Richard Berg

Ars Legatus Legionis
43,037
Subscriptor
Skimmed HtTLaCS. Looks pretty good, though as it has very little math, I'm not sure the title is accurate.
Math is broader than you think.

I believe a large fraction of MIT freshmen for over a decade had exactly that experience, actually.
The people I give HTTLACS to are not MIT students :)

Real questions from my gf: "Where do I type? I can't find the >>> thing on my Mac." Half hour later: "How do I run two commands together like the book does? Terminal won't let me save." Dumping SICP on someone like her would be cruel.

That was Wednesday night. 48 hours later, she's drawing fractals with a recursive turtle-fn. 'Nuf said.
 

technophile

Ars Legatus Legionis
23,768
techix":1r2c7zce said:
I think beginners get hung up on the fact that Programming Languages are called "Languages".

It is not a language like French or Russian, where if you spend 5 years learning Russian and decide you want to learn French, you have to start over from the beginning.
Mmmm, I disagree pretty deeply.
If you know Spanish (or any other romance language) and go to learn French, the syntax, grammar, and even many of the words will be familiar or even identical. Your accent will be atrocious, and you will not know any of the idioms, but you'll be able to make yourself understood.

Go from French to one of those aboriginal languages based on cardinal direction, and you'll have about as much trouble as going from C to something with prototypal inheritance: that is, a lot. You'll be a Frenchman in China, unable to speak or understand at even a basic level until you spend a fair amount of time immersed in the new language.

Just as in human languages, there are ideas and idioms perfectly natural to some languages that are difficult or impossible to express in others (try implementing closures in early versions of Java or C# vs python or javascript, for example).

The analogy is about as close as analogies get, honestly; there are families of languages, where moving between them is logical and easy. Moving between families is more difficult, and learning an entirely unrelated language with entirely new concepts will stretch your cognitive faculties and teach you more than you thought possible. This is why people advocate learning python or ruby or lisp, as a matter of fact.
 

JustinS

Ars Legatus Legionis
10,123
MilleniX":2bsv5non said:
JustinS":2bsv5non said:
Yeah, I italicized "truly introductory" for a reason. SICP just seems higher level to me, useful as a more advanced text. Rather than get into a pedagogical argument about it I'll defend my statement by saying I doubt very, very much that SICP was ever used by anyone to achieve their first "hello world" moment.
I believe a large fraction of MIT freshmen for over a decade had exactly that experience, actually. They only just moved away from it in the last couple years.
Really? I wonder what kind of student in the microcomputer era ever got to MIT without having written a hello world program.
 

MilleniX

Ars Tribunus Angusticlavius
8,138
Subscriptor++
JustinS":r33xoymk said:
MilleniX":r33xoymk said:
JustinS":r33xoymk said:
Yeah, I italicized "truly introductory" for a reason. SICP just seems higher level to me, useful as a more advanced text. Rather than get into a pedagogical argument about it I'll defend my statement by saying I doubt very, very much that SICP was ever used by anyone to achieve their first "hello world" moment.
I believe a large fraction of MIT freshmen for over a decade had exactly that experience, actually. They only just moved away from it in the last couple years.
Really? I wonder what kind of student in the microcomputer era ever got to MIT without having written a hello world program.
Looking into the history a bit, I was off. It looks like freshman entering Electrical Engineering and Computer Science were required to take it, not everyone. I've encountered CS majors who didn't program before college, and could easily believe EEs might not have, but it's not like every random Bio or MechE was taking it also.
 
technophile":3uvvhl5a said:
techix":3uvvhl5a said:
I think beginners get hung up on the fact that Programming Languages are called "Languages".

It is not a language like French or Russian, where if you spend 5 years learning Russian and decide you want to learn French, you have to start over from the beginning.
Mmmm, I disagree pretty deeply.
If you know Spanish (or any other romance language) and go to learn French, the syntax, grammar, and even many of the words will be familiar or even identical. Your accent will be atrocious, and you will not know any of the idioms, but you'll be able to make yourself understood.

++ fucking +
 

JustinS

Ars Legatus Legionis
10,123
MilleniX":2fy9a79u said:
Looking into the history a bit, I was off. It looks like freshman entering Electrical Engineering and Computer Science were required to take it, not everyone. I've encountered CS majors who didn't program before college, and could easily believe EEs might not have, but it's not like every random Bio or MechE was taking it also.
I'm quite surprised by that! I wouldn't have thought you could get into an EE or CS program at MIT without AP Computer Science, and I wouldn't have thought that someone would be inclined to apply to a program like that without having at least pounded out the odd BASIC (or whatever) program during their youth.

Berkeley is apparently debating a move to Python for their intro CS class for CS majors with Brian Harvey's retirement, and I know Harvard is using Python for its CS for non-CS majors classes.
 

MilleniX

Ars Tribunus Angusticlavius
8,138
Subscriptor++
My undergrad switched it's required-for-everyone first-term CS class from a bog-standard "Intro to Programming (in Java)" to a "Breadth-first Intro to CS (in Python, synthetic assembler, and others stuff)" a few years ago, and it seems to be working out wonderfully. There are two tracks offered, depending on previous programming background (any or none, essentially), but students are free to switch between them. The fraction of students going on to major in CS jumped pretty sharply after the switch, and people are using their programming knowledge in other classes more, so I think it's been judged a success.

As for MIT, their undergrad admissions process doesn't commit you to a major. You apply to be an MIT undergrad, and figure out your major a year later. So 6.001 could have enticed some people, and scared others off.
 

Alamout

Ars Legatus Legionis
27,285
I'm quite surprised by that! I wouldn't have thought you could get into an EE or CS program at MIT without AP Computer Science, and I wouldn't have thought that someone would be inclined to apply to a program like that without having at least pounded out the odd BASIC (or whatever) program during their youth.
Given that lots of (quite good) high schools don't offer AP Computer Science, that would be a fairly extreme filter for them to use.

I would guess that MIT mostly wouldn't care if someone "knew how to program" already because they probably don't know how to program well. Even a wunderkind is going to have bad habits.

In fact, MIT doesn't accept AP credit for CS. They want you to learn it from them.
 

JustinS

Ars Legatus Legionis
10,123
Alamout":39iaxb5o said:
I would guess that MIT mostly wouldn't care if someone "knew how to program" already because they probably don't know how to program well. Even a wunderkind is going to have bad habits.
Actually, I'd expect them to filter not on the pre-college eduction in the subject per se, but I would expect them to filter on the interest or lack thereof exhibited by the prospective student in the subject...
 

JustinS

Ars Legatus Legionis
10,123
ShuggyCoUk":1erjotju said:
I had not meaningfully programmed before I went to University to do CS.

I had played with logo. Heck I'd used my action replay to peek and poke at memory in my amiga but I had done nothing algorithmic whatsoever.
I was never talking about "meaningful" programming when I mentioned a "hello world" program. It's the people who haven't done at least that much that I wonder about. But I'm obviously betraying some kind of bias. :)
 

Alamout

Ars Legatus Legionis
27,285
JustinS":239hxuwi said:
Actually, I'd expect them to filter not on the pre-college eduction in the subject per se, but I would expect them to filter on the interest or lack thereof exhibited by the prospective student in the subject...
As MilleniX pointed out already, you don't apply to a major. So they don't necessarily need evidence of interest in programming--they should simply want evidence of interest in general. Someone who is motivated to learn on their own.

I mean, your position would essentially mean that anyone who is too poor to own a computer would be unable to study computer science at MIT.
 

JustinS

Ars Legatus Legionis
10,123
Alamout":2jvzj8no said:
As MilleniX pointed out already, you don't apply to a major.
Perhaps you didn't, but I believe you haven't thought this particular point out, or else you're referring to MIT specifically? I needed to apply to a specific "college" at my university, and I expect my university was not unique in this respect. A college big enough to have both science and art majors, for example, should really use different criteria to screen students for its various majors.

So they don't necessarily need evidence of interest in programming--they should simply want evidence of interest in general. Someone who is motivated to learn on their own.

I mean, your position would essentially mean that anyone who is too poor to own a computer would be unable to study computer science at MIT.
I'm not sure what you think my position is. I'm surprised at the way things apparently work at MIT, but that's just a misunderstanding on my part. I'm a little surprised by some of what I've read here, but I don't find any fault with it. MIT is producing excellent CS graduates, after all.

I don't buy the "too poor to own a computer" bit, though. My AP comp sci class (at a rather undistinguished public school) didn't cost me any money.

Outside of advanced placement classes, I really think the problem isn't going to be the cost of the machine. It's going to be a lack of people in the child's life capable of feeding an interest in how the machine works. Computers are cheap enough that they're practically free, but just having the thing isn't enough. :(
 

Alamout

Ars Legatus Legionis
27,285
Perhaps you didn't, but I believe you haven't thought this particular point out, or else you're referring to MIT specifically? I needed to apply to a specific "college" at my university, and I expect my university was not unique in this respect. A college big enough to have both science and art majors, for example, should really use different criteria to screen students for its various majors.
College != Major, obviously (in most cases, at least). Most universities have separate colleges, but very few of them require you to apply to a major, because high school students have no friggin' clue what they want to study--because they don't know anything, really. Even incoming graduate students rarely know what they actually want to study. So many undergrads will switch majors that any filter of this kind would be useless.

I don't buy the "too poor to own a computer" bit, though. My AP comp sci class (at a rather undistinguished public school) didn't cost me any money.

Outside of advanced placement classes, I really think the problem isn't going to be the cost of the machine. It's going to be a lack of people in the child's life capable of feeding an interest in how the machine works. Computers are cheap enough that they're practically free, but just having the thing isn't enough. :(
Unless "undistinguished" means "poverty stricken" your personal experience isn't particularly relevant to my point.

Computers are still far from free, but that's beside the point--as you say, it takes more than physical access to get into this stuff. Requiring students to have that experience would be placing an unwarranted burden on underprivileged applicants.

I'm not sure what you think my position is. I'm surprised at the way things apparently work at MIT, but that's just a misunderstanding on my part.
I'm just trying to give you some understanding, I guess. :D And explain why things are not the way you thought they were.
 

technophile

Ars Legatus Legionis
23,768
JustinS":1igl6bv4 said:
Alamout":1igl6bv4 said:
As MilleniX pointed out already, you don't apply to a major.
Perhaps you didn't, but I believe you haven't thought this particular point out, or else you're referring to MIT specifically? I needed to apply to a specific "college" at my university, and I expect my university was not unique in this respect. A college big enough to have both science and art majors, for example, should really use different criteria to screen students for its various majors.
Yeah, when I applied I had to be accepted both by the University and by the School of Engineering (which runs the comp sci programs). It wasn't down to the major level -- I started out as a MechE and switched my third semester -- but it wasn't as simple as "start at university, figure out everything else later".
 

ShuggyCoUk

Ars Legatus Legionis
10,387
Subscriptor++
Just as a conterpoint (I know irrelevant to the OP)
Most universities have separate colleges,
not in the UK, there are only a handful that do this (less than 10 I think)
but very few of them require you to apply to a major
Also not the case. I the UK you apply for your degree (in essense your major, though considerably more so in many cases)
because high school students have no friggin' clue what they want to study--because they don't know anything, really.
QFT, and I say this from experience (I dropped out first time round)
 

JustinS

Ars Legatus Legionis
10,123
Alamout":61x5sxcn said:
College != Major, obviously (in most cases, at least). Most universities have separate colleges, but very few of them require you to apply to a major, because high school students have no friggin' clue what they want to study--because they don't know anything, really. Even incoming graduate students rarely know what they actually want to study. So many undergrads will switch majors that any filter of this kind would be useless.
My college had us effectively "applying to a major," but the university was unusually large. At a narrowly-focused school with very high entrance requirements for anyone and everyone who attends, requirements for an individual major obviously become less necessary.

I knew one person who tried to game the system by applying to a major he didn't really want on his entrance application to CMU, since the program he really wanted wouldn't have him because of his test scores. This is evidently rather common. I guess the idea is that in spite of these requirements, once you're "in" a university will be reluctant to refuse a transfer of majors, for the obvious reasons. I don't know how often this subterfuge works; my friend flunked out in the first semester. :)

I wouldn't question whatever MIT is doing, since the folks I've met with degrees from there are all extremely capable.

just trying to give you some understanding, I guess. :D And explain why things are not the way you thought they were.
You are a buddha. Can I rub your belly? :p
 
In keeping with the topic and OP's question - you really can't just ask that question and expect to not have fans of every language start selling you on the good points to learn language X or the reasons why language Y is terrible. Truth is there are many uses for each language available and they all possess strengths and weakness pertaining to the application at hand. Since he was asking about beginning language many have stated Python which is not bad advice. However, I have found that Java is not a bad beginner language - it is not as in depth and cryptic as C language can be to a beginner for example, but it remains powerful enough and has the perk of being cross-platform therefor the code is a lot more straight forward no matter which system he is coding on. I've read a lot of debates between the merits of .php vs python lately and noticed a lot of programmers claiming that Python encourages a more clean and structured approach to coding. This, to me, is BS - either a person learns how to neatly structure code or they don't. As long as they develop a system that is easily understood by the next set of eyes to look at it so they can readily make changes to the code if need be then that is all that really matters regarding that. Since he comes from a background of HTML, and from a decade ago, it is likely that his notion of "structure" is something to be developed. There is a difference between code that works and code that works and looks nice and is secure and efficient. Anyone can learn the former but it takes persistence, dedication and experience to create the latter.

on a side not...if you need a good IDE for Java check out Eclipse - it has very good syntax highlighting, error correction and debugging, and can help organize your projects rather efficiently. I've used a few others, but always preferred Eclipse myself.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":28uj8bpx said:
Blacken00100":28uj8bpx said:
Because it's quite obviously a fucking terrible one.

Why? I mean, if its so fucking terrible should only take you a sentence or two to sum it up.
Its poor expressiveness results in insane patterns. In 2011, the lack of first-class functions immediately rules a language out for purposes of pedagogy. And that's not even getting into the cruft surrounding it as a practical tool, either.

There is little reason to learn Java as an early language when C#, Python, Scala, etc. exist. (And there's little reason to use Java when Scala exists, either.)
 
Blacken00100":2jlnui7t said:
MistaMagoo":2jlnui7t said:
Blacken00100":2jlnui7t said:
Because it's quite obviously a fucking terrible one.

Why? I mean, if its so fucking terrible should only take you a sentence or two to sum it up.
Poor expressiveness resulting in insane patterns that teach mind-bogglingly bad practices.

The language is not responsible for the patterns people project on to it. First class functions dont mean bollocks to someone starting out they are still trying to get their heads around far more fundamental things.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":1wvzl1pj said:
The language is not responsible for the patterns people project on to it.
Fucking WRONG. When a language can't even provide closures, it is fucking defective and people will whomp up a mess of bad practices to get around that. It is entirely the fault of Java that it can't be expressive enough to obviate the need for bad patterns and practices.

First class functions dont mean bollocks to someone starting out they are still trying to get their heads around far more fundamental things.
Also fucking WRONG. In 2011, first-class functions are basic and integral. You lose nothing by having them and you lose a great deal by not having them.

There is no good reason to start a project in Java, or start learning programming via Java, when Scala exists. And even that's not the best of tools for a novice, hence all the recommendations for Python et al.
 

MilleniX

Ars Tribunus Angusticlavius
8,138
Subscriptor++
MistaMagoo":169xlsh2 said:
Blacken00100":169xlsh2 said:
Because it's quite obviously a fucking terrible one.

Why? I mean, if its so fucking terrible should only take you a sentence or two to sum it up.
I don't want to derail, but it looks like the OP's already gotten what he came here for, so I'll pitch in.

When just learning to program, exercises that demonstrate even the simplest constructs still require a substantial amount of ceremony in Java (or C++, or C). Beginners can either be told "I just ignore that, you'll learn about it later" (discouraging the very inquisitiveness necessary to get good at programming) or they can be explained, and be a huge distraction until someone's programming knowledge and ability catches up. In contrast, in languages like Python or Ruby, I can just write "print 5" or the like, run that, and it works.
 
Blacken00100":21ax5evo said:
MistaMagoo":21ax5evo said:
The language is not responsible for the patterns people project on to it.
Fucking WRONG. When a language can't even provide closures, it is fucking defective and people will whomp up a mess of bad practices to get around that.

Oh right, you are one of the internet hard men on here, how nice for you. Just accept that for a teaching language the stuff youare talking about does not apply to a beginner.
 
MilleniX":1plgdh6z said:
MistaMagoo":1plgdh6z said:
Blacken00100":1plgdh6z said:
Because it's quite obviously a fucking terrible one.

Why? I mean, if its so fucking terrible should only take you a sentence or two to sum it up.
I don't want to derail, but it looks like the OP's already gotten what he came here for, so I'll pitch in.

When just learning to program, exercises that demonstrate even the simplest constructs still require a substantial amount of ceremony in Java (or C++, or C). Beginners can either be told "I just ignore that, you'll learn about it later" (discouraging the very inquisitiveness necessary to get good at programming) or they can be explained, and be a huge distraction until someone's programming knowledge and ability catches up. In contrast, in languages like Python or Ruby, I can just write "print 5" or the like, run that, and it works.

No he fucking didnt the OP came on here and got dog piled by a bunch of people screaming at him not to learn java, thats not the result he was looking for.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":ebw452uf said:
Oh right, you are one of the internet hard men on here, how nice for you. Just accept that for a teaching language the stuff youare talking about does not apply to a beginner.
Of course it applies. Anyone who's ever taken algebra can understand map or fold, and it informs your ability to write better code. These things are foundational. Why learn something old and arguably broken?



MistaMagoo":ebw452uf said:
No he fucking didnt the OP came on here and got dog piled by a bunch of people screaming at him not to learn java, thats not the result he was looking for.
It's the answer to the question he didn't know he wanted to ask. And it looks like he took it to heart.

That you have some irrational fondness for Java doesn't make it a good choice. Grow up.
 
Status
Not open for further replies.