Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

I am a Java Virgin! I need your support.

Thread view: 
google 24/7 - 17 Feb 2006 20:41 GMT
I am a Java virgin.  I have never taken any computer classes or
programmed in my life, so this is all new to me.  My background is more
creative so this is like 180 degree turn.  It's such a disruption to
the way my imaginative visual brain thinks and has developed for years
that I've contemplated dropping the class I'm taking in beginning Java.
Why am I learning Java you ask?  For fun.  Puzzled?  So am I.
Actually thanks to Google and Mozilla Firefox (especially Google who I
admire with every lingering breath) I've been inspired to learn because
of their belief in open-source a philosophy and practice I highly agree
with.  But I need all your support because it is all difficult to
process. The other reason I decided Java over other languages is I
naively thought OOPs Object Oriented was dealing with visual objects
like chess pieces you just drag around and plug in to some master
program(oh my God that's sounds really stupid but its the truth).  I've
entertained the idea of dropping the class I'm taking because it's
getting harder with these what do you call it now these method
perameters and arguments and oh what else  the whole confusion of
implimenting all these classes and methods and tracking back from the
main method to find out where these original objects were assigned and
and class methods embedded within class methods and I just get
lost...but I picked up another book last night to compliment the one we
are using for the class because that one is so dry.  This one I got
last night called Diving Headfirst into Java by O'Reilly makes it a
little fun with analogies pics and stuff.  Okay I'm rambling.  I hope I
have the guts to stick with it all but only with your support.  Baby
steps and all, right?  Any suggestions and what you all did when you
started and how you've overcome these hurdles with all the years or
months would be appreciated.  Anybody in a similar situation as me
please post too.  Maybe we can figure it out together.  One thing I am
also doing is going to the computer section and looking through
different books getting different POVs but also just exposing myself
even though I don't understand most of what I'm looking at.
Michael Redlich - 17 Feb 2006 21:00 GMT
> I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.

google 24/7:

Since you never had any experience programming, you definitely need to
understand the basics of computer programming regardless of which
language you choose.

For example, it is imperitive that you understand concepts such as
for-loop, while-loops, passing parameters into functions and methods,
conditionals (if/then/else), etc.  You also need to understand how to
avoid pitfalls such as inadvertantly creating an infinite running loop
or dereferecing pointers that point to nothing.

The Head First Java book that you have is excellent.  However, you
should take some basic programming classes as well.

Good luck with your studies...

Mike.

-----
ACGNJ Java Users Group
http://www.javasig.org/
Sachin - 17 Feb 2006 21:25 GMT
I would second that recommendation ... The following book is definitely
the best book for any Java newbies ...

Head First Java by Kathy Sierra, Bert Bates (http://xrl.us/j3yd)

-Sachin

http://www.SachinOnline.com
petermichaux@yahoo.com - 17 Feb 2006 22:36 GMT
> Head First Java by Kathy Sierra, Bert Bates

I'm reading this and find it very good. A lot of pictures for those who
are visual. (I do have studied some other languages and OOP a little
before.)

Peter
Roedy Green - 18 Feb 2006 01:54 GMT
>Head First Java by Kathy Sierra, Bert Bates (http://xrl.us/j3yd)

for links to bookstores carrying it see
http://mindprod.com/jgloss/gettingstarted.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Rhino - 17 Feb 2006 21:04 GMT
>I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
[quoted text clipped - 28 lines]
> different books getting different POVs but also just exposing myself
> even though I don't understand most of what I'm looking at.

One book that I've seen recommended very highly is "Thinking in Java" by
Bruce Eckels. You can buy it in bookstores but you can also download it (and
all of the examples) online, for free. Perhaps working through that book
will help you make the mental adjustment you need to work in Java? You can
find the book here, at the author's website:
http://www.mindview.net/Books/TIJ/. If you scroll down a bit, you'll find a
link for a download site; follow that and you can download the book from one
of the many mirrors. I believe the Third Edition is the current one so
that's probably the one you want.

Attitude is another important element in succeeding with Java. Everyone
learns Java for their own reasons and we're all different so you might only
have met people who have picked up Java because it looks good on a resume or
whatever. In my own case, I think programming has a distinct artistic
component and really satisfied my creative impulsives.

I used to be quite active in music, playing a couple of instruments passably
and dabbling at song-writing. But I find I rarely pick up an instrument any
more because Java scratches my creative itch. I'm also a novice woodworker
and I realized a couple of years ago that, for me, doing woodworking, which
is fairly creative in itself, is very similar to writing programs. Just as a
woodworker starts with a lump of unshaped wood and gradually shapes it into
something that has form and function, a programmer starts with a blank
screen and writes code until he comes up with something that has form and
function. When he's working on his own projects, rather than school or work
assignments, he's free to make that program do whatever he wants it to do.
He can use any technique he can imagine to gather input and to deliver or
record information. That's fairly artistic in my opinion.

Also, it might help you to get some idea of some of the artistic things you
can do with GUIs to make them look a little less ordinary. Perhaps that's
your niche in the Java world: to bring a sense of art to Java. One article
that might help you get a sense of the creative side of Java is this one:
http://java.sun.com/products/jfc/tsc/articles/swing2d/index.html. I'm sure
other articles demonstrating the visual side of Java abound on the Internet
so you can probably use your friend Google to find more. You could also post
here and ask people to point you to really neat GUIs done in Java.

--
Rhino
Oliver Wong - 17 Feb 2006 21:31 GMT
>I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
[quoted text clipped - 10 lines]
> like chess pieces you just drag around and plug in to some master
> program(oh my God that's sounds really stupid but its the truth).

   You might have more fun dropping (or putting aside temporarily) Java,
and working with game-creation tools. Games are, in my opinion, where
creative arts and programming intertwine the most.

   Many game creation tools are very visual, and they will gently guide you
into thinking like a programmer when you implement the rules for the game.
You'll learn about conditional statements, variables, and all that stuff
along the way. Then, when you're ready, you can come back to Java with a new
perspective of things.

   My brother doesn't know much about computers beyond reading e-mail,
playing mp3s and watching movies, but he had fun creating games using
RPGMaker2000. I only had to explain to him what all the instructions do;
from there, he picked it up pretty quickly and was able to make some simple
games.

   You might want to Google for RPGMaker2000 or other game creation tools
and see if it suits your needs.

   - Oliver
Luke Webber - 17 Feb 2006 22:33 GMT
> I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
> creative so this is like 180 degree turn.
[snip]

Well thanks very much. /We/ happen to think that programming /is/ a
creative activity. <g>

Luke
VisionSet - 17 Feb 2006 23:42 GMT
> > I am a Java virgin.  I have never taken any computer classes or
> > programmed in my life, so this is all new to me.  My background is more
[quoted text clipped - 3 lines]
> Well thanks very much. /We/ happen to think that programming /is/ a
> creative activity. <g>

Absolutely!
I moved in to programming to better satisfy my creative side!!

--
Mike W
Roedy Green - 18 Feb 2006 01:58 GMT
>I moved in to programming to better satisfy my creative side!!

the thing I love about programming is the level of perfection you can
attain.  And when you are all done, the work show no seams where you
tool 300 tries to get it just the way you wanted.  All clumsiness is
forgiven with sufficient persistence.  In most other endeavours, such
as playing a musical instrument, you have to practice and practice
then perform perfectly in one attempt.
.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 18 Feb 2006 00:57 GMT
>Maybe we can figure it out together.

The folk here can be curmugeons. They want to answer specific
questions rather than hold your hand on a starry eyed trip to
paradise.  It is fun though. See
http://mindprod.com/jgloss/gettingstarted and
http://mindprod.com/jgloss/newgroups.html
for the care and feeding of your fellow posters.

I remember your stage of my career. I was so excited I could hardly
speak.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Patricia Shanahan - 18 Feb 2006 07:04 GMT
> I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
> creative so this is like 180 degree turn.

How can anything be more creative than weaving the behavior you want out
of pure information?

Books are good, but depending too much on them would be like learning to
play a musical instrument by reading about it. There are some things
that can only really be learned by doing, and programming is one of
them. Practice, practice, practice.

Patricia
trippy - 18 Feb 2006 07:38 GMT
In article <1140208878.279321.128500@f14g2000cwb.googlegroups.com>,
google 24/7 took the hamburger, threw it on the grill, and I said "Oh
wow"...

> I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
[quoted text clipped - 28 lines]
> different books getting different POVs but also just exposing myself
> even though I don't understand most of what I'm looking at.

First, breathe.

Secondly, it's not some mystical, magical thing. There's rules to it,
like there is in everything else. Everything's an object in java.
Everything stems from java.lang.object. An object is an instance of a
class. Objects are instantiated using the class as a template. So
whatever attributes (things you want that object to have or be aware of)
and methods (thing you want the object to do) you tell the template it's
going to have is what you're going to use with your objects.

To make an object you use new. SomeClass anObject = new SomeClass();

To get an object to do the things you want to do, you call its methods.

anObject.doSomething();

Sometimes a you can tell a class to execute something using the same
process. Those are static methods. You call methods for a class the same
way you do for an object.

SomeClass.doTheStaticSomething();

Parameters are when the method needs something to do its thing. That's
what goes in the parenthesis. You have to make sure the thing you're
using for a method call is the same type the parameter in the method
requires.

String thisThing = "This String is actually an object too."

anObject.doSomething(thisThing);

Now somewhere in your class, You're gonna have a method named
doSomething which requires a parameter of a string.

public class SomeClass {

  public void doSomething(String aParam) {

      System.out.println(aParam);
     

  }

}

You can use method calls within method calls too, provided you end up
with the type(s) for the argument(s) you need.

anObject.doSomething(someObject.methodCall());

You can also chain your method calls together.

anObject.doSomething().thenDoThis();

A class can call a method within itself without having to instantiate an
object.

someMethod();

Constructors are the method that actually instantiates the object. Only
difference between that and the other methods is that constructors don't
have a return type and have to be named the same as the class.

public SomeClass() {

}

They can have parameters of pretty much any type, AFAIK, same as regular
methods. You can have objects, arrays, arrayLists, whatever, as long as
whenever you call the method, you give it that type, it's all good.

Overloading is when a method has the same name but different signatures.
A method's signature is its name and the number and the type of its
arguments.
(Sun, http://java.sun.com/docs/books/tutorial/java/javaOO/override.html)  

public void aMethod() {

}

public void aMethod(int aNumber) {

}

public void aMethod(string aString, int aNumber) {

}

how you call it determines which of the methods you use

anObject.aMethod();
anObject.aMethod("My String", 4);
anObject.aMethod(7);

Overriding is when you use the same method to do different things in
another class.

public class ThisClass {

  public void aMethod() {

     system.out.println("This Class");

  }

}

public class ThatClass extends ThisClass {

  public void aMethod() {

     String aString = "That Class is doing the work.";
     System.out.println(aString);
 
  }

}

Each class is different and your objects and their attributes and
methods don't carry over. A different class would have to instantiate
them/use them/whatever for them to mean anything to it.

Static methods you can pretty much call whenever you need them.

System.out.println("Hi"); would be an example of a static method call.

Your class name is the same as your file name.

public class SomeClass translates to SomeClass.java.

In addition to what Michael said about things like learning for loops
and if else and other fundamentals, start trying to read the API.
There's a lot of classes in java that can save you some headache. The
top left pane is the different packages that are in your version of sdk,
the lower left pane is either the classes in the package or every class,
if you clicked the all classes link in the top left pane. The right pane
is the description of the package or class. It's kind of a tough slog.
Not much you can do about that, just gotta slog it. It'll be worth it.
If you don't feel like you get it at first, that's okay. It takes time
to understand it. Learning how to read the API has helped a lot. In
java, if you're so inclined, you can actually make your own API's and
people have. They generally do that for the classes and packages they
write themselves.

http://java.sun.com/j2se/1.5.0/docs/api/index.html

Google and Wikipedia (in addition to comp.lang.java.help) are a great
help too.

There are also various websites that are dedicated to java (Roedy's
mindspring site for instance) that can help as well. This in addition to
the books that various posters have recommended.

Sorry, didn't mean to write a book about it but I've been there and it
blew.

Signature

trippy
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM

NP: "I Am The Law" -- Anthrax

"Now, technology's getting better all the time and that's fine,
but most of the time all you need is a stick of gum, a pocketknife,
and a smile."

-- Robert Redford "Spy Game"

Chris Uppal - 18 Feb 2006 12:58 GMT
>  Why am I learning Java you ask?  For fun.  Puzzled?  So am I.

One thing that might not be obvious to you yet is that what you are doing now
is the equivalent of learning to play scales. Or some other equally boring and
frustrating activity that you have to get through /before/ you can do anything
real.  You are learning (reluctantly, and with some difficulty, from the sound
of it ;-) what the basic tools are and how to use them.  You aren't actually
/programming/ yet, just doing finger exercises.

The fun stuff starts when you have learned the tools, and can use them without
thinking too much about them.  That's to say /if/ you enjoy programming at all,
then that's when the fun stuff starts.  Some do, some don't -- and you never
know until you try.

A couple of other small points:

One of the first signs of being an incipient programmer is that you can loose
yourself in writing code (six hours later: "It must be almost lunchtime. [looks
at watch] Wow! Where did the afternoon go ?").  Another is the buzz you get
from making something work, or successfully solving a problem that has been
giving you grief.

Another point is that Java is rather a dry programming language.  It is
designed for professionals (and not the most talented pros at that) to do
mostly dull things.  Think of a set of tools intended for a house painter
rather than a portrait painter.  That's not to say that you can't do fun things
with Java (either fun to create, or fun to use once they have been written),
but there are a fair number of features in the language which you just have to
learn even though they don't directly contribute to (may even hamper) the
underlying creativity of programming.   What I'm trying to warn you of is that
learning a language like Java involves rather a lot of frustrating detail --
the important point is to realise that it is /only/ detail, and not to let it
put you off the whole enterprise.

   -- chris
David Segall - 18 Feb 2006 14:53 GMT
>I am a Java virgin.  I have never taken any computer classes or
>programmed in my life, so this is all new to me.  My background is more
>creative so this is like 180 degree turn.  It's such a disruption to
>the way my imaginative visual brain thinks and has developed for years
>that I've contemplated dropping the class I'm taking in beginning Java.
> Why am I learning Java you ask?  For fun.
I don't think learning Java is the way you should go. Even using a
programming tool like NetBeans <http://www.netbeans.org> that
mechanises some of the worst tasks, you are still facing many boring,
unrewarding months before you can produce something satisfying.

Microsoft have produced a range of, currently free, products aimed at
you. Check out
<http://msdn.microsoft.com/vstudio/express/default.aspx>. Select
Visual Basic for the easiest to understand and J# if you want to move
to Java later. If you want to develop web based applications select
Visual Web Developer but, in that case, Java Studio Creator
<http://developers.sun.com/prodtech/javatools/jscreator/> is probably
a better choice and is the same price.

An alternative way of learning what programming is about but which
will produce some early rewards is to learn a scripting language.
Javascript (which has almost nothing to do with Java) has most of the
elements of a programming language, is widely used and is relatively
easy to learn. It has the added advantage that you can combine your
imaginative brain with your new found programming knowledge to produce
a dazzling web page and creative, open source, Javascript code is in
great demand.
Chris Smith - 18 Feb 2006 15:57 GMT
> I don't think learning Java is the way you should go. Even using a
> programming tool like NetBeans <http://www.netbeans.org> that
> mechanises some of the worst tasks, you are still facing many boring,
> unrewarding months before you can produce something satisfying.

Huh?  Plenty of people learn Java and produce interesting applications
in less that many months... not to mention that the OP said he enjoyed
the prospect of learning a programming language.  David, maybe you just
don't like programming?

> Microsoft have produced a range of, currently free, products aimed at
> you. Check out
> <http://msdn.microsoft.com/vstudio/express/default.aspx>. Select
> Visual Basic for the easiest to understand and J# if you want to move
> to Java later.

This is getting a bit silly.  In any case, certainly don't choose J#.  
It's a hideous mix of worlds that is difficult to understand unless you
come with at least an intermediate knowledge of at least one of them in
advance.  Java, C#, VB.NET, and C++ all have things to recommend them,
but I have no earthly idea why anyone would choose to work in J#.

> An alternative way of learning what programming is about but which
> will produce some early rewards is to learn a scripting language.

This may be true, but it depends on what the OP is looking for.  Without
that information, the OP would be well advised to ignore anyone giving
advice that it's necessary to switch languages to be learned.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Martin Gregorie - 18 Feb 2006 17:52 GMT
> I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
> creative so this is like 180 degree turn.  It's such a disruption to
> the way my imaginative visual brain thinks and has developed for years
> that I've contemplated dropping the class I'm taking in beginning Java.
>  Why am I learning Java you ask?  For fun.  Puzzled?  So am I.

You may not find taking classes the best way to learn: I have many years
of writing assembler and C. I generally think I can learn a new
programming language (e.g. Algol 68, Pascal) in 1-2 weeks) but my first
exposure to Java was a Sun 1 week course and that did remarkably little
for me.

What did the trick for me was to get the Wrox book, "Beginning Java" by
Ivor Horton and work from that. There's nothing more to pay once you've
got it: everything in it can be done using stuff that's already on your
computer or free downloads. All you need to work through the book is a
Java development kit and a decent text editor.

Download the Java J2EE SDK (software development kit) and the matching
J2EE documentation set from the sun website and install them.

If you're a Windows user you can use Wordpad for your text editor (if
you must), but PFE, the Programmers File Editor, (free download from
Simtel) is hugely better for programming tasks. For starters it can
automatically indent your program as you write it.

The documentation set is key. Its an enormous set of linked web pages
that documents the hundreds of standard classes that come as part of the
 SDK. Install it and learn your way around it: use it while working
through the book because it will really be your friend in future.

Java is like C - both are small languages that can do virtually nothing
without the contents of the Standard Library. In both cases learning
your way round the library is vital and a bigger task than learning the
language itself.

Once you have the basics then you can start using the fancy development
desktops like Eclipse or JBuilder. They are not needed at first and are
yet another thing to learn.

Oh yeah, have fun!

Signature

martin@   | Martin Gregorie
gregorie. |
org       | Zappa fan & glider pilot

Colin Hemmings - 19 Feb 2006 12:44 GMT
Hi There,
    I'm nowhere near the level of programmer that some of the people
are on here because I am still in education but I do feel I have some
advice to offer. I have been programming on some level for many years
(since school) but I have only just moved into the world of OOP. I
started off in procedural language (Pascal) when I was at school. This I
feel taught me the fundamentals of programming and in may opinion is a
well structured and easier to understand language for the beginner. When
I went onto OOP at uni I found it a big transition. Not necessarily in
terms of the actual code but in the way object work, interact and are
referenced.
So to summarize (sorry, summarise), if I had to teach someone to program
I would start them off in a language like Pascal and move on from there.
This because it was quite straight forward to pick up and understand
(and understanding is the important part). Also, this gives you
confidence to carry on, because if something is difficult to pick up
then it can be hard to stay motivated. But once you get started its a
fun, creative and challenging hobbies/job to do and is really rewarding
when a program starts to come together and work

Hope this has helped, or at least made some kind of sense

> I am a Java virgin.  I have never taken any computer classes or
> programmed in my life, so this is all new to me.  My background is more
[quoted text clipped - 28 lines]
> different books getting different POVs but also just exposing myself
> even though I don't understand most of what I'm looking at.
Daniel Dyer - 19 Feb 2006 13:03 GMT
> So to summarize (sorry, summarise), if I had to teach someone to program  
> I would start them off in a language like Pascal and move on from there.  
[quoted text clipped - 4 lines]
> fun, creative and challenging hobbies/job to do and is really rewarding  
> when a program starts to come together and work

I also went from Pascal (and BASIC before that) to Java.  While Pascal may  
be easier to pick-up, the problem with going from procedural to OO is that  
you have to unlearn a lot of things because it is a different way of  
thinking.  The key to feeling comfortable in Java is having a good grasp  
of objects.  If you come from a procedural background you have  
preconceptions about how to program that could be a hinderance in the OO  
world.  Ways of writing good code in Pascal are bad habits in Java.

Perhaps the original poster should try using BlueJ since it is designed  
specifically for teaching OO concepts in Java to beginners.

Dan.

Signature

Daniel Dyer
http://www.dandyer.co.uk

Michael Redlich - 20 Feb 2006 02:51 GMT
> I also went from Pascal (and BASIC before that) to Java.  While Pascal may
> be easier to pick-up, the problem with going from procedural to OO is that
[quoted text clipped - 3 lines]
> preconceptions about how to program that could be a hinderance in the OO
> world.  Ways of writing good code in Pascal are bad habits in Java.

Dan:

I, too, learned procedural programming before OOP.  I remember learning
FORTRAN IV on an IBM mainframe with keypunch cards.  From there it was
BASIC, Pascal, C, then finally C++ and Java.

I understand and agree with what you said about switching from
procedural to OOP.  However, I also think that it made me appreciate
OOP more.

A few years ago, Bjarne Stroustrup was interviewed about which language
would be better for a new programmer to learn - C or C++.  I was a bit
surprised that he recommended C++.  I suppose that I was thinking about
the learning curve for the STL, but then again, who says that a new
programmer would necessarily have to use the STL right away?

Since the OP was very new to any kind of programming, I recommended
that he learn the basics of any programming language: loops,
conditionals, etc., and learn how to avoid potential pitfalls such as
inadvertantly writing infinite loops.  I think that's more important
regardless of which programming language he chooses.

Sincerely,

Mike.

------
ACGNJ Java Users Group
http://www.javasig.org/
Colin Hemmings - 20 Feb 2006 14:56 GMT
I do agree with both of you, I probably wasnt clear. I just meant I
found pascal good for teaching me the basics of programming (loops,
conditions, passing parameters etc) but yes OO is a lot different and
requires a different mind set when is comes to solving a problem. Also I
agree on using BlueJ to get into Java and the OO side of programming. I
used this when first learning and still do on some occassions as it is
very clear in laying out classes and how they relate to each other, also
 it's good for inspecting the properties of a class while the code is
running.

>>I also went from Pascal (and BASIC before that) to Java.  While Pascal may
>>be easier to pick-up, the problem with going from procedural to OO is that
[quoted text clipped - 33 lines]
> ACGNJ Java Users Group
> http://www.javasig.org/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.