Can arrays be parameters to generics

R

Roger Lindsjö

Arne said:
zerg said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Try and read various other threads.

Lew did not post that.

Some weird guy think it is funny to supersede Lews posts
with another post with random words inserted.

Quite annoying as the news server I use actually expires the real
posting so I often only get to see the gibberish.
 
J

John B. Matthews

Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Not Lew. I haven't seen such posts 443 times since late May, because my
news reader rejects items from a certain nntp posting host in Odessa,
Ukraine. [see headers.]

Also, the ersatz posts typically display a specific kind of apahasia
called paraphasia, not that I'm calling any particular Odessan
schizophrenic:

<http://en.wikipedia.org/wiki/Paraphasia>

Finally, my personal aversion to Schadenfreude precludes dwelling on the
fake poster's grinding poverty, poor musicianship, sexual inadequacy and
general misanthropy:

<http://en.wikipedia.org/wiki/Schadenfreude>

I know I'm being insular.
 
A

Arne Vajhøj

Roger said:
Arne said:
zerg said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Try and read various other threads.

Lew did not post that.

Some weird guy think it is funny to supersede Lews posts
with another post with random words inserted.

Quite annoying as the news server I use actually expires the real
posting so I often only get to see the gibberish.

Consider alternative NNTP servers.

*And* be sure to send complaints to the relevant ISP.

Arne
 
K

kunal

zerg said:
Lew wrote:
[snip]
Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Try and read various other threads.

Lew did not post that.

Some weird guy think it is funny to supersede Lews posts
with another post with random words inserted.

Arne

I am a little lost in this whole gibberish but what I could understand
that somebody is interested in knowing if List could be slower to work
in comparision to Arrays..and IMHO, the answer is COULD BE..IT
DEPENDS!. A list, in specific ArrayList(), uses Array as underlying
data structure with initial capacity as 10 by default (this can be
changed to whatever size that you specify in new ArrayList(size)).
Whenever an item is added to the list, it is checked if the minmum
capacity of the underlying Array is breached. If it is then a new
array is created with the size as under:
int newCapacity = (oldCapacity * 3)/2 + 1;
with the values copied from the discarded array to this new one. This
leaves us with an array with more capacity than the old one. This
doesnt happen often though it is performance hit incase you dont set
the size of the ArrayList large enough.

There should NOT be any performance difference incase an ArrayList and
an Array of same size are compared.
 
T

Tom Anderson

How odd that the header for that is a misspelling of "Supersedes".

Er, (a) the header is spelled "Supersedes", so it's not a misspelling of
it, and (b), both "supersede" and "supercede" are valid spellings of that
word: it derives from the latin 'super sedere', to sit on top of, but (so
the OED tells me), in medieval latin, that was often spelled 'supercedere'
(medievals not being much good at latin, really) - indeed, the oldest
citation in the OED is to the C spelling. The S spelling is more common
now, and i would dare to say more correct, but the C spelling is not
exactly incorrect.

Also, (c) perhaps it was invented by the same plonker who came up with
HTTP's Referer header ...

tom

--
Imagine a city where graffiti wasn't illegal, a city where everybody
could draw wherever they liked. Where every street was awash with a
million colours and little phrases. Where standing at a bus stop was never
boring. A city that felt like a living breathing thing which belonged to
everybody, not just the estate agents and barons of big business. Imagine
a city like that and stop leaning against the wall - it's wet. -- Banksy
 
Z

zerg

John said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Not Lew. I haven't seen such posts 443 times since late May, because my
news reader rejects items from a certain nntp posting host in Odessa,
Ukraine. [see headers.]

Also, the ersatz posts typically display a specific kind of apahasia
called paraphasia, not that I'm calling any particular Odessan
schizophrenic:

<http://en.wikipedia.org/wiki/Paraphasia>

Finally, my personal aversion to Schadenfreude precludes dwelling on the
fake poster's grinding poverty, poor musicianship, sexual inadequacy and
general misanthropy:

<http://en.wikipedia.org/wiki/Schadenfreude>

I know I'm being insular.

This post makes barely more sense than some of Lew's recent posts.

Is this some sort of "play a prank on the new guy" thing? If so, I must
say that I am not particularly amused, and regardless, whatever is going
on here gets in the way of the nominal purpose of this newsgroup, namely
discussing Java programming.

(Now back to brushing up on the Java2D API, which I'm going to be using
heavily soon.)
 
