• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Wildcards in imports  RSS feed

 
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Junilu Lacar wrote:...
I think the old "Don't use wildcard imports" rule should be understood in context. I never saw any problem with wildcard imports since I don't often run into the issues they can cause. On the rare occasions that I do, my IDE will typically help me figure out where the name collisions occur...


Junilu that "temporary rule" is valid only for who haven't any experience with Java's  API and have only pedagogical scope(also the "rule" to not use an IDE in the very first steps) in the sense that you have to learn search/manage the API and memorize the class names (typing in import clause helps) included in what package etc(for a newbie API's consult  is really overwhelming) . On the other hand problems as that one can occur . But all this hopefully  is only for a limited period in time
 
Marshal
Posts: 62231
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was taught to use wildcards when I started Java®; my first ever import was import java.io.*; I still prefer not to use wildcards. Of course, if you use an IDE you never actually write imports; you simply choose the class you want from the dropdown list and the imports are all sorted out for you.
The reason we don't like going straight to an IDE is that some people find it overloads their brains. Not everybody. Not most people, least of all when the IDE is taught well. But it would be wrong to start by overstressing a minority who might make good programmers and disheartening them so they give up.
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I was taught to use wildcards when I started Java®; my first ever import was import java.io.*; I still prefer not to use wildcards.



A personal preference is a personal preference and it is not discussed at all especially when one has experience

Of course, if you use an IDE you never actually write imports; you simply choose the class you want from the dropdown list and the imports are all sorted out for you.



Yes and that automatism while helping productivity of an experienced user that has a job to finish does not help when one learns

The reason we don't like going straight to an IDE is that some people find it overloads their brains. Not everybody. Not most people, least of all when the IDE is taught well. But it would be wrong to start by overstressing a minority who might make good programmers and disheartening them so they give up.



I quote you at 101% (an IDE IMHO have to be used last in the learning chain) and add one more thing
Consulting Java's API (similarly to IDE overwelming issue) as is actually from a learner perspective is an issue because has too much detail was not a bad idea if some volunteers (mostly i guess) decide to "refactor" it  to a more simple one only for learning purposes; I notice some book's author's started to do it in their books(pointed to newbies) but was not bad at all if one can find a simplified Java Api directly(independetly from his(her) textbook) in Oracle's site  
 
Campbell Ritchie
Marshal
Posts: 62231
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possibly, but in 22 years they don't appear to have provided a simplified API. Maybe they hope we'll al read the Java™ Tutorials.
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Possibly, but in 22 years they don't appear to have provided a simplified API.



If they not did it till now maybe they wait some volunteers do it for them  

Maybe they hope we'll al read the Java™ Tutorials.



That's a HUGE source of (applied) knowledge everyone have to pass on regardless (but that's unrelated for a new learner  exercise/simulate with a simplified API)
 
Master Rancher
Posts: 915
17
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started learning using an ide and found it actually verry helpfull, especially in the beginning, often when first writting code you're aware of the fact that something excist but you can't remember the name or something like that in those cases are the dropdowns of an ide when you start typing verry usefull. Also the autogenarating of code(like constructors, getters & setter or the toString), optimizing the imports or formatting your code are super helpfull.
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Daniel Demesmaecker wrote:I started learning using an ide and found it actually verry helpfull, especially in the beginning,



I too although back then IDEs(as we know it nowadays almost not existed) was considered "boosted" text editors like Stallman's emacs instead the very simple ones(without syntax  highlighting, formating, connection with a compiler ecc)

often when first writting code you're aware of the fact that something excist but you can't remember the name or something like that in those cases are the dropdowns of an ide when you start typing verry usefull. Also the autogenarating of code(like constructors, getters & setter or the toString), optimizing the imports or formatting your code are super helpfull.


Yeah i know all that but a teaching/learning method is based on struggle to remember(i.e. the "hard way") new things and an IDE not helps on that method but on the other hand an IDE as you have already mentioned can potentially be helpful on learn things trough repetition mean you not struggle(i.e. the "soft way") at start to remember new things but you repeat more times those things --your IDE "takes memory" for you-- without any struggling. Is demonstrated that learn things trough repetition and not struggling takes much more time

