I need multiple imports

T

timasmith

Hi,

Perhaps I am from the spoilt generation but rather than typing

import com.myproject.framework.locale.*;
import com.myproject.framework.logging.*;
import com.myproject.framework.util.*;
import com.myproject.framework.exceptions.*;

I would really rather type in

import com.myproject.framework.*.*;

But I don't believe I can do that.

The packages are too large to combine. Is there anything else I can
do?

thanks

Tim
 
H

Hendrik Maryns

(e-mail address removed) schreef:
Hi,

Perhaps I am from the spoilt generation but rather than typing

import com.myproject.framework.locale.*;
import com.myproject.framework.logging.*;
import com.myproject.framework.util.*;
import com.myproject.framework.exceptions.*;

I would really rather type in

import com.myproject.framework.*.*;

But I don't believe I can do that.

The packages are too large to combine. Is there anything else I can
do?

Seems to me like you don´t really get the idea behind packages if you
need to import that much.

If you use Eclipse, it is only a matter of Alt+Shift+O...

H.

--
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
 
B

bartekkl

You can't. But any decent Java IDE will add imports for you. For
example, in Eclipse, when I type "List" in my code and press
Ctrl+space, I get a little popup with a list of all classes and
interfaces called "List" in any package available for my project. From
that list, I can select, say, java.util.List and press "Enter". This
operation silently adds "import java.util.List;" declaration at the top
of the file. If I ever happen to remove all references to
java.util.List from the file, it is just a matter of pressing
Ctrl+Shift+O to rearrange the imports and remove any redundant ones.

With Eclipse, you never have to type "import" any more ;)

Happy eclipsing,

Bartek
 
H

Hendrik Maryns

Hendrik Maryns schreef:
(e-mail address removed) schreef:



Seems to me like you don´t really get the idea behind packages if you
need to import that much.

If you use Eclipse, it is only a matter of Alt+Shift+O...

That should be Ctrl+Shift+O, I always confuse them, but never type it
wrong, strange.

H.


--
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
 
R

Roedy Green

That should be Ctrl+Shift+O, I always confuse them, but never type it
wrong, strange.

I just realised something. I often could not tell you the name of some
sequence of keys to do something, but I can hit it. I remember it
kinesthetically. Other people likely remember the image of the keycap
or they subvocalise something like Cunturl-Shif-Oh.

There may be other ways of remembering it. Each technique would give
different degrees of difficultly when the keyboard is changed, the
QWERTY/DSK layout is shifted or the editor is changed.
 
M

Monique Y. Mudama

I just realised something. I often could not tell you the name of
some sequence of keys to do something, but I can hit it. I remember
it kinesthetically. Other people likely remember the image of the
keycap or they subvocalise something like Cunturl-Shif-Oh.

I do the same (kinesthetic). Not infrequently, if someone asks me
for, say, my husband's phone number, I stare at them blankly, then
pick up a phone and start to dial it. Then I can tell them the
number.
There may be other ways of remembering it. Each technique would
give different degrees of difficultly when the keyboard is changed,
the QWERTY/DSK layout is shifted or the editor is changed.

It wouldn't surprise me.

I really had to make some adjustments at my last job; I needed to
create diagrams, and I am not a visual person. I don't read diagrams
well, so I had trouble creating them, too. Text feels more accurate
to me. But most everyone else on the team was visual, so ...

I do have to say that I got a lot better at visually depicting stuff.
I never did come to like it, though.
 
T

Thomas Fritsch

Hendrik Maryns said:
That should be Ctrl+Shift+O, I always confuse them, but never type it
wrong, strange.

It is like being asked "Where on your keyboard is the "A" key?".
When I think about it, my quick answer is: "I cannot know this."
But when typing without looking at the keyboard, my finger automatically
finds its way to the very left of the keyboard.
It seems like something inside me knows the place of the "A" key, but I am
not aware of this knowledge.
 
M

Monique Y. Mudama

It is like being asked "Where on your keyboard is the "A" key?".
When I think about it, my quick answer is: "I cannot know this."

When I read this question, my left pinky flexed. I guess it knew!
But when typing without looking at the keyboard, my finger
automatically finds its way to the very left of the keyboard. It
seems like something inside me knows the place of the "A" key, but I
am not aware of this knowledge.

