FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » Java: Learning

   
Author Topic: Java: Learning
Phanto
Member
Member # 5897

 - posted      Profile for Phanto           Edit/Delete Post 
I plan on learning Java. Well, bully for me. Now to do it...

So I'm looking for a method of learning. Probably a book. Now the problem is I have no idea what kind of book is good. As such:

What Java learning aids would the people here recommend?

Thanks greatly in advance [Smile] .

Posts: 3060 | Registered: Nov 2003  |  IP: Logged | Report this post to a Moderator
Jay
Member
Member # 5786

 - posted      Profile for Jay   Email Jay         Edit/Delete Post 
What languages do you know? I guess if you’re a total beginner you’d need a different tool then someone who knows C++ or other object oriented languages.
Posts: 2845 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
King of Men
Member
Member # 6684

 - posted      Profile for King of Men   Email King of Men         Edit/Delete Post 
Indeed. If you already know some programming, then you should disregard this advice. But if you're new, I think you would find it helpful to think of a nice little project that you want to do, and look at your Java resources as aids towards that. A Langton's Ant sim, maybe - you can make cool variants on that. Or Conway's game of Life, again with variants. Or maybe a Tetris clone, if oyu feel ambitious.
Posts: 10645 | Registered: Jul 2004  |  IP: Logged | Report this post to a Moderator
Phanto
Member
Member # 5897

 - posted      Profile for Phanto           Edit/Delete Post 
Ummm... I know some html? *feels really stupid [Razz] *
Posts: 3060 | Registered: Nov 2003  |  IP: Logged | Report this post to a Moderator
Farmgirl
Member
Member # 5567

 - posted      Profile for Farmgirl   Email Farmgirl         Edit/Delete Post 
Hang out at Java Ranch for a great place to get started and people who can help.

FG

Posts: 9538 | Registered: Aug 2003  |  IP: Logged | Report this post to a Moderator
Jay
Member
Member # 5786

 - posted      Profile for Jay   Email Jay         Edit/Delete Post 
Also, Sun has some great stuff: http://java.sun.com/docs/books/tutorial/getStarted/index.html

By the way, don't feel stupid. It was just a question to see where to send you. Wasn't meant to make you feel bad.

Is this for work school fun?

Posts: 2845 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
Xavier
Member
Member # 405

 - posted      Profile for Xavier   Email Xavier         Edit/Delete Post 
My college used Java as its primary language while I was getting my BS degree in CS, so I wouldn't know how to start independently. I did use the Sun tutorials extensively while I learned, however, and those can be quite good.

The first thing you need to do is download the JDK, install it, and set up your classpaths and such following the instructions very carefully. Then make a simple java class, something like:

code:
public class MyJavaProgram{

public static void main(String[] args){
System.out.println("Hello World!");
}

}

And save it in a file called what you put as the class name plus .java as the extension. (MyJavaProgram.java in my example). Depending on if your class-paths are setup correctly, you should be able to compile the program by typing: "javac MyJavaProgram.java" from the command line in the directory your file is in. Then run the program by typing: "java MyJavaProgram".

If you see "Hello World!" print to the screen, you're in business [Smile] . If either of these steps display an error message, your classpath is probably setup wrong, and you may have some painful trouble-shooting ahead of you.

Anyway, when you get to this point, follow the Sun tutorial, and do a TON of experimenting. Play around. Make your own objects. Link them together in interesting ways. Object Oriented programming is insanely powerful, and it can even be fun.

I would suggest getting an IDE eventually (Eclipse being the most popular), as it will make your life a lot easier. If a full blown IDE is too complex for you at this point, at least get a decent text editor (there are a lot of free ones out there). Notepad is fine for your first couple of programs, but it makes your life tough for anything more than a couple of hundred lines.

If you have any questions on the specifics, feel free to ask hatrack. There are several experienced java developers here, including myself [Smile] . (I should soon be a Sun Certified Java Programmer, as soon as I get a chance to heavily experiment with all the new 5.0 features.)

Posts: 5656 | Registered: Oct 1999  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
Thinking in Java is a pretty decent book, both available (free) online and in hardcopy form (a more recent edition). The 'trails' on sun's java website aren't bad, either.

