What does this mean??

T

Thomas G. Marshall

Dave Glasser coughed up:
The big difference is that you have no choice whether or not the
Sunday driver impacts your life by wasting your time, whereas you do
with errant posters.

Correct. And a few people here are trying to pretend that it ruins
everyone's experience in usenet to have newbies post in a forum where some
think only advanced people should be.

If you're advanced, and you see a question you feel is beneath you, then try
ignoring it.
 
I

isamura

: isamura wrote:
: > :
: > : : > : >
: > : > Rectangle alloc = (a instanceof Rectangle) ? (Rectangle) a :
: > : > a.getBounds();
: > : >
: > : > Could someone translate the above code into simple java codings so i can
: > : > understand it
: > :
: > : Rectangle alloc ;
: > : if (a instanceof Rectangle) alloc = (Rectangle) a;
: > : else alloc = a.getBounds();
: > :
: >
: > I didn't think this seemingly innocent question would stir up such lively reactions...
: >
: Nor should it!
:
: > Actually I appreciate this helpful and more direct response. However, the question does bring up
: > some interesting points (for me anyway).
: >
: > 1. I don't see the benefits of using the first form syntax, in terms of code maintenance and
: > readability.
: >
: For the example in the original post, I agree with you here.
: However, other times, I find the short hand quite useful. Consider
: trying to find the absolute value of an integer, i:
:
: final int abs = i > 0 ? i : -i;
:
: I think this is nicer than the alternative:
: final int abs;
: if (i > 0) {
: abs = i;
: }
: else {
: abs = -i;
: }
:
: or even the more compect
: final int abs;
: if (i > 0) abs = i;
: else abs = -i;
:
The following would also work,

final int abs = i;
if (i < 0) abs = -i;

I will check the docs but for abs, it might be better if the following is available,

final int abs = i.abs(); // or perhaps Integer.abs(i);

: > 2. Why two forms that says the same thing? Perhaps the javac has an inferior complex and feels
: > better that it can process a more "advanced" form syntax <grin>?
: >
: A lot of programming language syntax is redundant. 'for' loops can
: be expressions using 'while', but both are useful. I guess it's
: all about giving the programmer options. If you don't like one
: way, you can do it another.
:
I don't agree completely here since both for and while have their specific uses, whereas the if
syntax forms don't.

..K
 
T

Thomas G. Marshall

Gordon Beaton coughed up:
That is just one of many possible logical distinctions, and judging
from the posts in both groups, not necessarily one that's obvious to
everyone.

Nope, it isn't. And nor should it be. /Particularly/ when you take into
account that the explanations I showed are the ones that many news servers
give for descriptions when the user is subscribing to the groups in the
first place.

The division between cljh and cljp is IMO unfortunate and
unsuccessful.

Did you mean that the division is /unfortunately/ unsuccessful, or that the
division was unfortunate. If I had my druthers I would probably have wanted
the following:

comp.lang.java catch-all
comp.lang.java.beginners noobs
comp.lang.java.advanced advanced
comp.lang.java.lesbians just 'cause

;) All but the last one are serious.
 
T

Thomas G. Marshall

Roedy Green coughed up:
I disagree. Not everyone has to jump on every infraction, but you
should not let all infractions pass.

Infractions??? I thought you just got done saying it was an anarchy. You
are trying to have it both ways!
 
Z

zero

: > 2. Why two forms that says the same thing? Perhaps the javac has an
: > inferior complex and feels better that it can process a more
: > "advanced" form syntax <grin>?
: >
: A lot of programming language syntax is redundant. 'for' loops can
: be expressions using 'while', but both are useful. I guess it's
: all about giving the programmer options. If you don't like one
: way, you can do it another.
:
I don't agree completely here since both for and while have their
specific uses, whereas the if syntax forms don't.

.K