A

Arne Vajhøj

zerg said:
Arne said:
zerg said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Try and read various other threads.

Why are you being rude to me?

That was not being rude.

I gave you some advice that would tell you why those
posts are there.
It has his name on it.

Yes.

But that does not guarantee that it is him.

The NNTP protocol is not exactly secure.

Arne
 
A

Arne Vajhøj

zerg said:
John said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Not Lew. I haven't seen such posts 443 times since late May, because
my news reader rejects items from a certain nntp posting host in
Odessa, Ukraine. [see headers.]
This post makes barely more sense than some of Lew's recent posts.

Is this some sort of "play a prank on the new guy" thing? If so, I must
say that I am not particularly amused, and regardless, whatever is going
on here gets in the way of the nominal purpose of this newsgroup, namely
discussing Java programming.

You started this off-topic sub-thread yourself. I have no
problem with that. You wanted to know what was going on. Fine.
But please do not complain over it being off-topic.

I repeat: it is not Lew making those posts.

Arne
 
Z

zerg

zerg said:
Arne said:
zerg said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Try and read various other threads.

Why are you being rude to me?

It's considered polite to check the archives before posting - that is,
as Arne said, to try and read various other threads. The subject of
the fake Lew has been discussed to death.
It has his name on it.

That means exactly squat.

Or are you talking to yourself right now? :)

sherm--
 
A

Arne Vajhøj

kunal said:
I am a little lost in this whole gibberish but what I could understand
that somebody is interested in knowing if List could be slower to work
in comparision to Arrays..and IMHO, the answer is COULD BE..IT
DEPENDS!. A list, in specific ArrayList(), uses Array as underlying
data structure with initial capacity as 10 by default (this can be
changed to whatever size that you specify in new ArrayList(size)).
Whenever an item is added to the list, it is checked if the minmum
capacity of the underlying Array is breached. If it is then a new
array is created with the size as under:
int newCapacity = (oldCapacity * 3)/2 + 1;
with the values copied from the discarded array to this new one. This
leaves us with an array with more capacity than the old one. This
doesnt happen often though it is performance hit incase you dont set
the size of the ArrayList large enough.

There should NOT be any performance difference incase an ArrayList and
an Array of same size are compared.

That is assuming that the ArrayList method calls get inlined by
the JIT compiler.

Arne
 
A

Arne Vajhøj

zerg said:
zerg said:
Arne said:
zerg wrote:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...
Try and read various other threads.
Why are you being rude to me?

It's considered polite to check the archives before posting - that is,
as Arne said, to try and read various other threads. The subject of
the fake Lew has been discussed to death.
It has his name on it.

That means exactly squat.

Or are you talking to yourself right now? :)

:)

Arne
 
S

Sherman Pendley

Arne Vajhøj said:
The NNTP protocol is not exactly secure.

Understatement of the year - possibly the decade, but it's only '08,
so there's still time. :)

sherm--
 
A

Arne Vajhøj

Searching with binary search ... as implemented in Arrays class..

inserting creating a new array using data of the binarys search
shifting all entrys afterwards..

Yes it is slower. Bit if the arrays/sets come en masse and are rather
small , may be less than 500 entrys one won't notice it that much.

Saving space by going from O(1)/O(1) to O(logn)/O(n) is not
a general solution.
This example I made is really only important to show that even if
Collections are superior usually. My experience till now was that the
reason to choose arrays over Collection (no matter if set or list or
map) were always due to storage. There has never ever been a problem
with speed for me due to collections.

If you only have 500 entries as described above then I can not
see the space matter either.
As others pointed out ArrayList has less overhead than map or set.
Yes thats true .. but sometimes you need a Set or Map and usually I use
HashSet and HashMap for this. But sometimes an array can replace those.
Especially if the key for the map is part of the Object mapped it can
easier be put into an array as one doesn't need any special Entry
objects holding key and mapped object.

In which cases can array replace Map/Set where ArrayList can not ?

Arne
 
J

John W Kennedy

zerg said:
This post makes barely more sense than some of Lew's recent posts.

A Ukrainian terrorist is forging messages from Lew, and sometimes
destroying real messages from Lew, as well. You don't have to look too
closely to tell the difference. He forges messages from several other
people here, too.
 
J

John B. Matthews

John said:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Not Lew. I haven't seen such posts 443 times since late May, because my
news reader rejects items from a certain nntp posting host in Odessa,
Ukraine. [see headers.]

