views:

598

answers:

12

I have a good understanding of object oriented programming but it's been a while since I programmed. I want to learn it again. What are the most important aspects of Java programming that are important to learn so I can identify myself as a programmer. I had trouble learning Swing before and I gave up but I want to try it again to learn it. How many years does it takes to be a good programmer?

A: 

I wouldn't say it takes years to learn it. You just have to write code, and learn from your mistakes.

Geo
You just have to write code and learn from your mistakes for years, that's all.
Michael Myers
I would not say that you only have to write code. Reading books/articles/blogs is a big part of it, too. Of course, if you have to choose between either coding or reading, go with coding.
Thilo
having to write code implies reading about stuff you don't know about. at one point or another you'll have to do something you don't know how, and then you'll do research.
Geo
+5  A: 

Some things may have changed since you left the language, here some personal proposals:

  • Servlets and JSP, you should take the dust off to this and include some EL (Enterprise Language)
  • A build tool (Maven or Ant), most of Java application are now built with the help of them.
  • Any Web Framework (Spring MVC, Struts2 or JSF are good choices)
  • IoC and ORM (Spring and Hibernate are good choices)
  • Take a look to Apache Commons and use them when possible

Also some features from Java 5+ like:

victor hugo
+8  A: 

One very important aspect is to learn the best practices of the language. One way to get up to speed about that quickly is to read Joshua Blochs book "Effective Java". I cannot recommend it enough.

Emil H
I wouldn't recommend this book for beginners.
ivan_ivanovich_ivanoff
I wouldn't recommend it to beginning programmers, but it's a great book for people that already know a bit of java and want to take it to the next level, and also to people that already know another language and is making the switch to java.
Emil H
This book sits next to my laptop at all hours of the day. Great ammo for code reviews when you want to just take out your anger on someone.
PSU_Kardi
+2  A: 

Being a good programmer isn't an issue of time so much as it is an issue of being able to perform certain tasks. Swing is certainly something you want to know if you want to make a graphics application. If you want other things to know about Java, learn how to use the collections framework, which defines different data structure interfaces in Java. Of course, learning how the data structures work and making them from scratch is nice. Other than that, it really depends on what you're going to be developing. I have found java.sun.com's API to be invaluable

indyK1ng
+1 for java collections framework. It's imensly helpful to know it well.
Emil H
A: 

I'd get a good beginners java book and go through it. A good free one is Thinking in Java http://www.mindview.net/Books/TIJ/. I'd also recommend getting a good IDE like Eclipse or Netbeans. If you want to do web development you can find some good tutorials on struts2 or JSF.

Hardwareguy
There is a philosophical title of a book(?) or article(?): "Teach yourself programming in 10 years". The frightening thing is: it's not a joke.
ivan_ivanovich_ivanoff
+2  A: 

I believe that practice is the most important aspect. Books give you "a map", and it's difficult to start without a map, but until you explore the territory on your own, you can't really understand it. So, pick any project that interests you, and just go ahead and implement it.

Regarding how many years does it take - see Teach Yourself Programming in Ten Years by Peter Norvig.

Igor Krivokon
thanks for the article
A: 

I would start with other APIs besides Swing, unless you have a real nead for it. Apache Commons has several components, like daemon starting, logging, IO, application launching, db connection pools... And the best part is, the source is there for you to read.

Some other things to learn: how some of Java itself works. Hunt down souce code (Suns, an opn source, it doesn't matter), look at classes like StringBuffer, and see how they work.

Good luck space cowboy!

mikesomeone
A: 

Learn the core language well and then learn about best practices.

Understand the limitations of the language and look for ways to improve on this. Apache Commons is a good source of knowledge for this.

After that, understand and learn concurrency with Java and the underlying memory model.

  • If you need to learn a GUI framework then look at Swing or Eclipse SWT.
  • If you need to learn a web application framework then pick one of the hundreds out there. I suggest looking at SpringMVC or Struts 2.
Jon
A: 

Of course you need to learn the basic features of Java before learning anything else.
Of the "advanced" language features, I would pick reflection.

For the GUI, there are several options. I would still pick Swing, since it is the most common tool.

For the web, learn servlets and JSP (so you know the basics), then learn a framework (struts, JSF, etc.).

There is no clear cut favorite in my opinion.

ammoQ
A: 

Pointers. Go back to C and learn pointers.

(almost) Everything in Java is a pointer, so if you don't understand them, there's no use in any of those fancy frameworks.

Yoni Roit
+1  A: 

In my experience the Java Tutorial is a good online resource for entry level programmers, as it is very clear in what it wants to say.

The "Head First Java" book is also really good (even though it doesn't look like it). The colloquial style is just a facade - there is hard core knowledge in there.

Thorbjørn Ravn Andersen
A: 

important thing is dont attend your class and enjoy your life.... for me java is so stress.... just enjoy your life.... with your friends in the mall and that is the important thing for me.... you get it???

melvin