Fragile Fences

V

Virgil Green

Virgil said:
Since the discussion thus far has been whether the flat file being
edited or some version squirrelled away in the bowels of Eclipse is
the "master" copy, then the "authoritative" copy I've referred to is
the "master copy. Several of us have pointed out and demonstrated
that the flat files are the "master" copy. Other than you, no one
I've seen in this thread has yet confirmed or experienced the
behavior your describe. Rather they have confirmed and experienced
exactly the opposite.


Let's not expand this to dev versus prod. Editing is done on dev
versions and that's where the discussion should be kept. The text in
RAM? That's getting a bit ridiculous... but, if you must, the
authoritative version is the version about to be typed and housed
only in the mind of the developer.


No. Several of us have reported the opposite and you continue to
posit that this behavior exists in Eclipse but none of us have been
able to reproduce the behavior you describe.

And, for your information, I just recreated the experiment you
continue to suggest and it did exactly what I expected it to do.

I create a new Project called Playland.
I added a new class called MyClass. It contained no code other than
the public class declaration.
I saved this new class.
I closed the editor.
I closed Eclipse.
I started Textpad and opened
c:\eclipse\workspace\Playland\MyClass.java.
I added one line of code - "System.out.println("This is a test");"
I saved the file in Textpad and closed Textpad.
I started Eclipse.
I set focus on the Package Explorer.
I expanded the project Playland.
I expanded the src directory.
I expanded the package I put my class in.
I double-clicked on MyClass.java.
I observed that the code entered via TextPad while Eclipse was closed
was present in the editor in Eclipse.
I left the editor open for the class in Eclipse.
I closed Eclipse.
I started Notepad and opened the same file.
I placed the code I previously added into a proper main method (having
failed to do so the first time).
I save the file in Textpad.
I closed Textpad.
I stared Eclipse.
The editor I left open when Eclipse was close was opened
automatically and it contained the new code changes I just made in
Eclipse.

That last step should have read "just made in Textpad".
 
R

Roedy Green

I've done every one you've described (however loosely), reported to you that
the results you described did not occur, and asked you to provide the exact
parameters to cause your results to be realized. Please do it. I'm sure your
capable of doing so... but for some reason must not want to. I've presented
the exact steps I used in my experiment and reported the results. Others
have done the same reported the same results I have. You really do seem to
be the odd man out here.


Just use Eclipse as it comes out the box.

experiment 1

1. set up some project with a dummy java file you are not afraid to
muck with.

2. change a java file while eclipse is shut down using a text editor.

3. start up eclipse.

4. do not press refresh.

5. examine the file.

6. see if Eclipse has its own internal old view or uses the flat
files. In other words see if your changes are there or not.

experiment 2.


1. set up some project with a dummy java file you are not afraid to
muck with.

2. shut down eclipse.

3. delete the flat file in the eclipse workspace directory.

4. fire up eclipse. See if Eclipse noticed the file missing or was
able to display it to you.

5. click restore from local history, to bring the file back to life.




--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Roedy Green

Done it. Reported it. Confirmed that the behavior you described did *not*
occur. Did you read it?

I will have to redo the experiment. Sorry I got the impression you
were refusing to do the experiment and were just asserting what the
results should be. Most people are that way.

Now I would have to explain to myself if my results are different this
time why I got he results I did earlier. I was quite puzzled by the
way my changes done outside Eclipse kept disappearing and experimented
many times until I came to that conclusion.

I suppose it is possible I was editing some other files, or copying
files to the wrong place. Anyway it is on my todo list to
investigate.



--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Roedy Green

R

Roedy Green

My error... I have repeatedly asked you to identify specifically the
"auto-refresh" feature to which you continually allude.

it is a feature I have heard about but don't know how to use. It
causes Eclipse to automatically refresh. I figured one explanation
for differing experience is some people may have that turned on.

I searched the menus. I could find nothing to turn it on. In help it
talked about writing a script to turn it on. It sounds as if it is
unlikely you could turn it on by mistake.

search for "auto-refresh" in help and you will find info on it.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
T

Tim Tyler