In martial arts there's a lot of talk about muscle memory. It's why
repetition is so important. It's perfectly normal to be able to
perform an action, but not be able to describe everything that goes
into the action. Another example might be driving with a manual
transmission; a new driver might consciously decide to downshift, how
much to engage the clutch, etc, but an experienced driver will just do
it.
 
S

Stefan Ram

Thomas Fritsch said:
It is like being asked "Where on your keyboard is the "A"
key?". When I think about it, my quick answer is: "I cannot
know this." But when typing without looking at the keyboard, my
finger automatically finds its way to the very left of the
keyboard. It seems like something inside me knows the place of
the "A" key, but I am not aware of this knowledge.

Reminds me of:

"What, then, is time? If no one asks me, I know what it is.
If I wish to explain it to him who asks me, I do not know."

Augustinus, Confessions, Book 11, chap. 14
 
R

Roedy Green

I do have to say that I got a lot better at visually depicting stuff.
I never did come to like it, though.

I have been reading about hypnosis. The hypnotist first tries to
discover the preferred representational systems (visual, auditory,
kinesthetic) of your dominant and non-dominant hemispheres. Oddly,
people do differ. Odour is excellent for evoking lost memories.

One practical thing to come out of this research is helping people to
read faster. They need to learn to read visually rather than by
subvocalising and telling themselves a story. The optimum spelling
strategy is to look at a word and notice the feeling -- does it "feel"
right/familiar. People who use auditory spelling strategies are at a
big disadvantage. I use some -- alternate pronunciations for oddly
spelled words.

This brings me to icons. I think I would do almost as well with
arbitrary icons in a program, so long as they all had distinct colours
and shapes that I could easily tell apart even with peripheral vision.

What drives me nuts are fussy little story-telling icons with the
detail so fine you can't make it out, where all the icons are very
similar except for some minor detail.

I'd love it if there were something like a user LAF that made easy to
replace icons.

This would require defining a standard set of application icons.
 
M

Monique Y. Mudama

I have been reading about hypnosis. The hypnotist first tries to
discover the preferred representational systems (visual, auditory,
kinesthetic) of your dominant and non-dominant hemispheres. Oddly,
people do differ. Odour is excellent for evoking lost memories.

One practical thing to come out of this research is helping people
to read faster. They need to learn to read visually rather than by
subvocalising and telling themselves a story. The optimum spelling
strategy is to look at a word and notice the feeling -- does it
"feel" right/familiar. People who use auditory spelling strategies
are at a big disadvantage. I use some -- alternate pronunciations
for oddly spelled words.

Odd. I don't consider myself to be a "visual" person, but I read
crazy-fast.