What specific use do you see for a for loop, that couldn't be just as easily done
with a while loop? Or, an even more obvious example, why would a programming
language need do...while? And to draw it into the absurd, why do you need the *
for multiplication? You could just as well do it with a for - sorry, I meant
while :p - loop using only addition. In fact, if I'm not mistaken that's what
happens internally in the CPU anyway.

All these questions have the same answer: programmer convenience.
 
Z

zero

You just killed your own argument. "This is a public newsgroup so you
can expect all types of characters here." INCLUDING NEWBIES.

Including people who don't know the netiquette.

Please don't shout.
 
G

Guest

zero said:
Including people who don't know the netiquette.

Please don't shout.

Well, what shall I say? *Please don't be an idiot* ???

There's nothing wrong with his post and obviously you don't know what
shouting on usenet means...
 
Z

zero

Well, what shall I say? *Please don't be an idiot* ???

There's nothing wrong with his post and obviously you don't know what
shouting on usenet means...

In the last 6 months I see 4 posts by "Moloch". Exactly 4 (yes, that's
100%) of those are disrespectful to regular posters. Exactly 0 (that's 0%
this time) are helpful or relevant to the thread in which they were posted.
You'll forgive me if I disregard anything you say from now on. Actually,
I'm pretty sure you won't, but - excuse my language - I don't give a rat's
ass.

It is not very wise to call someone of whom you know nothing an idiot.
Interestingly, I have only been called that by people who never actually
talked to me or read more than a few words I wrote.

The internet (that includes usenet) equivalent of shouting is writing in
all caps. Usually this refers to complete messages or sentences, but I
think it more than applies in the "including newbies" statement above.

It will be very hard for you to gain my respect.
 
T

Thomas G. Marshall

zero coughed up:

....[rip]...
The internet (that includes usenet) equivalent of shouting is writing in
all caps. Usually this refers to complete messages or sentences, but I
think it more than applies in the "including newbies" statement above.

In usenet I'm never quite sure of when someone is genuinely bothered by
something or complaining about it merely because he thinks he has a right
to. The latter phenomenon is actually apropos to much of what I am battling
against in this thread in general.

To your point: I'm not sure I see the particular difference between:

INCLUDING NEWBIES!
*Including Newbies* !
<shout>Including Newbies!</shout>

I've been aware of such netiquette for eons, but don't fully agree that my
example exclamations are over the top.

In any case, I apologize if it bothered you.
 
Z

zero

zero coughed up:

...[rip]...
The internet (that includes usenet) equivalent of shouting is writing
in all caps. Usually this refers to complete messages or sentences,
but I think it more than applies in the "including newbies" statement
above.

In usenet I'm never quite sure of when someone is genuinely bothered
by something or complaining about it merely because he thinks he has a
right to. The latter phenomenon is actually apropos to much of what I
am battling against in this thread in general.

To your point: I'm not sure I see the particular difference between:

INCLUDING NEWBIES!
*Including Newbies* !
<shout>Including Newbies!</shout>

Personally I believe the difference is that caps make it harder to read
messages - and that's the general concensus I've seen in a lot of places.
That's why they bother me, while the other forms do not.
I've been aware of such netiquette for eons, but don't fully agree
that my example exclamations are over the top.

I don't think it was over the top, it just bothered me somewhat. My
reply was simply meant to be a request not to use all caps.
I suppose it's just one of my pet peeves.
In any case, I apologize if it bothered you.

It did, but it's not a big deal. Not something you explicitly need to
apologize for, although it is of course appreciated.

And I in turn would like to apologize if I sounded like I was berating
you.

Contrary to the other person, I do respect you.
 
G

Guest

zero said:
In the last 6 months I see 4 posts by "Moloch". Exactly 4 (yes, that's
100%) of those are disrespectful to regular posters. Exactly 0 (that's 0%
this time) are helpful or relevant to the thread in which they were
posted.
You'll forgive me if I disregard anything you say from now on. Actually,
I'm pretty sure you won't, but - excuse my language - I don't give a rat's
ass.

