Dive Into Java?

E

erikcw

DiveIntoPython.org was the first book I read on python, and I really
got a lot out of it. I need to start learning Java (to maintain a
project I've inherited), and was wondering if anyone knew of any
similar books for Java?

Maybe once I know my way around the language, I can sneak Jython in...
:)

Thanks!
Erik
 
J

jmdeschamps

erikcw said:
DiveIntoPython.org was the first book I read on python, and I really
got a lot out of it. I need to start learning Java (to maintain a
project I've inherited), and was wondering if anyone knew of any
similar books for Java?

Maybe once I know my way around the language, I can sneak Jython in...
:)

Thanks!
Erik
Not exactly Dive into Java, but one amongst very great book on
programming (and the one that pointed me to Python :)) , really! )
- *Just Java* by Peter van der Linden, really great book! and fun to
read, and bright, and this (apocryphical) citation (i don't have the
book under hand just now, being on vacation ;-)): *...to the question
'Should I learn Java, C++, Perl?' (the answer is) 'Yes!' ...*
and Python was included among several other OpenSource stuff on the CD.

Jean-Marc
 
J

Jorge Vargas

Sun's Java tutorial, and went your confortable with it.

Thinking in Java Bruce Eckel
 
B

Bjoern Schliessmann

erikcw said:
DiveIntoPython.org was the first book I read on python, and I
really
got a lot out of it. I need to start learning Java (to maintain a
project I've inherited), and was wondering if anyone knew of any
similar books for Java?

Perhaps a bit of a rant, but learn Python and C++, take the worst of
both, make it a language and you have Java ... ;)

Regards,


Björn
 
D

Diez B. Roggisch

Bjoern said:
Perhaps a bit of a rant, but learn Python and C++, take the worst of
both, make it a language and you have Java ... ;)

While I do not love java, this is one of the dumbest statements for a while
in this NG - even though it is not meant to be too serious.

C++ has a lot of wicked, complicated features like overloadable assignment
statements and so on, misses GC, and is in general semantically very
overloaded. All that make programming it a real PITA, as you permanently
are at risk loosing your feet through self-inflicted gun-shot-wounds.

While Java is a language that makes it difficult to produce nice or
beautiful code, it certainly is a language that hinders you to shoot in
your own foot really badly.

Diez
 
B

Bjoern Schliessmann

Diez said:
While I do not love java, this is one of the dumbest statements
for a while in this NG - even though it is not meant to be too
serious.

Thanks for your concern. I didn't really state this from dumbness
though.

BTW, definitely consider looking up "irony" and "emoticon" in an
encyclopedia of your choice.
C++ has a lot of wicked, complicated features like overloadable
assignment statements and so on, misses GC, and is in general
semantically very overloaded.

Maybe. Though I think there /are/ languages with more complicated
features, with an imperfomant GC that can't be controlled, or more
semantically overloaded.

BTW, what exactly do you mean by "semantically overloaded" in the
case of C++? E. g. the :: and . operators where one could do both?
All that make programming it a real PITA, as you permanently are
at risk loosing your feet through self-inflicted gun-shot-wounds.

It can be quite convenient. Not as convenient as Python, but it's
not impossible at all to write working code without hundreds of
bugs. But that's what it reads like in your posting.
While Java is a language that makes it difficult to produce nice
or beautiful code,

because it wanted to be new and good but took over much of C++'s
syntax and made it even weirder,
it certainly is a language that hinders you to shoot in your own
foot really badly.

No, it is a language that forbids almost everything from C++ which
could be dangerous, and at the same time reimplements some of those
features "under the hood": E. g. no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Regards,


Björn
 
A

Antoine De Groote

erikcw said:
DiveIntoPython.org was the first book I read on python, and I really
got a lot out of it. I need to start learning Java (to maintain a
project I've inherited), and was wondering if anyone knew of any
similar books for Java?

Maybe once I know my way around the language, I can sneak Jython in...
:)

Thanks!
Erik


I also liked Bruce Eckel's Thinking in Java. I new Java already before,
but this book was so fun to read that I read it anyway :)
 
D

Diez B. Roggisch

Bjoern said:
Thanks for your concern. I didn't really state this from dumbness
though.

What do you mean by "from dumbness"? I didn't accuse you of being dumb, if
that is what you are concerned of. But the statement was.
BTW, definitely consider looking up "irony" and "emoticon" in an
encyclopedia of your choice.