What do you want to do with Java? After you get past the beginning, what you should 'study' will vary depending on what you want to do. Typical goals include creating GUI applications, doing server-side stuff, making games (though java is less and less popular for that), processing data, et cetera.

Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
Oh, and I specifically suggest learning java through a *nix command line, if at all possible, be that a Cygwin bash shell on windows or an OS X Terminal or a Linux xterm.

IDEs are very powerful, but they're also good ways to avoid learning the nuts and bolts of a language. A syntax-highlighting text editor and the command line should be how you start off.

Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
ludosti
Member
Member # 1772

 - posted      Profile for ludosti   Email ludosti         Edit/Delete Post 
My father teaches Java. I'll ask him what books he'd recommend....
Posts: 5879 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
human_2.0
Member
Member # 6006

 - posted      Profile for human_2.0   Email human_2.0         Edit/Delete Post 
I learned Java in college and never used it. Until I had to set up the Magnolia CMS that happened to be written in Java and ran in Tomcat.

I would seriously recommend taking a class unless you plan on spending the next few years trying to learn. Maybe it is just me, but every language I tried to learn on my own took years unless I took a class, in which case it was a matter of months (or weeks, or days depending on the class intensity).

Posts: 1209 | Registered: Dec 2003  |  IP: Logged | Report this post to a Moderator
King of Men
Member
Member # 6684

 - posted      Profile for King of Men   Email King of Men         Edit/Delete Post 
IDEs are for sissies. Real Programmers use emacs.
Posts: 10645 | Registered: Jul 2004  |  IP: Logged | Report this post to a Moderator
ricree101
Member
Member # 7749

 - posted      Profile for ricree101   Email ricree101         Edit/Delete Post 
quote:
Originally posted by King of Men:
IDEs are for sissies. Real Programmers use emacs.

Or Vi


[ROFL]

Posts: 2437 | Registered: Apr 2005  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
Only puerile programmers of pastiches use anything but the one true text (well, line) editor, ed!
Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
human_2.0
Member
Member # 6006

 - posted      Profile for human_2.0   Email human_2.0         Edit/Delete Post 
Real programmers use punch cards.
Posts: 1209 | Registered: Dec 2003  |  IP: Logged | Report this post to a Moderator
Xavier
Member
Member # 405

 - posted      Profile for Xavier   Email Xavier         Edit/Delete Post 
quote:
IDEs are for sissies. Real Programmers use emacs.
Real unemployed programmers perhaps. Try and get a software engineering job and then don't use an IDE. Then explain why your productivity is half what your coworkers produce [Wink] .
Posts: 5656 | Registered: Oct 1999  |  IP: Logged | Report this post to a Moderator
human_2.0
Member
Member # 6006

 - posted      Profile for human_2.0   Email human_2.0         Edit/Delete Post 
Oh, and beware vi. "vi vi vi" is the mark of the devil.
Posts: 1209 | Registered: Dec 2003  |  IP: Logged | Report this post to a Moderator
human_2.0
Member
Member # 6006

 - posted      Profile for human_2.0   Email human_2.0         Edit/Delete Post 
Oh, and I don't know if anyone here uses a Mac, but TextMate looks like a SUPER powerful editor that Ruby on Rails folks use religiously. After watching some demos of TextMate, I can see why:

http://macromates.com/textmate/screencast.rss

It's cool.

Posts: 1209 | Registered: Dec 2003  |  IP: Logged | Report this post to a Moderator
IanO
Member
Member # 186

 - posted      Profile for IanO   Email IanO         Edit/Delete Post 
Fugu is right about first learning with a text editor. You need to learn the nuts and bolts of the language- not just the programming, but syntax of compiling, debugging, web apps, etc from a commandline, so you understand what you are doing.

