This is topic Java: Learning in forum Books, Films, Food and Culture at Hatrack River Forum.


To visit this topic, use this URL:
http://www.hatrack.com/ubb/main/ultimatebb.php?ubb=get_topic;f=2;t=042974

Posted by Phanto (Member # 5897) on :
 
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] .
 
Posted by Jay (Member # 5786) on :
 
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.
 
Posted by King of Men (Member # 6684) on :
 
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.
 
Posted by Phanto (Member # 5897) on :
 
Ummm... I know some html? *feels really stupid [Razz] *
 
Posted by Farmgirl (Member # 5567) on :
 
Hang out at Java Ranch for a great place to get started and people who can help.

FG
 
Posted by Jay (Member # 5786) on :
 
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?
 
Posted by Xavier (Member # 405) on :
 
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.)
 
Posted by fugu13 (Member # 2859) on :
 
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.
 
Posted by fugu13 (Member # 2859) on :
 
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.
 
Posted by ludosti (Member # 1772) on :
 
My father teaches Java. I'll ask him what books he'd recommend....
 
Posted by human_2.0 (Member # 6006) on :
 
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).
 
Posted by King of Men (Member # 6684) on :
 
IDEs are for sissies. Real Programmers use emacs.
 
Posted by ricree101 (Member # 7749) on :
 
quote:
Originally posted by King of Men:
IDEs are for sissies. Real Programmers use emacs.

Or Vi


[ROFL]
 
Posted by fugu13 (Member # 2859) on :
 
Only puerile programmers of pastiches use anything but the one true text (well, line) editor, ed!
 
Posted by human_2.0 (Member # 6006) on :
 
Real programmers use punch cards.
 
Posted by Xavier (Member # 405) on :
 
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] .
 
Posted by human_2.0 (Member # 6006) on :
 
Oh, and beware vi. "vi vi vi" is the mark of the devil.
 
Posted by human_2.0 (Member # 6006) on :
 
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.
 
Posted by IanO (Member # 186) on :
 
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).
 
Posted by King of Men (Member # 6684) on :
 
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.
 
Posted by Xavier (Member # 405) on :
 
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.
 
Posted by SpiffWilkie (Member # 8464) on :
 
As far as books are concerned, I really enjoyed Head First Java. Just Java is also a good book to read through.
 
Posted by Phanto (Member # 5897) on :
 
Alright; thanks everyone the tips and advice! Started learning; hit objects, and am delving into methods and all that. Should be fun.
 
Posted by TomDavidson (Member # 124) on :
 
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.
 
Posted by fugu13 (Member # 2859) on :
 
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.
 


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