Putting a single emoticon on the end of an unreflected and wrong statement
doesn't make that statement a beacon of irony and wit. And in context of
somebody seeking enlightment regarding java, it's especially unhelpful and
confusing I think. Which was the reason for my post.
C++ has a lot of wicked, complicated features like overloadable

Maybe. Though I think there /are/ languages with more complicated
features, with an imperfomant GC that can't be controlled, or more
semantically overloaded.

So what? Either you talk about Java here, then name it and prove these
points, or not, then where is the relevance of that statement to this
discussion?

IF you talk about java and GC: yes, can be painful sometimes, in high-load
scenarios. And you can tweak it, btw.

But I can count the cases I ran into GC-troubles on one hand, where the
number of segfaults due lack of GCing in C++ are endless. And certainly not
only for me....
BTW, what exactly do you mean by "semantically overloaded" in the
case of C++? E. g. the :: and . operators where one could do both?

For example: the overloading of assignment operators, casting operators,
copy constructors and the like that, and the fact that one of them is
possibly chosen in absence of the other.

The subtle differences between pointers and references.

Ahh, not to forget the joys of slicing through non-virtual
copy-constructors. And while we are talking about it: virtual - a keyword
with a great deal of meanings....

Missing definition of static initializer order, at least for some binary
formats.

I could continue for some while...
It can be quite convenient. Not as convenient as Python, but it's
not impossible at all to write working code without hundreds of
bugs. But that's what it reads like in your posting.

I didn't state that you can't produce working code with C++, I said that it
is remarkably more difficult than with java (and python anyway). Because of
aforementioned complications in the language design of C++.
because it wanted to be new and good but took over much of C++'s
syntax and made it even weirder,

Even weirder? Care to explain? While they _did_ choose some unneccessary
syntactic crud to stay in, even though it isn't needed (e.g. the
superfluous new-keyword), I don't see a lot of things like ::, ->, virtual,
=0 and so on. Not to mention struct and friend of course.

Yes, they tried to make it appealing to the eye of a C++-programmer. But
that pretty much is it.
No, it is a language that forbids almost everything from C++ which
could be dangerous, and at the same time reimplements some of those
features "under the hood": E. g. no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

You are confusing things here. That you can't implement your own string
derived class has to do with java.lang.String being final - something I
grief about, too. But nothing with operator overloading of + for _all_
objects that support toString()....

Yes, Java lacks operator overloading, and that is a pity sometimes. But
getting productive with it is certainly in between python and C++, and not
below.

Diez
 
B

Bjoern Schliessmann

Diez said:
What do you mean by "from dumbness"?

It didn't originate from the "dumbness" area of my brain (== it
wasn't my honest opinion). It was meant satirical.
And in context of somebody seeking enlightment regarding java,
it's especially unhelpful and confusing I think. Which was the
reason for my post.

I understand.
So what? Either you talk about Java here, then name it and prove
these points, or not, then where is the relevance of that
statement to this discussion?

Again, it wasn't meant as honest and true argument. I'd better try
not to try be funny.
For example: the overloading of assignment operators, casting
operators, copy constructors and the like that, and the fact that
one of them is possibly chosen in absence of the other.

Isn't the overloading concept an effect of type strength? In Java,
you'd have to overload them too. Or am I missing something?
The subtle differences between pointers and references.

That's an issue, though you don't have to use them both. Kind
of "historically grown".
Ahh, not to forget the joys of slicing through non-virtual
copy-constructors. And while we are talking about it: virtual - a
keyword with a great deal of meanings....

ACK.
Missing definition of static initializer order, at least for some
binary formats.

Didn't come across this one though.
I could continue for some while...

Okay, I got it :)
Even weirder? Care to explain?

Example:

int spam = 5;

but

String eggs = new String();

The latter seems totally unnecessary to me, as well as being too
verbose -- why couldn't they go the simple way as in Python and
just state

String eggs;

-- is it because in C++ it'd mean something different?
While they _did_ choose some
unneccessary syntactic crud to stay in, even though it isn't
needed (e.g. the superfluous new-keyword), I don't see a lot of
things like ::, ->, virtual, =0 and so on.
ACK.

Not to mention struct and friend of course.

