Why doesn't Integer have a setValue(int i), and is there a way of changing its value.

H

Harald Hein

natG said:
In today's day and age, where [almost] every one has NewsReader
software that maintains the thread anyhow, I would do away with
quoting altogether.

Well, since messages are not supposed to be delivered in order of the
posting date to every place in the world, and since messages get
sometimes lost, it helps to provide a little bit of context to avoid
misunderstandings.

It also helps to make it clear what you are answering to if there are
multiple questions or issues in one posting.
 
N

natG

Doug Pardee said:
I probably should have used the less technical term 'sharable' instead
of 'aliasable'. I shall do that here.

I still am missing something fundamental. Let's see...
If an object is both mutable and sharable, then it must be understood
by all of the code that uses the object that the object's value is
unstable; it might be affected by other code elsewhere. If the object
is shared between threads, the object's value might change even in the
middle of a statement that is using it, such that "i.equals(i)" cannot
even be guaranteed to be true.

Ok. That's why we have sync keyword...
When we work with values, we expect them to hold still. There are two
ways of guaranteeing this. Either we make value objects unsharable, or
we make them unchangeable.
Even if its unchangeable, I can still have the variable that points to it, point
to a new object, and the code that looks at the variable will be 'confused'
anyhow. If a = new Integer(10), and somewhere the funny code sais a = new Integer
(20), other code elsewhere can be real confused if it does a.toString (or any
getXX method).
It is okay to change unshared objects; for instance, there is no way
that changing the value of an int variable can possibly affect the
value of any other int variable, because ints are always copied and
never shared.

So, if we have:
int j = 2;
someScaryObject.someScaryMethod(j);
if (j == 2)
[do something]
we can be assured that the 'if' will ALWAYS be true because we only
share *copies* of the value of j. The variable itself is never shared.
The only way that the value of j will change is if we change it
ourselves.

But if you are afraid that some nut will change the value in another thread, then
can't another thread also change int j right in the middle of a for/while loop in
this thread that is counting j. In other words, the same concern applies as by a
mutuable object.
Similarly, it is okay to share immutable objects; there is no way that
changing a String variable can possibly affect the value of any other
String variable, because you can't change the String variable in the
first place.

So, if we have:
String s = "Hello world";
someScaryObject.someScaryMethod(s);
if (s.equals("Hello world"))
[do something]
we can be assured that the 'if' will ALWAYS be true no matter who we
share the object referenced by s with, because there is no way that
anyone can mess with the value of the String object that s references.
The only way that the value of s will change is if we change it
ourselves.

Again, although I understand, my point is that if you are concerned about mucky
code, the same applies to this. Can't another thread screw it with "s = new
String("Bye World")". So, we rely on safe methods and syncronizing, well that can
apply to everything, no?
Let's see if I can make a passable example as to why this is
important...

Consider a bank Account, which has a balance of type Money:
public class Account {
public Money balance;
}