What shall I say? *good research*???
It is not very wise to call someone of whom you know nothing an idiot.
Interestingly, I have only been called that by people who never actually
talked to me or read more than a few words I wrote.

I never called you an idiot. Read my message again.
The internet (that includes usenet) equivalent of shouting is writing in
all caps. Usually this refers to complete messages or sentences, but I
think it more than applies in the "including newbies" statement above.

Nope, you're just totally wrong about the "including newbies" statement,
hence my post...
It will be very hard for you to gain my respect.

Who the **** are you? :->
 
R

Rhino

Roedy Green said:
That reminds me when we were kids we had a Scottish relative come for
a visit. She tried to explain to us we had a Canadian accent. We were
skeptical. We asked her to talk in a Canadian accent. She did. We all
burst out laughing -- you're just talking "normally" we claimed
triumphantly, surprised she could do it when she put her mind to it.

Hugh Laurie, the actor who plays House, the diagnostic puzzle TV Show,
is a Brit who affects an American accent for the role.
He's far from the only actor to do that! Just think about Meryl Streep, who
seems to be able to do just about any accent she wants, often without even
knowing the language whose accent she is imitating! For instance, in
Sophie's Choice (or one of the other Holocaust-themed films she did, I can't
recall for sure) she was speaking German. I asked a native German speaker
how good her German was and was told it was "absolutely perfect". Yet, as
far as I know, Streep never spoke German before doing that film.

Other examples like Hugh Laurie are Anthony LaPaglia, who did an
excellent-sounding British lower class accent in Frasier - is actually
Australian, as is his current costar Poppy Montgomery, while the black woman
who is their other costar (her name escapes me) is British, yet all three
sound entirely American in the show.
I love asking people about their accents which I find endlessly
fascinating. So often when I ask "What other languages do you speak
besides English" the answer is "none". Accents are not always caused
by learning some other language first.
Of course not! Unilingual people all have accents too. Basically, they sound
like the other people around them when they were growing up. More narrowly,
it's probably the predominant way of speaking they heard when they were
learning to speak themselves.

I was once introduced to a guy in his thirties who had recently emigrated to
Canada from England. I took a wild guess that he was from Liverpool; his
speech reminded me very much of the old Beatles cartoons. It turned out that
he'd lived all over England, never staying in one place for more than a year
or so. He had, however, lived in Liverpool for about a year when he was
three. He remarked that anyone who ever met him always assumed he was a
lifelong Liverpudlian; I'm not sure if that "everyone" included Brits and
Canadians or just Canadians.
It is fun to be able to place people right to the city or to tell a
person what countries they have lived in. One of the fun ones its to
tell a Chinese person whose second language is English the nationality
of his original English teacher. It seems like some sort of ESP. I
went nuts on my visit to England asking people about their accents.
All the regional accents are so distinctive. There it is no great
skill to tell exactly where someone is from.
Another interesting phenomenon is the double accent. For instance, I once
met a met who had grown up in Italy, as an Italian-speaker, then moved to
Australia and lived there for 20 or more years. His speech was a very
curious blend of English with large amounts of both Italian and Australian
influence. It's very hard to write this down or imagine it in your mind but
you might come close if you say something like "Whatsa-the-matta-fo-you,
mate?" (Forgive the stereotypes!)

Rhino
 
R

Roedy Green

1. I don't see the benefits of using the first form syntax, in terms of code maintenance and
readability.

It takes fewer keystrokes. Keep your eye out for the places Sun uses
it. You might use it like this:

String message = "Please put the apple" + (appleCount> 0 ? "s":"") +
" on the table.";

In the IF syntax you would write that perhaps as:

String message = "Please put the apple";
if (appleCount > 0 )
{
message "= "s";
}
message += " on the table.";

The ternary syntax has the following advantages.

1. it suggest the logic is for some trivial adjustment, not something
profoundly relevant to the algorithm.

2. it can fit on one line instead of six.

3. it causes one StringBuffer to be created instead of two in byte
code.

4. You can tuck it in the middle of an expression. You can avoid
creating extra variables or repeating code.