Roedy Green said:
it is a feature I have heard about but don't know how to use. It
causes Eclipse to automatically refresh. I figured one explanation
for differing experience is some people may have that turned on.

I searched the menus. I could find nothing to turn it on. In help it
talked about writing a script to turn it on. It sounds as if it is
unlikely you could turn it on by mistake.

search for "auto-refresh" in help and you will find info on it.

General -> Workspace -> Refresh automatically.
 
R

Roedy Green

Last time I checked, Eclipse was open source. Why don't you take a look
under the hood instead of this constant speculation and attempts to
reverse engineer it?

Big picture questions like that are the hardest things to figure out
by looking at source. That sort of thing is so obvious to everyone on
the team that nobody ever documents it. It is ever so much easier to
find out about some very specific detail.

It is a general problem. Documentation is always about the fine
points. Nobody involved with the project is uninformed enough to
recognised the obvious things that need to be said to someone coming
in cold.

The author nearly always presumes too much knowledge.

Perhaps documents should come with preconditions. You need to know X
before this will make any sense and here is where you learn about X.

for example, the genjar docs presume you are fluent in ant.

Documents also need a part written in "grandmother", that presumes as
little knowledge as possible just to let you know what the document is
for. Is it worth your while learning enough to make sense of this
document? Is this relevant to me, or some expert I might employ to
make sense of this for me?

When I work cold with somebody else's code, getting the big picture is
always what takes the most work.

It is always so frustrating when you finally figure it out, how
"obvious" it was. What was all the fuss about. It is easy to
understand ONCE you have the big picture model in your head.

When you have the wrong big picture model, code seems like a candidate
for http://mindprod.com/jgloss/unmain.html






--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
T

Tim Tyler

Roedy Green said:
experiment 2.

1. set up some project with a dummy java file you are not afraid to
muck with.

2. shut down eclipse.

3. delete the flat file in the eclipse workspace directory.

4. fire up eclipse. See if Eclipse noticed the file missing or was
able to display it to you.

5. click restore from local history, to bring the file back to life.

That experiment produces the results you claim.

However the conclusion I draw from that is that Eclipse maintains
a list of files in the project, not that it keeps copies of their
entire contents.

You can see where it does that - in the "tree" file - in:

workspace\.metadata\.plugins\org.eclipse.core.resources\.root

Eclipse also keeps backup copies of *old* files.

These are in:

workspace\.metadata\.plugins\org.eclipse.core.resources\.history

They are simple flat text files, stored in their entirity.

Many text editors have the ability to store backup copies
of old documents - AFAICS, this functionality is old hat.
 
T

Tim Tyler

Roedy Green said:
This may be a matter of semantics.

What if you never hit refresh and then hit save? This is treating
Eclipse's copy as the master.

AFAIK, there /is/ no persistent Eclipse copy - it loads file contents from
the filing system when you load Eclipse.
However, in either case, the copy that counts for Eclipse is its
internal copy, not the flat files.

You have not demonstrated the existence of a persistent internal copy
to my satisfaction.

There's a list of files in the project - and *backup* copies of *old*
files - but they don't fit your description very well.
 
R

Roedy Green

Just use Eclipse as it comes out the box.

experiment 1

1. set up some project with a dummy java file you are not afraid to
muck with.

2. change a java file while eclipse is shut down using a text editor.

3. start up eclipse.

4. do not press refresh.

5. examine the file.

6. see if Eclipse has its own internal old view or uses the flat
files. In other words see if your changes are there or not.

i just redid this and now Eclipse IS noticing the changes to the flat
files I do behind it back, even without me hitting refresh, just as
you said it would.

I did a second experiment, changing a file behind eclipse's back while
eclipse was running but not editing that file. It noticed that change
the next time I edited it.

And I don't have preferences | general | workspace | refresh
automatically turned on.

I feel like someone is playing a trick on me. I can't explain this.

I obviously concede the point, but I am trying to figure out what I
did that was making it appear as if changes were being ignored.

Does Eclipes change its behaviour after the first few days? :)

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Raymond DeCampo