Also, the ersatz posts typically display a specific kind of apahasia
called paraphasia, not that I'm calling any particular Odessan
schizophrenic:

<http://en.wikipedia.org/wiki/Paraphasia>

Finally, my personal aversion to Schadenfreude precludes dwelling on the
fake poster's grinding poverty, poor musicianship, sexual inadequacy and
general misanthropy:

<http://en.wikipedia.org/wiki/Schadenfreude>

I know I'm being insular.

This post makes barely more sense than some of Lew's recent posts.

Thank you, but I was too elliptical: as others have reiterated, the post
wasn't from Lew. The headers make this clear, but you may not have easy
access to them. Here is the original post to which you responded:

<http://groups.google.com/group/comp.lang.java.programmer/msg/983a07f25c2
78b6e?hl=en&dmode=source>

Note the line: NNTP-Posting-Host: d161-75.tenet.odessa.ua
Is this some sort of "play a prank on the new guy" thing?

No. You are a victim of another person's prank. I empathize.
If so, I must say that I am not particularly amused, and regardless,
whatever is going on here gets in the way of the nominal purpose of
this newsgroup, namely discussing Java programming.

Yes, off topic for Java, but perhaps on topic for the group that endures
the phony posts.
(Now back to brushing up on the Java2D API, which I'm going to be using
heavily soon.)

Excellent!
 
Z

zerg

Arne said:
zerg said:
Arne said:
zerg wrote:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...

Try and read various other threads.

Why are you being rude to me?

That was not being rude.

Yes, it was. You berated me for not having read something, where that
something was not either the FAQ or the freaking manual.

You also more or less demanded that I do something, without using the
word "please".

You were abrupt, rude, and dismissive.

If you don't have a higher quality reply than "try and do X", in the
future, please don't reply at all to one of my posts.
I gave you some advice that would tell you why those
posts are there.

"Read all 37,000-odd posts in this high traffic newsgroup" is not "some
advice", it's "get the hell out of my hair and quit bothering me" by
other means.

If you're THAT "bothered" by my posts, though, you can always killfile
me. That would be far better behavior than publicly insinuating that I
should have been "paying more attention in class" and far better
behavior than making brusque demands.

(And yes, insisting that I "read various other threads" without
specifying which ones amounts to insisting that I read everything posted
to the group.)

Therefore, you are wrong to criticize me for simply not knowing
something that is a) not obvious, b) not in the newsgroup's FAQ, and c)
not in any of Sun's Java documentation.

P.S. Is it my imagination, or does this newsgroup have SEVERAL people
that are prone to be unfriendly or just plain dismissive towards new
people? I seem to recall Lew behaving towards me in a manner similar to
how you just did, a week or two ago.

Perhaps if someone is impersonating him to make him look like a jackass
in public, their intent is to teach him an object lesson in getting
along with others? Though their methods certainly are deplorable.

Just because you have amassed quite a lot of knowledge about a
particular field does not mean you're God and no longer subject to the
normal rules of politeness and civilized discourse, and that people
should worship at your feet and if you step on them say "Ohh, that feels
good, abuse me some more!" ... and perhaps I'm not the only one to find
this tendency in experts to be somewhat objectionable.

A search of this group for "arne rude" turns up some rather acrimonious
fights that apparently started when you wrote things very similar to
what you did here, and got worse from there when the person you were
rude to objected strenuously enough or outright flamed you. I also
checked out "lew rude" and found somewhat fewer of the same sort of
occurrences. Then it occurred to me that "rude", by itself, would
probably do a good job of identifying people here that have a history of
being rude and getting called on it, since the word isn't used much to
actually discuss Java. Sure enough, though there was some chaff, I found
a short list of names: you, Lew, Andreas Leitgeb, Andrew Thompson, and
one or two others that are known for being abrupt at times, particularly
(but not solely) with newcomers, and for being quick to criticize and
not very diplomatic when you do so.

A random sampling of recent posts purporting to be by the people on this
list shows two of them being apparently impersonated and, in the post
headers that I've now figured out how to examine, called among other
things "arrogant megalomaniacs". They are Lew and Andrew Thompson.

Searching for "arrogant megalomaniac" and some other similar phrases,
and words like "Zionist" found in the impersonator's signature rants,
shows that so far only those two people out of everyone here are getting
this treatment.

