views:

135

answers:

6

I am familiar (as a self-learner) with C, python and php such that i can solve some problems involving simple steps (for example, i easily do calculations for physics lab reports with python which normally would take 4x-5x times longer with a calculator).

The point here is, as doing such things, i learnt the idea / concepts of programming language and problem solving along with oop or fuctional programming etc.

Recently i have started Java and, with the familiarity of other languages, i am doing well for starters but i need guidence.

-I am thinking of learning syntax from sun java tutorials and then practicing with codingbat.com or similar sites. I need a reference book that i can study deeper aspects of the topics i am learning. What do you suggest about these?

-The problem is (and always have been) the lack of practice. I need coding and problem-solving practices sources. I stuck at the point where i can't figure out what to do next. Can you suggest any source (possibly like codingbat)?

If i could plan a learning trail, i can progress faster and efficiently. So i need ideas, comments, suggestions. Thanks in advance.

A: 

I used "Thinking in Java" to get started (I had a background in Object Pascal, C++ and Smalltalk). It might be outdated now.

Project Euler is a fun place to find project to sharpen your skills in a language. The problems only need a small part of a language and the discussions afterwards show the differences in approaches.

It will make you comfortable in the language, but it will hardly help getting to know the complete ecosystem/community and the hot frameworks and cool libraries.

Peter Tillemans
+1  A: 

Basically your first topics of knowledge will be:

  • syntax: Java has a quite straightforward syntax (actually the static type checker usually doesn't give you much choice) so you will easily learn it without problems, it is also quite similar to C for low level things
  • classes and interfaces and how inheritance works with Java
  • generics: first the simple part related to how to use parametric classes like collections, then more complex things like wildcards
  • threads: the are useful and easy to learn
  • I/O: streams and how they works (decorator pattern)
  • how java usually manage Events (listeners)
  • a gui API: Java comes with Swing, but you you may prefer SWT
  • some design patters: they are often good things to know to solve many typical problems
Jack
A: 

I need a reference book that i can study deeper aspects of the topics i am learning.
Aspects, like what? For me, most parts of java are rather simple and concise, so sun's tutorial will cover them fully. The real problem comes with all kinds of technologies, frameworks, libraries and servers. Once you've chosen one of them, you'll probably need a dedicated book or online resource to learn.

Can you suggest any source (possibly like codingbat)?
Well, as a long-time adept of topcoder, I'll suggest it. Even though starting there takes little time: you need register, get used to arena, etc. But once you're in, you can practice lots of problems (both very simple and very difficult) in many languages in a convenient way. You may also see other people's solutions (which I find particularly useful for learning), read editorials, participate in real-time contests and chat with other members.

Here is some random editorial (problems can be accessed through links), so you get the idea about kind of problems. 'Division Two - Level One' problems are usually simplest to start. And wiki help.

Nikita Rybak
+1  A: 

Go to javaranch.com

It's a fantastic resource for noobie Java programmers. Helped me a lot starting out.

Remember the key is practice so id also suggests taking on a number of small projects that make use of various libraries and give you good coverage. You can get suggestions for this on javaranch.

Fergal
+1  A: 

I learned Java after programming in C++ a large number of years ago. I had played with a number of Java side projects to start off and found the syntax very intuitive. I think I was playing with servlets with an old version of Tomcat.

Getting familiar with the Java API Docs as quickly as possible provided a good productivity boost. At this stage most problems are solvable and it is time to learn some style. The best Java style book is "Effective Java" by Joshua Block. Once I finished this I could solve most problems with solid production code.

The other things I would recommend:

  • Pick a good IDE (Eclipse/Netbeans/IntelliJ) and learn its features (code navigation / refactoring / code formatting / integrated unit testing etc)
  • Learn JUnit and practice Test Driven Development
  • Learn how to build java projects with Ant
  • Learn how to refactor code by hand and with the help of the IDE

Don't just learn a new language, embrace it and discover the best way to apply it to solve your problems.

iain
Thanks for the advice. Since I've asked this question, in two weeks, i made progress by hardworking while enjoying it.
bgo
A: 

This book is a good starting point, it was one I was recommended to read in the summer before I started my Computer Science degree. It goes right from the very basics into some more complex examples, and there are lots of programming tasks to try.

Fiona Holder