Now that I think about it, though, this makes sense. I don't sound
out words that I read; the words do produce a sort of image in my
head, but I don't think it's necessarily visual. Maybe the word
"impression" is better than "image." (I have this feeling I'm headed
toward Plato's Forms now ...)

Sometimes I will find that I've read a page of a novel, but I'm pretty
sure I haven't absorbed every single word. I think I have read the
significant words and kind of peripherally caught the sense of the
rest, just as I might have a good idea of what's going on across the
street just by using my peripheral vision.

I wonder, though. Don't we all initially learn to read by sounding
out words? Why/how do some people transition to other strategies?

Er, no, I guess "we" don't all ... for some languages, the written
word is pictograms (is that the right word?) ... so I wonder, how are
young Chinese children taught to read? Surely they don't "sound out"
the words?

Sorry for the ramble ...
This brings me to icons. I think I would do almost as well with
arbitrary icons in a program, so long as they all had distinct
colours and shapes that I could easily tell apart even with
peripheral vision.

That would be an interesting experiment. I bet it would work just
fine. I play World of Warcraft, and mostly I can't even tell what the
icon for a given ability is supposed to depict. But the icons are all
different enough that I can tell them apart visually. It took me a
while to remember that the funny greenish blue button is thunderclap,
the thing that looks like the head of a screw is intimidating shout,
and the orc face or whatever is demoralizing shout, but once I got it,
I've had no trouble keeping them straight. Then again, I acquired
them fairly slowly as I levelled. If I'd seen all of those buttons
right from the start (no, not just three, but the 30-odd icons
total I ended up with), I'm sure I would have been lost.

Actually, I think OS and "normal" app devs could learn a lot from some
of the game UI ideas out there. Some are absolutely awful, but
successful games have interfaces that convey a lot of information with
a small amount of real estate.
What drives me nuts are fussy little story-telling icons with the
detail so fine you can't make it out, where all the icons are very
similar except for some minor detail.

Me too. But even more annoying are buttons that don't give a hotkey
when you mouse over them, or whose mouseover doesn't change when you
change the keybinding!
I'd love it if there were something like a user LAF that made easy
to replace icons.

This would require defining a standard set of application icons.

Well, there are skinnable apps. You could probably create a skin for
winamp/xmms that does what you want, but you couldn't apply those
buttons to other apps =/

Come to think of it, WoW allows you to import your own icons for
macros.
 
R

Roedy Green

Don't we all initially learn to read by sounding
out words?

I didn't. In a British-style private school I was taught to memorise
each new word in its entirety -- by the shape of the entire word. In
my second grade in public school they taught the phonics system. I
thought my teacher was nuts when she would say, "what does T say?" I
thought to myself "It doesn't say anything. It is just a mark on the
paper!" I was very literal, back then.

I remember my extreme joy on looking at the word "crab" and suddenly
noticing that there was a connection between the letters used in a
word and its sound. After this revelation, in a matter of weeks I went
from the bottom in the class to top.
 
T

Thomas Fritsch

Monique said:
Er, no, I guess "we" don't all ... for some languages, the written
word is pictograms (is that the right word?) ... so I wonder, how are
young Chinese children taught to read? Surely they don't "sound out"
the words?
Surprisingly even the Latin letters ultimately come from pictograms when
tracing back their history (Semitic -> Greek -> Latin).
For example:
"O" comes from first letter of semitic "eye"
"N" comes from first letter of semitic "snake"
See http://www.ancientscripts.com/protosinaitic.html

But I'm afraid we are slightly off-topic here ;-)
 
T

Thomas Fritsch

Monique said:
Sometimes I will find that I've read a page of a novel, but I'm pretty
sure I haven't absorbed every single word. I think I have read the
significant words and kind of peripherally caught the sense of the
rest, just as I might have a good idea of what's going on across the
street just by using my peripheral vision.

I wonder, though. Don't we all initially learn to read by sounding
out words?
Yes, but only initially. Later -after years of repetition- the long
processing chain
reading the word "dog" -> sounding out "dog"
-> hearing the word "dog" -> having the "dog" impression
is short-circuited to
reading "dog" -> having the "dog" impression
Sorry for the ramble ...
me, too...
 
C

Chris Uppal

Monique said:
Odd. I don't consider myself to be a "visual" person, but I read
crazy-fast.

Me too, on both counts. (Aside: I wish that technical writers could get it
into their damnably small heads that illustrations are for /illustration/ --
diagrams should supplement text, not replace it!)

Now that I think about it, though, this makes sense. I don't sound
out words that I read; the words do produce a sort of image in my
head, but I don't think it's necessarily visual. Maybe the word
"impression" is better than "image."
[...]
I wonder, though. Don't we all initially learn to read by sounding
out words? Why/how do some people transition to other strategies?

I learned by reading aloud, and then learned to read by "speaking" internally
(I can still remember the moment of inspiration when I realised that I didn't
actually have to /say/ anything). I quickly changed to "speed reading"
(probably in less than a year). For me reading feels like language -- in just
the same way as we don't hear sounds (in our native tongues) and /then/
understand them, I don't see text and then understand it as a consciously
separate process. The text /is/ the meaning, with no intermediary steps. I
guess users of sign-language feel the same way -- the /medium/ is visual, but
the /content/ is pure meaning, not speech-encoded-visually. (Is it possible to
learn to read before learning to speak, I wonder ? If so then a "slow hearer"
would transcribe sounds into signs in their heads, whereas the rarer "speed
hearers" would just understand the sounds directly.)

As to why some people end up reading like that, I have no real idea. Practise
must be a big part of it. In my own case I suspect the tendency was amplified
by what otherwise would have manifested as a very mild dyslexia. By absorbing
info "chunked" more coarsely, and (I speculate) using slightly different
processing pathways in the brain, I learned (unconsciously) to side-step the
problem, and became an apparently "advanced" reader. The downside is that my
spelling and ability to proof-read my own words is lamentable, and always has
been.


Incidentally, but not too far off-topic (for the newsgroup, if not for this
thread ;-) mangled identifiers like abbreviations and that ghastly "Hungarian"
convention /really/ throw off my ability to read. Perhaps for people who "read
aloud inside" the mangling has little effect, but I can't read the things at
all. I worked for half a year on a codebase that made heavy use of Hungarian,
and by the end of it I was no nearer being able to read that code than at the
start. The same point applies to people who post in "text-ese" -- if you read
8 as the sound "ate" then you'll be able to decode h8 easily (or rather, with
no more difficulty than you would when reading real English), but for folk like
me, h8 is no more meaningful than, say, h7. I hardly ever event try to read
such posts, a simple 'u' for you is enough to put me off.

[...] for some languages, the written
word is pictograms (is that the right word?) ... so I wonder, how are
young Chinese children taught to read? Surely they don't "sound out"
the words?

Slightly related to that: I've seen it claimed (in a plausible context -- i.e.
not the Web or a "pop science" page in a magazine) that Chinese people suffer
less from dyslexia than Westerners, with the associated speculation that the
underlying brain differences do occur in Chinese folk, but that they have less
effect on reading ability. OTOH, I've also seen the claim (in the same
reputable context) that that's tosh.