That said, once you are comfortable with that, an IDE is ideal to increase productivity. You can let it do much of the work for you (generating stubs for beans, compiling, including dependencies, setting up web apps) while still having the expertise to edit the code that is generated (not as bad or fat as MS Frontpage, but still streamline-able). More than that, you will be able to use it intelligently (and you'll appreciate it much much more), letting it take care of tedious busy work and focusing on business logic.

Borland has one IDE, JBuilder (2005 version), that is free. Well, the FOUNDATION version (the basic one, but still quite powerful) is free. Upgrading is fairly easy and if you're a student you can get student pricing on Professional (~99$ in 2002).

http://www.borland.com/downloads/download_jbuilder.html

It's pretty nice, though I haven't used it (or Java, though I got certified as a Java 2 Programmer in 2002) for about 3 years. Right after getting certified, I started doing freelance programming that thrust me into the MS world (VB) and then I made the decision to move into .NET. The nice thing about Java (and JBuilder, for that matter) is that the foundation and transition to languages like C# (and IDEs like Visual Studio.Net) are fairly straightforward (though ASP.NET is sufficiently different from JSP as to require a steeper learning curve).

Posts: 1346 | Registered: Jun 1999  |  IP: Logged | Report this post to a Moderator
King of Men
Member
Member # 6684

 - posted      Profile for King of Men   Email King of Men         Edit/Delete Post 
quote:
Originally posted by Xavier:
quote:
IDEs are for sissies. Real Programmers use emacs.
Real unemployed programmers perhaps. Try and get a software engineering job and then don't use an IDE. Then explain why your productivity is half what your coworkers produce [Wink] .
Well, as a matter of fact, I have a programming job. And I use emacs, as do all my colleagues, except the Stone-Age types who stick to that survival of the electro-mechanical era, vi.
Posts: 10645 | Registered: Jul 2004  |  IP: Logged | Report this post to a Moderator
Xavier
Member
Member # 405

 - posted      Profile for Xavier   Email Xavier         Edit/Delete Post 
quote:
Well, as a matter of fact, I have a programming job. And I use emacs, as do all my colleagues
When I was in college, this was true of me and my coworkers on my research grant. It was a relatively small program, so the lack of an IDE did not hurt us too badly. Plus it wasn't a web-based application.

Now that I am working on a massive program, with many programmers, and having it be a full featured enterprise application, the lack of an IDE would completely kill us. Or we'd have to use several different applications to mimic what an IDE does for us.

How many programmers on your project, KOM? Do you use CVS at your job (or a different versioning system)? If so, do you use it through a front end or through the command line?

These answers might help me determine if you guys are stubborn, or just stupid [Wink] . For extremely small projects, IDEs aren't necessary, though they are still very helpful. Just the code-complete feature on Eclipse alone saves me so much time its not even funny. The fact that it displays compilation errors as I am coding saves considerable headache. The built in CVS functions make coordinating with 8-10 other programmers even possible. And without the ability to walk through somone else's code with the debugger, I simply could not do my job effectively (hundreds of System.out.printlns for the loss). Add in the Project Set plug-ins, Quantum DB plug-ins, server configuration and management options, J2EE support, and TONS of other features, and I probably produce 10-20 times what someone with Emacs could trying to do my job.

I wouldn't brag about sticking with stone-age tools. Its like being a carpenter, and not using an nail-gun, then bragging about it. Sure, you are more "hard-core" for using a traditional hammer, but someone can come in and triple your productivity.

Posts: 5656 | Registered: Oct 1999  |  IP: Logged | Report this post to a Moderator
SpiffWilkie
Member
Member # 8464

 - posted      Profile for SpiffWilkie   Email SpiffWilkie         Edit/Delete Post 
As far as books are concerned, I really enjoyed Head First Java. Just Java is also a good book to read through.
Posts: 18 | Registered: Aug 2005  |  IP: Logged | Report this post to a Moderator
Phanto
Member
Member # 5897

 - posted      Profile for Phanto           Edit/Delete Post 
Alright; thanks everyone the tips and advice! Started learning; hit objects, and am delving into methods and all that. Should be fun.
Posts: 3060 | Registered: Nov 2003  |  IP: Logged | Report this post to a Moderator
TomDavidson
Member
Member # 124

 - posted      Profile for TomDavidson   Email TomDavidson         Edit/Delete Post 
quote:
Well, as a matter of fact, I have a programming job. And I use emacs, as do all my colleagues, except the Stone-Age types who stick to that survival of the electro-mechanical era, vi.
Seriously? Do you do MUCH coding? Because you're the first programmer I've spoken with in years who doesn't use an IDE. It just doesn't make SENSE to code by hand anymore; it's not worth the time.
Posts: 37449 | Registered: May 1999  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
To be fair, emacs can be set up to pretty much be an IDE. The only feature it can't have that I know of (though a pretty useful one for compiled languages) is compile as you go. vi can't get quite as close, but it can have the most important features.
Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2