[in some method somewhere]
Account acct = [get Account object from somewhere]
Money oldBalance = acct.balance;
doSomething(acct);
if (acct.balance.equals(oldBalance)
[do some interesting stuff]

When we get to the 'if' statement, we assume that the variable 'acct'
still points to the same Account object, and that it contains the
LATEST account balance. On the other hand, we assume that 'oldBalance'
contains the ORIGINAL account balance. We are assuming that if the
balance is updated, the Account object is changed but the Money object
is not.

Money is a value type; Account is not. The rules (semantics) for them
are fundamentally different.

-nat
 
B

Brian Palmer

natG said:
In today's day and age, where [almost] every one has NewsReader software that
maintains the thread anyhow, I would do away with quoting altogether.
-nat

There are folk who seem to read almost every message in this
newsgroup, and answer many of the questions. For every new message
they read, you want them to read the previous message too? THat'd
double the time it takes them to read just this group!

I don't read every message on this group, but I do follow ~170
newsgroups at various stages of involvement. On a busy day, I'll read
thousands of messages. I *need* some context to remind me of what's
going on.
 
L

Lee Fesperman

Brian said:
natG said:
In today's day and age, where [almost] every one has NewsReader software that
maintains the thread anyhow, I would do away with quoting altogether.
-nat

There are folk who seem to read almost every message in this
newsgroup, and answer many of the questions. For every new message
they read, you want them to read the previous message too? THat'd
double the time it takes them to read just this group!

I don't read every message on this group, but I do follow ~170
newsgroups at various stages of involvement. On a busy day, I'll read
thousands of messages. I *need* some context to remind me of what's
going on.

Thanks, Brian. I'm getting a little tired of 'attitude' towards people trying to help,
who are just asking for some simple netiquette.
 
N

natG

Brian Palmer said:
natG" said:
In today's day and age, where [almost] every one has NewsReader software that
maintains the thread anyhow, I would do away with quoting altogether.
-nat

There are folk who seem to read almost every message in this
newsgroup, and answer many of the questions. For every new message
they read, you want them to read the previous message too? THat'd
double the time it takes them to read just this group!

Although you make valid points, imho, they are debatable and might boil down to
personal taste.
First, there is a difference of quoting the point one is addressing, and simply
quoting everything automatically 'carte blanche'. Now...
1. For the folk reading all, and really involved (my humble respect!), what
difference does it make if they read the previous message quoted within the
current message (they are still reading it!) or read the previous message via
software that graphically links the messages, and tracks read/unread messages. Ok.
That's debatable. It might be easier and faster to read the previous message
*clean (no quotes)*, than reading broken quoted lines.
And when it gets into double>>triple>>>quadrouple>>>> quotes.. gimme a break.
Simply click the mouse on the message you want to see *cleanly*.
I don't read every message on this group, but I do follow ~170
newsgroups at various stages of involvement. On a busy day, I'll read
thousands of messages. I *need* some context to remind me of what's
going on.
One mouse-click will give you that context. As opposed to multiple layers of 'so
and so wrote, 'so and so wrote', so and so wrote'''.

170 newsgroups! Wow!!

And again, my first point here, I do understand the need (um..convenience) to
quote a point I am addressing.

-nat
(my first on-line conversation was on Compuserve in very early 80's with a $450.00
Hayes 300baud modem!)
 
H

Harald Hein

natG said:
Although you make valid points, imho, they are debatable and might
boil down to personal taste.

No, they are established standards. You significantly reduce your
chance to get an answer and/or be taken serious if you violate them.
And that's all to say about them.
 
B

Bent C Dalager

Not even then. It would be unethical, an immoral, it would maybe
(IANAL) violate a bunch of laws (interference with telecomunication,
copyright, altering of electronic data), but it would not be
censorship. Censorship is by definition

- the act of a government(!) or someone acting on behalve of
a government(!)

- of checking publications, theatre plays, movies, music, and
other works of art

- if they or parts of them violate some moral, political, religious
or other defined or implied standards or codes, and

- and the government prohibit publication, performance,
distribution of parts of the work or the work in total.

Non of this applies to newsgroup postings.

Censorship is censorship even if it's done by a non-governmental
organisation. A newspaper can censor its contents, and, indeed, it
does. The only difference between governments and non-government orgs
is that if the government does it and this happens to be the US
government, then it's unconstitutional.

Cheers
Bent D
 
J

Joseph Dionne

Bent said:
Censorship is censorship even if it's done by a non-governmental
organisation. A newspaper can censor its contents, and, indeed, it
does. The only difference between governments and non-government orgs
is that if the government does it and this happens to be the US
government, then it's unconstitutional.

Cheers
Bent D

First note that I made no snips. Second, if every conversation had to
include the conversations that lead up to the current conversation, then
more time would be spent wading through what all have already heard, and
very likely any new content would loose it's impact.

I think trimming conversations in newsgroups is not censorship, but
improved clarity -- compressing down into the few words that to which we
wish to discuss.
 
N

natG

Harald Hein said:
No, they are established standards. You significantly reduce your
chance to get an answer and/or be taken serious if you violate them.
And that's all to say about them.

The style of your post, this very post, makes my point clear. This is exactly what
I meant.
Anyhow, from my part, all the quoting is automatic. I don't mind quoting 20 levels
deep.
-nat
 
R

Roedy Green

. For the folk reading all, and really involved (my humble respect!), what
difference does it make if they read the previous message quoted within the
current message (they are still reading it!) or read the previous message via
software that graphically links the messages, and tracks read/unread messages.

First we are often debating with people who are mentally deranged, and
it would be quite a struggle for them to learn those features of the
newsreader. I have proposed a technological solution to quoting that
gets solves several problems:

1. allows compact quoting.
2. makes it impossible to misquote
3. makes it impossible to quote out of context
4. makes it easy to see the full context of any quote, and quotes
within quotes

see http://mindprod.com/projmailreadernewsreader.html
 
R

Roedy Green

Anyhow, from my part, all the quoting is automatic. I don't mind quoting 20 levels
deep.

I find myself ignoring any post that does not get to the point within
one page.
 
N

natG

Roedy Green said:
First we are often debating with people who are mentally deranged, and
it would be quite a struggle for them to learn those features of the
newsreader. I have proposed a technological solution to quoting that
gets solves several problems:
I think its simply hard-core oldtimers with an atittude. "I have been doing this
for 20 years! You whippersnapper! Don't tell ME how to read newsgroups! Remember
the time when anyone with an email address @aol.com was mocked and ignored?
AOL?Ha! You don't have a real isp! (Personally I *somewhat* think so too<g>.)
Now, some fancy newcomers are going to shove this baby newsreader software down
our throats! They don't realize that this multi-level of quoting is a fallback to
the days when artiicles were posted serially with no way of tying em together.
Anyhow...in reality I don't care what newsreader the gentlemen that takes the time
to help me out, uses - or how he/she quotes.
1. allows compact quoting.
2. makes it impossible to misquote
3. makes it impossible to quote out of context
4. makes it easy to see the full context of any quote, and quotes
within quotes

see http://mindprod.com/projmailreadernewsreader.html

Roedy, to be honest, I think that page is at least a year ahead of our time.
Currently it *seems* like overkill.
-nat
 
B

Bent C Dalager

First note that I made no snips. Second, if every conversation had to
include the conversations that lead up to the current conversation, then
more time would be spent wading through what all have already heard, and
very likely any new content would loose it's impact.

I'm not sure what you're trying to say.
I think trimming conversations in newsgroups is not censorship, but
improved clarity -- compressing down into the few words that to which we
wish to discuss.

Snippage in postings doesn't worry me. I was commenting on what
censorship is and is not on a larger scale.

Cheers
Bent D
 
R

Roedy Green

Roedy, to be honest, I think that page is at least a year ahead of our time.
Currently it *seems* like overkill.

Another problem I am seeing more and more frequently on the Internet
is somebody challenges some statement. You should be able to chase the
authority chain right back to a book or website and through that
website back to the ultimate authority AS A STANDARD FEATURE.

You also want some mechanism to prevent forgery at each level.

Finally you want a mechanism, say if the ultimate source came from the
Whitehouse website, and then they dropped or changed the story, the
quotation would not be repudiated, or at least the original and the
some repudiated note would be applied to it. It should not look as if
an out of date quotation was a forgery.
 
L

Lee Fesperman

natG said:
I think its simply hard-core oldtimers with an atittude. "I have been doing this
for 20 years! You whippersnapper! Don't tell ME how to read newsgroups! Remember
the time when anyone with an email address @aol.com was mocked and ignored?
AOL?Ha! You don't have a real isp! (Personally I *somewhat* think so too<g>.)
Now, some fancy newcomers are going to shove this baby newsreader software down
our throats! They don't realize that this multi-level of quoting is a fallback to
the days when artiicles were posted serially with no way of tying em together.
Anyhow...in reality I don't care what newsreader the gentlemen that takes the time
to help me out, uses - or how he/she quotes.

What crap. Those oldtimers are the ones reading postings thoroughly, analyzing them and
providing clear and useful answers.

You're not even a shorttimer. Just a newbie who asks a question that has been asked a
hundred times before and then argues with those that answer it.

Spend a few years in the trenches and then your opinions might be worth hearing.
 
N

natG

Roedy Green said:
Another problem I am seeing more and more frequently on the Internet
is somebody challenges some statement. You should be able to chase the
authority chain right back to a book or website and through that
website back to the ultimate authority AS A STANDARD FEATURE.

You also want some mechanism to prevent forgery at each level.

Finally you want a mechanism, say if the ultimate source came from the
Whitehouse website, and then they dropped or changed the story, the
quotation would not be repudiated, or at least the original and the
some repudiated note would be applied to it. It should not look as if
an out of date quotation was a forgery.

Why not start an open source project for a Java package that would allow anyone
incorporate secure newsgroup reader into their software.

A more current and pressing issue which I need advice on is how to keep code
formatting normal in newsgroups.
 
N

natG

Lee Fesperman said:
What crap. Those oldtimers are the ones reading postings thoroughly, analyzing them and
providing clear and useful answers.

Thanks for illuminating my point!
You're not even a shorttimer. Just a newbie who asks a question that has been
asked a
A pseudo newbie to *newsgroups* said:
hundred times before and then argues with those that answer it.
Sorry. Please review the facts. I have very politely accepted any technical
answers relating to my question.
This newsgroup style issue was an issue that sort of became attached to this
thread. I didn't initiate the topic.
Spend a few years in the trenches and then your opinions might be worth hearing.
Depending what you call "the trenches". Newsgroup, Database, oop, uml, trenches?
 
N

natG

Roedy Green said:
Another problem I am seeing more and more frequently on the Internet
is somebody challenges some statement. You should be able to chase the
authority chain right back to a book or website and through that
website back to the ultimate authority AS A STANDARD FEATURE.

You also want some mechanism to prevent forgery at each level.

Finally you want a mechanism, say if the ultimate source came from the
Whitehouse website, and then they dropped or changed the story, the
quotation would not be repudiated, or at least the original and the
some repudiated note would be applied to it. It should not look as if
an out of date quotation was a forgery.
How queer. After posting the previous article, I mistakenly clicked on
comp.lang.java.announce, and the very first article has a link to a new 100% Java
based newsreader! http://radiohacker.org/jnews.html
-nat
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top