Roedy said:
Big picture questions like that are the hardest things to figure out
by looking at source. That sort of thing is so obvious to everyone on
the team that nobody ever documents it. It is ever so much easier to
find out about some very specific detail.

It is a general problem. Documentation is always about the fine
points. Nobody involved with the project is uninformed enough to
recognised the obvious things that need to be said to someone coming
in cold.

The author nearly always presumes too much knowledge.

Perhaps documents should come with preconditions. You need to know X
before this will make any sense and here is where you learn about X.

for example, the genjar docs presume you are fluent in ant.

Documents also need a part written in "grandmother", that presumes as
little knowledge as possible just to let you know what the document is
for. Is it worth your while learning enough to make sense of this
document? Is this relevant to me, or some expert I might employ to
make sense of this for me?

When I work cold with somebody else's code, getting the big picture is
always what takes the most work.

It is always so frustrating when you finally figure it out, how
"obvious" it was. What was all the fuss about. It is easy to
understand ONCE you have the big picture model in your head.

When you have the wrong big picture model, code seems like a candidate
for http://mindprod.com/jgloss/unmain.html

This response is typical of the kind of thinking that started this whole
Eclipse subthread. Instead of going to see what kind documentation the
Eclipse project actually has, you make assumptions. Instead of reading
the Eclipse documentation, you make assumptions about how it works based
on observational behavior.

I am not totally discrediting the technique of learning how something
behaves via observation. However, without a clear understanding of what
the Eclipse project intended for the program to do, you do not know if
you've discovered the proper behavior or simply a bug.

Ray
 
V

Virgil Green

Roedy said:
ask the help to explain it. I am an Eclipse novice.

That was rich. on 07/14 in this thread you asked "do you have autorefresh
from flat files turned on?" which would seem to indicate that you are aware
of some particular setting. Elsewhere in this thread, and in response to one
of your posts, I specifically identified the only two auto-refresh settings
I can find in Eclipse ("Window | Preferences | Workbench | Refresh Workspace
automatically" and "Window | Preferences | Workbench | Startup and Shutdown
| Refresh Workspace on startup") and have asked you to identify the setting
to which you were alluding. I'm not sure where the setting Tim referenced as
"General -> Workspace -> Refresh automatically" is found.
 
V

Virgil Green

Roedy said:
i just redid this and now Eclipse IS noticing the changes to the flat
files I do behind it back, even without me hitting refresh, just as
you said it would.

I did a second experiment, changing a file behind eclipse's back while
eclipse was running but not editing that file. It noticed that change
the next time I edited it.

And I don't have preferences | general | workspace | refresh
automatically turned on.

I feel like someone is playing a trick on me. I can't explain this.

I obviously concede the point, but I am trying to figure out what I
did that was making it appear as if changes were being ignored.

Does Eclipes change its behaviour after the first few days? :)

I refer now to one of my favorite passages from page 68 of "Code Complete"

** quote **
One of the biggest differences between hobbyists and professional
programmers is the difference that grows out of moving from superstition
into understanding. ... If you often find yourself suspecting that the
compiler or the hardware made an error, you're still in the realm of
superstition. Only about 5 percent of all errors are hardware, compiler, or
operating-system errors. ... Programmers who have moved into the realm of
understanding always suspect their own work first because they know that
they cause 95 percent of errors. Understand the role of each line of code
and why it's needed. Nothing is ever right just because it seems to work. If
you don't know why it works, it probably doesn't -- you just don't know it
yet.
** end quote **

I was mystified by the steadfastness manner in which you continue to argue
since I firmly believe that you are a professional rather than a hobbyist.
The lack of specifics in your arguments seemed to indicate that you were
still in the superstition camp in this debate.
 
V

Virgil Green

Roedy said:
I will have to redo the experiment. Sorry I got the impression you
were refusing to do the experiment and were just asserting what the
results should be. Most people are that way.

If you get into a debate with me, you can rest assured that I won't be "that
way".
Now I would have to explain to myself if my results are different this
time why I got he results I did earlier. I was quite puzzled by the
way my changes done outside Eclipse kept disappearing and experimented
many times until I came to that conclusion.