The biggest problem with it is newbies can't read it. Once you get
used to it though, it is no harder to read than an IF.

The second biggest problem is both true and false are converted to
common type before assignment. That does not happen with IF.
 
R

Roedy Green

her German was and was told it was "absolutely perfect".

The topic police will pounce soon, so let me get this story in.

My younger brother has a knack for accents. He discovered that during
the era of the Beatles that a Liverpudlian accent would drive girls
wild. He even got my Mom affecting one to maintain the charade.
 
R

Roedy Green

Accents are not always caused
Of course not!

The surprise is mostly is listening to people from Africa with English
as a first language. Those accents are so different from European
ones.
 
T

Thomas G. Marshall

Rhino coughed up:
He's far from the only actor to do that! Just think about Meryl Streep,
who
seems to be able to do just about any accent she wants, often without even
knowing the language whose accent she is imitating! For instance, in
Sophie's Choice (or one of the other Holocaust-themed films she did, I
can't
recall for sure) she was speaking German. I asked a native German speaker
how good her German was and was told it was "absolutely perfect". Yet, as
far as I know, Streep never spoke German before doing that film.

Other examples like Hugh Laurie are Anthony LaPaglia, who did an
excellent-sounding British lower class accent in Frasier - is actually
Australian, as is his current costar Poppy Montgomery, while the black
woman
who is their other costar (her name escapes me) is British, yet all three
sound entirely American in the show.

Of course not! Unilingual people all have accents too. Basically, they
sound
like the other people around them when they were growing up. More
narrowly,
it's probably the predominant way of speaking they heard when they were
learning to speak themselves.

I was once introduced to a guy in his thirties who had recently emigrated
to
Canada from England. I took a wild guess that he was from Liverpool; his
speech reminded me very much of the old Beatles cartoons. It turned out
that
he'd lived all over England, never staying in one place for more than a
year
or so. He had, however, lived in Liverpool for about a year when he was
three. He remarked that anyone who ever met him always assumed he was a
lifelong Liverpudlian; I'm not sure if that "everyone" included Brits and
Canadians or just Canadians.

Another interesting phenomenon is the double accent. For instance, I once
met a met who had grown up in Italy, as an Italian-speaker, then moved to
Australia and lived there for 20 or more years. His speech was a very
curious blend of English with large amounts of both Italian and Australian
influence. It's very hard to write this down or imagine it in your mind
but
you might come close if you say something like "Whatsa-the-matta-fo-you,

My wife had a master's degree in Slavic Linguistics. Her graduate studies
were in Virginia. There were many students there with a Russian/southern-us
accent. Horrible.
 
R

Roedy Green

Correct. And a few people here are trying to pretend that it ruins
everyone's experience in usenet to have newbies post in a forum where some
think only advanced people should be.

An ant won't ruin your picnic, but being overrun with grasshoppers
will.

It as a form of tidiness, keeping things in their place. People range
in attitudes from slob to sock Nazi. You find the same range on the
newsgroups.

We are living out here the conflict between Oscar and Felix.
 
R

Roedy Green

Infractions??? I thought you just got done saying it was an anarchy. You
are trying to have it both ways!

In an anarchy there is no official authority, but that does not stop
people from trying to control each other's behaviour or creating
standards of acceptable conduct.

Another way of looking at it is the authority is distributed.

Things tend to settle into consensus over time, so you have peer
pressure enforcing suitable conduct.

On the whole it works pretty well.
 
R

Roedy Green

Nope, it isn't. And nor should it be. /Particularly/ when you take into
account that the explanations I showed are the ones that many news servers
give for descriptions when the user is subscribing to the groups in the
first place.

How do you think we should use the two newsgroups?
 
R

Roedy Green

Right. So all the newbies who post here are running these as well. The
denizens here have no authority nor high ground to stand on even informally.
Not even informally!

They are part of "we" too.

By we I mean the people using this newsgroup.

It has to work for nearly everyone.
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top