Mh, struct seems to be an ancestor from C and being kept for
compatibility reasons (like many other stuff in C++
though). "friend"? Mh, nice to have, I once needed it. But anyway,
I like the Python way (don't forbid anything) better.
Yes, they tried to make it appealing to the eye of a
C++-programmer. But that pretty much is it.

That's a wrong decision, IMHO. A new and practical language (what
Java wanted to be) shouldn't provide 3/4-compatible syntax, but be
clear, concise and customizable, and shouldn't say "That's bad, you
mustn't do that."
You are confusing things here. That you can't implement your own
string derived class has to do with java.lang.String being final -
something I grief about, too.

That's not exactly my point. What if I just wanted to build my own
interface compatible class ... impossible.

For a start, it just doesn't look pretty ...

String ham;

ham = "1" + "2";

.... is translated to ...

ham = new StringBuffer().append("1").append("2").toString()
But nothing with operator overloading of + for _all_ objects that
support toString()....

Yes, Java lacks operator overloading, and that is a pity
sometimes.

And that was a clear design decision that is defended as "groovy"
until today.

Another funny thing are those awkward wrapper classes, but that's
been "patched" in an awkward way with 1.5 IIRC.
But getting productive with it is certainly in between python and
C++, and not below.

May in parts depend on the scenario, but ACK.

Regards,


Björn
 
D

Dennis Lee Bieber

C++ has a lot of wicked, complicated features like overloadable assignment
statements and so on, misses GC, and is in general semantically very
overloaded. All that make programming it a real PITA, as you permanently
are at risk loosing your feet through self-inflicted gun-shot-wounds.
Sounds like a natural opening for:

http://www.reed.edu/~tuckers/jokes/foot.html
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
B

Ben Finney

Bjoern Schliessmann said:
E. g. [in Java there is] no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Definitely? That one strikes me more as sarcasm.

It would have been "irony" if, in attempting to combat operator
overloading, you instead demonstrated by your very efforts that it was
essential and beneficial.

(Yes, everything Alanis Morrissette complains of in her song "(Isn't
It) Ironic" is not at all ironic, but is merely unfortunate. There's a
possibility she was aware of this:
<URL:http://en.wikipedia.org/wiki/Ironic_(song)#Lyrics_controversy>)

(good sigmonster, have a cookie)
 
D

Dan Bishop

Diez B. Roggisch wrote: ....
because [Java] wanted to be new and good but took over much of C++'s
syntax and made it even weirder,
Even weirder? Care to explain?Example:

int spam = 5;

but

String eggs = new String();

The latter seems totally unnecessary to me, as well as being too
verbose

It is! All you have to write is

String eggs = "";

Unfortunately, the other object types don't have literals.
why couldn't they go the simple way as in Python and
just state

String eggs;

-- is it because in C++ it'd mean something different?

Can't be, because Java already uses the syntax for something different
than C++.
 
T

Theerasak Photha

Bjoern Schliessmann said:
E. g. [in Java there is] no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Definitely? That one strikes me more as sarcasm.

It would seem very few people know the definition of either word.
(Yes, everything Alanis Morrissette complains of in her song "(Isn't
It) Ironic" is not at all ironic, but is merely unfortunate. There's a
possibility she was aware of this...

True. In almost every wedding I have ever been to, it was pissing rain.

-- Theerasak
 
B

bryan rasmussen

E. g. [in Java there is] no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Definitely? That one strikes me more as sarcasm.

Well irony originally started out as a very specific concept of the
Ancient Greek drama, this is what we nowadays refer to as Dramatic
Irony but it is the original irony. Irony then became a literary
concept for plot elements similar to Dramatic irony in books, or a
weaker type of the Dramatic irony found in the plays of Shakespeare.
People then noticed that life was at times ironic in the literary
manner. Nowadays the use of the word irony has degenerated to by
pretty much synonymous with sarcasm.

Cheers,
Bryan Rasmussen
 
S

Steve Holden

bryan said:
E. g. [in Java there is] no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Definitely? That one strikes me more as sarcasm.

Well irony originally started out as a very specific concept of the
Ancient Greek drama, this is what we nowadays refer to as Dramatic
Irony but it is the original irony. Irony then became a literary
concept for plot elements similar to Dramatic irony in books, or a
weaker type of the Dramatic irony found in the plays of Shakespeare.
People then noticed that life was at times ironic in the literary
manner. Nowadays the use of the word irony has degenerated to by
pretty much synonymous with sarcasm.
.... in America. It's well-known among Brits that Americans don't
understand irony. They can be pretty oblique when it come to sarcasms
too, for that matter.