I suppose it is possible I was editing some other files, or copying
files to the wrong place. Anyway it is on my todo list to
investigate.

These are the most likely culprits. I seriously doubt you were experiencing
what you thought you were experiencing.
 
V

Virgil Green

Roedy said:
ask the help to explain it. I am an Eclipse novice.

All the more reason to listen to others who are not. Not that any
"credentials" were exchanged, mind you, but there were enough references to
"in my experience" by others to indicate more than a novice basis for the
arguments against your claims.
 
T

Tim Tyler

Virgil Green said:
I specifically identified the only two auto-refresh settings
I can find in Eclipse ("Window | Preferences | Workbench | Refresh Workspace
automatically" and "Window | Preferences | Workbench | Startup and Shutdown
| Refresh Workspace on startup") and have asked you to identify the setting
to which you were alluding. I'm not sure where the setting Tim referenced as
"General -> Workspace -> Refresh automatically" is found.

A more complete path might be:

Window: Preferences: General -> Workspace -> Refresh automatically.

FWIW, I don't seem to have:

Window: Preferences: Workbench ...*

....in my copy of of Eclipse 3.1.
 
V

Virgil Green

Tim said:
A more complete path might be:

Window: Preferences: General -> Workspace -> Refresh automatically.

FWIW, I don't seem to have:

Window: Preferences: Workbench ...*

...in my copy of of Eclipse 3.1.

What is your build number? The path I described is present in both the 3.0
and the 3.1 versions I've cited (though I'll double-check my 3.1 machine at
home tonight).
 
V

Virgil Green

Virgil said:
What is your build number? The path I described is present in both
the 3.0 and the 3.1 versions I've cited (though I'll double-check my
3.1 machine at home tonight).

FYI... found what you were referencing. The 3.1 I have installed is a
milestone version, M1. I have viewed the online documentation at eclipse.org
and see the difference in the Preferences dialog between 3.0 and 3.1. The
3.1M1 version I have installed is still using the 3.0-style Preferences
dialog. Since I have that on a slower machine, I think I'll bump it up to
3.1 because I suspect there may have been some optimizations done in making
3.1 a final release.
 
R

Roedy Green

I was mystified by the steadfastness manner in which you continue to argue
since I firmly believe that you are a professional rather than a hobbyist.
The lack of specifics in your arguments seemed to indicate that you were
still in the superstition camp in this debate.

Why? because I had done experiments and I had results. I presumed
others had not done any experiments, or surely they would have got the
same results. Others seemed far more interested in putting me down
than doing any experiments. I just assumed you were a stupid jerk who
was flatly refusing to test this out for yourself and was simply
pontificating that I was wrong. Once an idea like that gets locked in
my head, it takes something quite major to shake it.

I have yet to sort out how I could have got different results earlier.
I did the experiments repeatedly because I was so surprised by the
results.

My theories now are that the my strange early results were caused by:

1. I was actually editing files outside eclipse and copying them in
rather than editing eclipse's files in place. Perhaps the files I was
replacing were somehow dated older than the ones Eclipse last had so
it did not notice the changes.

2. Perhaps I actually had eclipse running, but supposedly not using
the files in question.

3. Perhaps I actually had eclipse running, but the files it was
supposedly not using were just offscreen.

4. Perhaps you have to do the experiment very quickly or slowly to get
the anomalous results.

5. I was in an alternate reality where Eclipse is a true SCID.

6. I was copying my changed files to some bit bucket rather than the
eclipse working directory. At this point, this seems the most probable
explanation.

Sorry for leading you all on this wild goose chase.



--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Roedy Green

That was rich.

Come now. I was just making sure that you as a more advanced user
than me had set something away from the default that might change the
outcome. If you had, you should be aware of this switch. Eclipse is
like a rabbit warren. I had not yet found the switches you allude to,
but still wanted you to be aware such settings might affect our
experiment.

I had things on default.

Part of the reason I had so much trouble with you is that I assumed
you were more motivated by a desire to put down than to discover
truth.

You appeared then as a deceptive enemy, not a fellow seeker of what is
truly so.



--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 

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,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top