Anyone Know Java? How Did You Learn It?

Page 1 of 1 [ 6 posts ] 

haruka
Blue Jay
Blue Jay

User avatar

Joined: 14 Mar 2010
Gender: Female
Posts: 83
Location: Canada

25 Jul 2011, 3:51 pm

Hi all,

I am interested in learning to program in Java (mainly because I like Android and thought Java might be a good starting point for learning to program).

How have people learned it? Only through school? Or did some read books and teach themselves? Any recommendations?

I really just want to start it / try it. I think I have the aptitude for programming in general.

I am techie but the last time I programmed was in basic in Junior High School.

Any input would be greatly appreciated.

Thanks!



dunbots
Veteran
Veteran

User avatar

Joined: 2 Jan 2011
Age: 30
Gender: Male
Posts: 2,721
Location: Washington, USA

25 Jul 2011, 3:57 pm

My only advice is to either get a book that teaches it, or to learn it by messing with source code and learning what does what, depending on your learning style.



FearOfMusic
Veteran
Veteran

User avatar

Joined: 3 Jun 2011
Age: 36
Gender: Male
Posts: 638

25 Jul 2011, 5:01 pm

Well if you already have done some programming then you will be miles ahead of someone who is just starting out! Granted, BASIC dialects are much, much different from Java you should be able to pick it up. Java should be a good second language choice though, it introduces more advanced programming constructs, such as generics and classes, but hides away some of the ugly details C/C++ and others prominently feature (pointers come to mind).

How to learn a programming language? I think some of this depends on your learning style but there is one thing that is definitely true about programming: it is not a spectator sport! I think the first language I started learning in elementary/middle school was QBASIC and at some point I did read a 'Teach Yourself QBASIC in 31 Days' book or something. I didn't actually read that right when I first started out I don't think, but it was kind of helpful. If you use a book though there is one thing you have to promise to do! :) Don't just read the text and retype the examples in the book to see that they work... go a step further and modify them a bit! Try to make them do slightly different things, this kind of gives you the ability to write programs independent of just mashing together tutorials and examples online, it gives you more of an 'independent' mind.

Another great thing to do is read other peoples code, not nearly enough people do this. For the past few months I have been probably reading 3-4 times more code than I have written. Currently I am reading the source code to the GNU Mach kernel. There really is no 'right' way to read code and it is quite challenging to do for a large project but it is something I would highly recommend you do. Find something in Java that isn't too complex or large and just read the source code, try to get a feel for how it works overall, get a feel for how the developers format their code, when they use comments, what language constructs they use, and always ask 'why did they do XYZ?'. What you find by reading other programs is what common features are used in a language, how they are used, what mistakes people make, etc. Believe me though, when you first start reading the code to someone else's large project you should probably feel overwhelmed and lost... that's a good thing!

Mentors are also nice to have, I never have had one but one person I know I do use a someone to critique my work (I also critique their work). It is nice to have someone that you can show them pieces of code and they can help you find bugs, suggest improvements, bounce ideas off of, etc.


_________________
((12+144+20+3*(4^(1/2)))/7)+5*11 = (9^2) + 0


Wurzel
Raven
Raven

User avatar

Joined: 3 Aug 2008
Gender: Male
Posts: 107

25 Jul 2011, 6:00 pm

haruka
Blue Jay
Blue Jay

User avatar

Joined: 14 Mar 2010
Gender: Female
Posts: 83
Location: Canada

25 Jul 2011, 9:21 pm

FearofMusic: Thanks so much for the advice! I will definitely take it. It sounds exactly like the way I would do it too (as in, it fits very well with my learning style). I will read about Java then read some source code, practice and play around with it as well. Thanks also for the confirmation on Java being an acceptable 2nd language choice. :)

Wurzel: Thanks for the link!

Does anyone currently have a job where they use their Java programming skills? If so, what do you do? How do you like it? Do you find it stressful (turnaround time stress?)



Meow1971
Sea Gull
Sea Gull

User avatar

Joined: 27 Apr 2011
Age: 53
Gender: Male
Posts: 210

26 Jul 2011, 5:46 am

I use Java at my current job and the turnaround time is not too stressful. Unfortunately each environment is different. I would suggest checking out The Joel Test as a way to screen out some of the less suitable places.

In addition to the previously mentioned on-line tutorials and looking at other people's source I used Selenium (yes the testing tool). I would do a Selenium record-playback test, look at it in a language I knew and then look at it in Java.