I have also seen the claim (reputable) that Chinese readers read much faster
(on average) than English readers -- presumably because they /have/ to
speed-read/flash-read (as we would call it).

BTW, I think the word you want is not "pictogram" (which is restricted to the
case where the sign is an genuine picture), but "logogram" or "logograph" (a
sign for a word).

-- chris
 
M

Monique Y. Mudama

Surprisingly even the Latin letters ultimately come from pictograms when
tracing back their history (Semitic -> Greek -> Latin).
For example:
"O" comes from first letter of semitic "eye"
"N" comes from first letter of semitic "snake"
See http://www.ancientscripts.com/protosinaitic.html

But I'm afraid we are slightly off-topic here ;-)

Well, I still find it interesting. I didn't know that they come from
pictograms, although it makes sense now that I think about it. But I
don't think it relates to how we learn to read anymore.
 
M

Monique Y. Mudama

I didn't. In a British-style private school I was taught to
memorise each new word in its entirety -- by the shape of the entire
word.

Huh. Interesting!
In my second grade in public school they taught the phonics system. I
thought my teacher was nuts when she would say, "what does T say?" I
thought to myself "It doesn't say anything. It is just a mark on the
paper!" I was very literal, back then.
I remember my extreme joy on looking at the word "crab" and suddenly
noticing that there was a connection between the letters used in a
word and its sound. After this revelation, in a matter of weeks I went
from the bottom in the class to top.

To be honest, I don't remember learning to read. Family history has
it that my parents didn't even know I could read; a family friend told
my parents, who said, "That's not possible; she must have memorized
the stories we read her." So the friend sat me in front of a
newspaper, and I started to read an article ...

But I don't remember any of it.

I don't know if that means that I somehow taught myself (seems
unlikely) or if the preschool I attended was teaching me on the sly.
I wish I knew; it seems silly not to know how I learned to read, since
reading has always been such a big part of my life. When I was a
little kid, trying to envision heaven, all I could come up with was
that it must be an infinitely huge library.
 
R

Roedy Green

To be honest, I don't remember learning to read. Family history has
it that my parents didn't even know I could read; a family friend told
my parents, who said, "That's not possible; she must have memorized
the stories we read her." So the friend sat me in front of a
newspaper, and I started to read an article ...

My toddler baby brother learned to read Campbell's soup cans. We would
trot him out to show this feat of magic. People were always trying to
figure out the trick People have such fixed ideas about what kids are
capable of at various ages.

When I was a preschooler I found a design with lines, circles, and
wiggly lines on it. I carefully copied the picture and left my
picture on the kitchen table. My Dad found the thing and was
impressed to pieces. For a few minutes he thought I had invented the
telephone. It was a circuit diagram of a telephone. He was so
disappointed when I told him how I did it.

I wonder what sort of Java-based toy you could invent for the building
block set to teach them rudimentary programming. The main concept
would be creating 3D objects that you can then replicate and combine
into bigger 3D objects. Kids around 10-11 are into building elaborate
worlds. For them you would need a 3D universe you can get inside and
walk around in to admire the generated architecture.
 

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,785
Messages
2,569,624
Members
45,318
Latest member
LuisWestma

Latest Threads

Top