In other words the hard way presupposes you have to be based only on your memory and not on tools(automatisms, helpers) when learning new things. That's the reason people on education field have almost scientifically(empirically+ some research) proved and  designed simplified(compared to Eclipse and company) IDE's for teaching/learning (but also for small scale programming) like BlueJ DrJAva ecc

E.g.for BlueJ(teaching OO trough Java language) take a look here

Note: after all we're not talibans on impose one way instead of another in teaching/learning the important thing is find and apply the more effective, painless and efficient way a student can get the subject matter. That's all
 
Campbell Ritchie
Marshal
Posts: 62231
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Harry Kar wrote:. . . people on education field have almost scientifically(empirically+ some research) proved and  designed . . . .

Please find some evidence for that; I think you will find the design of things like BlueJ was much more empirical than researched.
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Harry Kar wrote:. . . people on education field have almost scientifically(empirically+ some research) proved and  designed . . . .

Please find some evidence for that;



take a look on papers in the citeseerx  link up

I think you will find the design of things like BlueJ was much more empirical than researched.



Well that's arguable(as I mentioned use the scientific method i.e. a mix experiment + research but we can't say is an  already finished work with scientific probing power --for some practical reasons mainly--) but anyway the important point here is that  in recent years there are people sensible(more than the traditional ones) on teaching/learning issues and Koelling and company almost  has started and continue a path and IMO that's better than before (or nothing) isn't ?
 
Campbell Ritchie
Marshal
Posts: 62231
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell us which papers to look for.
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Please tell us which papers to look for.


Cmon Campbell please you are not a starter open one you want if you're interested; they're not books are at max 10 pages each or so  

Update: e.g. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.140.5068&rep=rep1&type=pdf and please abstract about the tool(BlueJ) and focus on the pedagogical issues referred in the papers

also can't find it right now but  here was a  thread where Junilu talked with a Uni prof about teaching /learning issues that's somehow the start in the set of issues actually some of the teaching board seems to support  
 
Campbell Ritchie
Marshal
Posts: 62231
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Harry Kar wrote:. . . Cmon Campbell please you are not a starter . . .

. . . and I have better things to do that to search for something you already know the location of.

e.g. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.140.5068&rep=rep1&type=pdf . . . .

Is that a peer‑reviewed paper? What has that got to do with the design of BlueJ? It is an assessment after BlueJ had been written, which is different from what you said earlier. You still haven't yet shown any evidence that BlueJ was designed scientifically.
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Harry Kar wrote:. . . Cmon Campbell please you are not a starter . . .

. . . and I have better things to do that to search for something you already know the location of.



Yeah sorry about that but i too haven't the paper ready on desktop to copy past an address i had to search it ... and it is implied when one have better things  to do first do those things  and then when have time/will etc go here or there

e.g. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.140.5068&rep=rep1&type=pdf . . . .

Is that a peer‑reviewed paper? What has that got to do with the design of BlueJ? It is an assessment after BlueJ had been written, which is different from what you said earlier. You still haven't yet shown any evidence that BlueJ was designed scientifically.



I guess we can't understand each other right now ; Please take a look again in my previous message
 
Rancher
Posts: 3353
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the OP?  

Why don't you guys take your discussion to a new thread and leave this one for the OP's question?
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Daniel Demesmaecker wrote:. . . a bank, like where you keep you money or it could be a sofa

At risk of getting sent to MD, the Italian bankers who took money were called that because they sat on a bench, so both meanings of bank have the same origin.



Good that one Campbell ; Which bankers are you referring to exactly?
 
Harry Kar
Ranch Hand
Posts: 392
8
BSD Debian Open BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Norm Radder wrote:Where is the OP?  

Why don't you guys take your discussion to a new thread and leave this one for the OP's question?


That's a good point Norm please who has the rights do a fork the  OT  stuff
 
I'm still in control here. LOOK at this tiny ad!
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!