regards
Steve
 
T

Theerasak Photha

... in America. It's well-known among Brits that Americans don't
understand irony. They can be pretty oblique when it come to sarcasms
too, for that matter.

Ford Prefect: "What?"

-- Theerasak
 
B

bryan rasmussen

bryan said:
E. g. [in Java there is] no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Definitely? That one strikes me more as sarcasm.

Well irony originally started out as a very specific concept of the
Ancient Greek drama, this is what we nowadays refer to as Dramatic
Irony but it is the original irony. Irony then became a literary
concept for plot elements similar to Dramatic irony in books, or a
weaker type of the Dramatic irony found in the plays of Shakespeare.
People then noticed that life was at times ironic in the literary
manner. Nowadays the use of the word irony has degenerated to by
pretty much synonymous with sarcasm.
... in America. It's well-known among Brits that Americans don't
understand irony. They can be pretty oblique when it come to sarcasms
too, for that matter.

is that '....in America' meant to be an addendum to what I said, as in
this is the situation in America and not elsewhere? If so I should
probably point out that I am writing from Denmark and was thinking
specifically of a situation where a dane told me they were being
'ironic' (when what they meant, obviously, was that they were being
ironical), when I asked what they meant by that they said "saying the
opposite of what I mean" I responded: "so, in other words, what you
mean by irony is 'sarcasm'" She responded "yes, that's what it means"

She had a degree in communications. I also know a few number of brits.
The quality of their wit is not as yet so rarified that I must strain
after its meaning.

Cheers,
Bryan Rasmussen
 
S

Steve Holden

bryan said:
bryan said:
E. g. [in Java there is] no operator overloading, but "+"
concatenation of strings. What if you'd like to implement your own
string-derived class? Ah, never mind. Operator overloading is
bad(tm) ;) <= Irony, definitely

Definitely? That one strikes me more as sarcasm.

Well irony originally started out as a very specific concept of the
Ancient Greek drama, this is what we nowadays refer to as Dramatic
Irony but it is the original irony. Irony then became a literary
concept for plot elements similar to Dramatic irony in books, or a
weaker type of the Dramatic irony found in the plays of Shakespeare.
People then noticed that life was at times ironic in the literary
manner. Nowadays the use of the word irony has degenerated to by
pretty much synonymous with sarcasm.

... in America. It's well-known among Brits that Americans don't
understand irony. They can be pretty oblique when it come to sarcasms
too, for that matter.


is that '....in America' meant to be an addendum to what I said, as in
this is the situation in America and not elsewhere? If so I should
probably point out that I am writing from Denmark and was thinking
specifically of a situation where a dane told me they were being
'ironic' (when what they meant, obviously, was that they were being
ironical), when I asked what they meant by that they said "saying the
opposite of what I mean" I responded: "so, in other words, what you
mean by irony is 'sarcasm'" She responded "yes, that's what it means"
Well, my assertion about America clearly doesn't preclude to possibility
of confusion on the part of the Danish too :). You are right about the
general degradation of the (understanding of the) meaning of irony.
People are just too damned sloppy with language nowadays.
She had a degree in communications. I also know a few number of brits.
The quality of their wit is not as yet so rarified that I must strain
after its meaning.
A degree in communications sadly does not necessarily require complete
terminological exactitude. There's nothing wrong with being funny but
obvious <0.8 wink>

regards
Steve
 
M

Max M

bryan rasmussen skrev:
is that '....in America' meant to be an addendum to what I said, as in
this is the situation in America and not elsewhere? If so I should
probably point out that I am writing from Denmark and was thinking
specifically of a situation where a dane told me they were being
'ironic' (when what they meant, obviously, was that they were being
ironical), when I asked what they meant by that they said "saying the
opposite of what I mean" I responded: "so, in other words, what you
mean by irony is 'sarcasm'" She responded "yes, that's what it means"


Are you an american?

Irony does mean that one says the opposite of what one really means.

If you do it for humor its irony, if you do it for mocking it is sarcasm.

So now I see... americans really *do* understand irony.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top