views:

309

answers:

12

Hi, I intend to start studying Java, completely self taught.

I program a little in HTML, Css, PHP MySQL and jQuery, I know they are "simpler" programming languages.

A good thing about the those languages is that you can start doing "useful" or "fun" things immediately.

In Java, as far as I know, it maybe quite a while before you get to the "fun" part.

What keeps me going, is to have little projects and goals, build this, solve that. (In programming and life).

And so, I ask you:

What should I expect from java, what should I be able to do: 1 week from now? and 1 month? What apps should/could I be building? How lonk did it take you to build your first functional/useful application? etc

I´m sure this dependes on the level of dedication you´ve got but I just want a general picture and your experience and feedback.

Thanks in advance!

NOTE:

Just to clarify this is NOT an open/philosophical question! I want to know a timeline, or how the Java learning process should be "IN ACTUAL JAVA TERMS".

+1  A: 

How fast you will get started building actual stuff depends on how much experience you have with other languages. If you have done a fair amount of work with jQuery or PHP, then you should be able to start building something real in a month give or take a few weeks. If you don't have a lot of experience with programming, expect to spend several months at least before you really get the hang of it.

Computerish
+2  A: 

If you've never done object-oriented programming (OOP), it will take some time for you to learn this well, but it's a valuable skill to possess and Java will teach and demonstrate the principles of OOP quite well.

I recommend getting a good Java book and getting familiar with the Java API for the version of Java you plan to learn from. If you haven't yet decided, just start learning with Java 1.6.

Java is a good language and platform to learn about, so just be patient and take small steps to grow your knowledge.

Bernard
nice! (15 characters)
Trufa
keeping in mind that OOP is really useful, but it's sometimes not the right thing to do - in principle, OOP's objects are "like" real-world objects, but with really complex objects in practice this abstraction often fails and people make ugly things in the name of OOP. If you don't know OOP, go learn it, it's great, you should make it holy! But a lot of people take that holiness way too far.
Vuntic
@Vuntic: As with anything else, OOP should not be bastardized.
Bernard
A: 