And both have been accused of being rude by various people, and in my
judgment, based on the posts that drew those responses (as found via
Google), they actually were rude.

Coincidence? I doubt it. It rather resembles a classic case of "what
goes around, comes around".

The moral here, Arne, being "watch it, or you might be next". (Not a
threat, since it's not me doing it; just a warning.)

After this little bit of "research", I think I'll be taking extra care
to avoid offending people here myself. I know I wouldn't want to be next!
 
L

Lew

zerg said:
After this little bit of "research", I think I'll be taking extra care
to avoid offending people here myself. I know I wouldn't want to be next!

Plonk.
 
R

Roger Lindsjö

Arne said:
Consider alternative NNTP servers.

I am, but so far I have not been able to motivate the cost. It is only
the last two-three month that this Lew impersonator has become a problem.
*And* be sure to send complaints to the relevant ISP.

Well, I could do that, but the same ISP stopped me from running my own
email server. After the last merger with another ISP I suddenly only had
outgoing access on port 25 to their servers, which in turn had throttles
on size and rate. After complaining they said that it had always been
this way (ignoring my comments that I had been running my server for 5
years) and that they did it for my own good to prevent me from sending
spam by accident. So, now I no longer know if the message has been
accepted by the receiving SMTP server, only if the relaying server has
accepted it (and possibly dropped it due to rules unknown by both me and
the receiver).
 
Z

zerg

zerg said:
zerg said:
Arne said:
zerg wrote:
Lew wrote:
[snip]

Okay. Which one of you wise guys infected Lew with that Cardassian
aphasia virus? That's two posts like this and counting...
Try and read various other threads.
Why are you being rude to me?

It's considered polite to check the archives before posting

You're joking.

This newsgroup gets several hundred posts a DAY. My newsserver has tens
of thousands of posts for it. Google has literally millions.

I don't have time to read all that.

However, I am being quite serious when I say that it's considered polite
not to be so abrupt or to take an accusing or hostile tone, such as with
"Try and do X" as a response to something that wasn't of the form "how
do I get Y to happen?", simply because you've just realized that someone
has had the sheer, brazen nerve to *not know something that isn't in the
newsgroup's FAQ*.
The subject of the fake Lew has been discussed to death.

Not where I saw it. Please keep in mind that people will show up here
that are completely new to the group. Once they have done so, in a high
traffic group like this one they will read the FAQ and the threads that
interest them and ignore the rest, whether you, personally, like that or
not, and whether Arne likes that or not.

If this subject has been "discussed to death" in a long, rambling,
off-topic thread somewhere, I'm probably not the only person here who
never saw it.

Please cut newcomers some slack; they will not know esoteric things
about the people here, and will often not even know some of the more
esoteric things about Java.

P.S. YOU are on that short list of "rude people" I generated with a bit
of googling and vetting of past accusations of rudeness* in this group.
That indicates that you, as well as Arne, are at risk of getting
attacked the same way Lew apparently is**.

* After noticing that several people here are rude, and that it's one of
them that is being impersonated, I did a google search for "rude" here
and found various instances of people being told they were being rude. I
made my own judgment as to whether the post that provoked the complaint
of rudeness actually was rude, and in most cases it was. I ended up
making a list of who here has been rude and been called on it three or
more times.

** Searching for some of the stuff appearing in the impersonations of
Lew, I found similar-seeming posts purporting to be by Andrew Thompson,
who is also on the rude-people list, and no others thus far, barring
spurious matches (mostly consisting of spam).

This suggests that whoever is impersonating Lew and Andrew was offended
enough times by them and is ruthless enough to be getting some nefarious
revenge.

While I deplore their behavior, therefore, I conclude that it is not
without provocation, and I am also able to make an educated guess as to
who else is at risk here. In particular, you and Arne appear to be at
risk, though especially Arne, for whom I was able to find more than a
dozen complaints of rudeness and an absolutely amazing slugfest between
him and someone that is quite possibly in line to receive the Guinness
record for world's stubbornest man.

In fact, this newsgroup seems to have a history of violent altercations
among various people, which is passing strange given its purported focus
on Java programming. It's mostly the same group of people involved each
time, and the same ones that seem prone to newcomer-slapping. It makes
me wonder if some people come to this group not to discuss Java but to
flame one another silly, only for all of the others to have been outdone
by this Newsmaestro, or whatever you called him.
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top