From my experience:

  1. One week of studying you need to read and understand Java 2 Certification Guide(http://www.amazon.com/Complete-Java-Certification-Study-Guide/dp/0782128254)

  2. Then all you need is to choose what you want: an android application, web application or an applet. All the time lines are different. For example in a month after finishing the book from point 1, you will be able to create good-enough applications on Android platform. To understand the web ( jsp and servlets ) you will need about 3 months. Won't tell you anything about Swing - not an expert =).

So, all you need is just a will to create applications. All the other will come soon.

Vladimir Ivanov
Hint: you don't want to write applets. :)
Mike Deck
Really good one! Thanks!
Trufa
@Mike SO TRUE... so true... but sometimes, you have to.
Vuntic
@Vuntic, really? Given the state of AJAX/HTML5, Flash, Silverlight, and Java Web Start, I don't think there's ever a situation where you have to use an applet.
Mike Deck
@Mike Deck. It is said, but true. In current project I have to make a communication from java-based web-application with low level native driver api. The best way is to use applet which uses jni and make communication between applet and servlet to transfer necessary data.
Vladimir Ivanov
@Mike In my current project, we have to render high-performance 3D graphics in a browser, so... we're using applets with lwjgl. It seems to be roughly 60% as fast as an offline program talking to opengl directly. Can you do that with anything else? Java Web Start is not an option.
Vuntic
applets are irrelevant for 99.999999999% of things now days, they are a red herring and a waste of time for someone learning java for the first time in 2010
fuzzy lollipop
@Vuntic you need to learn about WebGL http://www.google.com/search?q=webg
fuzzy lollipop
@fuzzy yeah, webgl is cool, but it's not working yet - is it?
Vuntic
apparently it is working for Google they used it in their HTML5 browser based Quake demo http://code.google.com/p/quake2-gwt-port/
fuzzy lollipop
+1  A: 

Since you already know programming, I think the best way for you to learn is to write an application and incrementally improving it. Start with a simple (bank) account management system in multiple stages. The following is a basic split up of how I would do that.

  1. Develop a basic console based application where you take the input from the user and store the account details in a Flat file. (Simple Java constructs, Looping, I/O from console, File operations).

  2. Then remove the flat files and start porting your data to a database and also develop a user interface with Swings/Applets (JDBC, Swing, Applet).

  3. Make your application multi-threaded (Multithreading, Concurrency issues).

  4. Now port your application to Web using Servlets and JSPs.

  5. Make it pretty with your HTML, CSS, Javascript knowledge.

  6. [Extra credit] If you want to get really adventurous and scale your app to millions of users: Swap your database with Bigtable and use Hadoop.

Of course, you need to follow clean design principles throughout this project, so that swapping out different layers is as seamless as possible. I can't probably comment on the timelines in general, but I would give each stage a week to two based on the amount of time I can put in.

Ravi Gummadi
Now thats what I call a plan!
Trufa
Seriously? A week or two? He *doesn't know* Java at all. Learning some of those things right is going to take him a long time...
Vuntic
@Vuntic: I have just put in an estimate of how much time it would take for me.
Ravi Gummadi
Oh... reading it closely, I see that you were talking about yourself instead of beginners. It's confusing.
Vuntic
+2  A: 

What you are able to in 1 week from now or 1 month is pretty much dependent on the amount of meaningful effort on your part.

A good place to start is the Sun's tutorial at their website.

If you are really serious about learning Java then buy a good book, for example Head First Java. Working through a well-written book on the subject will get you started faster than anything you might find on the web. Also, it can help you in avoiding the most common pitfalls and opens the perspective on things that can be done with Java.

After mastering the basics, you might want to do a Java developer certification exam to gauge the level of skills you have aquired so far.

And since most of Java development today is about websites then eventually you'd need to get familiar with Servlets (another book) and Spring (yet another book). The rest of it will come along the way.

Saul
Spring in Action is very easy to follow. Also have a look at the Spring Model View Controller tutorial for building web apps http://static.springsource.org/docs/Spring-MVC-step-by-step/ lol i didn't click your link and see that it was to spring in action :P good book! Oh and also head first design patterns.
DeliveryNinja
+1  A: 

Another option, if you are looking for some instant gratification would be considering a programming language built on the underlying Java infrastructure such as Groovy/Grails.

These may actually be more familiar to you with your JQuery and PHP background. The beautiful thing about them is that they compile down to byte code in exactly the same way that Java does.

I am in no way trying to start a flame war or say one is better than the other. They approach the problem differently, but with your background you may find it easier to get started there and still have the entire Java ecosystem to support you as you go.

jnt30
Not *exactly* the same way; they've got different, somewhat less efficient compilers.
Vuntic
That's a good point, you're correct. The structure (ie. class files) and interpreter (JVM) are the same. The actual underlying byte code comparison I am not very knowledgeable about.
jnt30
A: 

Java... like any other programming language it is not easy! However do not let that deter you in anyway, as long as you keep small targets and meet then consistently you should have no problems grasping the fundamentals. The very advanced java (c# and any other language) can be very complex to understand, this is where a greater understanding of the api is needed. When learning programming languages the best thing is to have a few sources you can refer to (too many can confuse a person), I found the book Java: How to Program by Dietel and Dietel VERY good!

As you have already done jQuery, PHP I think you will grasp a lot of the fundamentals quite quickly the other stuff such as generics, interfaces etc. is easy once understood. I agree with Bernard OOP is extremely important as is Design Patterns however as you grow into the programming language you will get very comfortable with them and no doubt you will find yourself thinking OOP? That is way simpler than person name described it! :)

Sorry I forgot to add: If possible see if you can program the GUI by yourself, you do not need a GUI editor despite what people say, it becomes easier but it requires time, just as HTML + CSS is simple after a few solid weeks working on it, the same thing will happen with Java Swing- all the components will become second nature!

Haroon
+2  A: 

Well, here is the classic Peter Norvig's post on how to learn a programming language in 10 years.

Ravi Gummadi
I had seen it some time ago. Thanks VERY good!
Trufa
A: 

If you really want to be a good java programmer I can think of no better study guide than Effective Java by Joshua Bloch. It will teach you how to be a professional grade software engineer and a great java programmer to boot. It is the best Java book I have read by a wide margin and I have read many.

elchuppa
Definitely a great book, but might be a bit difficult to understand for someone just getting into the language, especially if the OP isn't all that familiar with object-oriented design patterns.
JCD
Great book for someone at an intermediate level of OOA/OOA and Java, but NOT a good book for someone learning the language and concepts for the first time.
fuzzy lollipop
+8  A: 

To me there are really three separate aspects to being a good professional Java programmer, and while they do relate to one another, they can usually be learned somewhat independently once you have a basic knowledge of the language.

1. Object oriented design

This is IMO the most important and most difficult skill to learn as a Java developer. Getting to the point where you can effectively and efficiently decompose problems into objects and refractor existing code into a better design takes a long time. I've had a lot of great mentors and colleagues over the years who have helped me hone my skills in this area. If you're doing this all by yourself it's going to take a while to climb the learning curve.

I would think after a few months of consistently writing code and getting feedback on it you could reach the journeyman level. To become a master it takes years.

2. Tools

So much of modern Java development in a professional context is about being able to leverage tools. Go install Eclipse now. Java is a heavy weight language and without a good IDE you'll spend more time typing out boilerplate and fixing compiler errors than you will actually solving real problems. The flip side is that because Java is statically typed and highly structured, the tools can "understand" your code better than other languages and are therefore more powerful.

Defining a timeline for this one is tough, because it will depend a lot what specific problems you're trying to solve with Java. Getting to know your IDE is the one you'll have to do no matter what, and I'd expect you to be proficient after 2-4 weeks. After 3-4 months you'll probably know 90% of the techniques and tricks you'll actually use in this generation of the tool.

3. The Language

Knowing the basics of the Java language is definitely a prerequisite for the other two pieces, but if I had my choice between hiring someone who knew every line of the Java Language Spec by memory but was terrible at OO and still used notepad and javac vs. someone who was somewhat weak on advanced Java concepts, but could decompose problems well, and was proficient with a modern IDE, I'd take the second every time. Your knowledge of the nitty gritty details of the language will come as you try to solve new problems and are forced to push the boundaries of what the platform can do.

If you've got some programming experience, you should be able to learn enough of the syntax to be able to write a basic program within hours. It'll take you a couple weeks after that to learn the rest of the details and another month before all of that really becomes second nature and you can just write code without thinking about the syntax.

3a. The Libraries

I originally had this included as part of the language section, but it probably deserves it's own point. Learning about all the classes provided by the JDK is really important for becoming a proficient Java coder. You should strive to have a pretty complete knowledge of the entire java.lang and java.util packages (and to a lesser extent java.io.) In addition to that there are tons of open source libraries and frameworks available that have already solved a lot of the non-domain specific problems you'll face.

There's not really a timeline for this since you'll really just learn the classes as you need them. Just remember, if you're trying to solve a problem that applies to more than one domain there's probably an open source tool available to do it.

Mike Deck
Excellent answer, thank you VERY much!!
Trufa
+2  A: 

Java is probably the best choice for a beginner (for the same reaons, headache for seasoned developers) - it doesn't change for years (for the same period of time C# that was of the same background with Java has got closures, sophisticated libraries etc), and once you've learn it, you have way less problems with finding a job (because of billions lines of java production code that will require maintenance for the next 15-20 years).

Stig
By that logic, COBOL is even better for a beginner. It changes far less frequently than Java or C#, and there's billions of lines of production code that require maintenance.
Ken
+1  A: 

First start with some background information on Object Oriented Design and Analysis.

Then start with some background on Design Patterns, this is very important, because, this is what really makes Object Oriented programs "reusable" and all the supporting Java frameworks are much easier to understand if you can "see" the patterns that they are built upon.

Then get a good introduction book on Java. I would stay away from the certification books because they do not actually tell you anything from an actual practical implementation standpoint, they just want to see how much you can memorize.

I only recommend the Head First books because I have had friends, students and peers all recommend these books as great introductions to the ideas, especially the OOD/OOA and Patterns books.

fuzzy lollipop
Thanks!........
Trufa