Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

What is the most effective way/method of learning Java?

  • 17-01-2013 1:00pm
    #1
    Closed Accounts Posts: 734 ✭✭✭


    I'm currently trying to learn some of the basics. There are many books, online tutorials and plenty of videos on YouTube, and slowly i am picking up on some simple Java fundamentals.

    Ive browsed some Programming forums, and a numbers of books seem to be highly recommended (Head First Java, Effective Java etc), so im thinking of trying to track down affordable copies of these if possible to aid me.

    I'm wondering if anyone has any info on the most effective or easiest way to learn, or is it just a case of continuous practice and self education?


Comments

  • Registered Users, Registered Users 2 Posts: 1,686 ✭✭✭RealistSpy


    Simple question.
    Install Eclipse and Practice, trust me it's the most efficient way.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Work your way through the Java Tutorials and think about things that would be helpful to you, then go and develop them.


  • Registered Users, Registered Users 2 Posts: 3,945 ✭✭✭Anima


    Probably the best way is repetition. The more code you write the more it will become intuitive and click together eventually.

    For the first few years of programming, I found a lot of it is battling the syntax and thinking / solving problems in terms of code. After that, the coding is the easy part and it's thinking about the overall structure and making the right decisions that become the hard part.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Eclipse is the industry standard I guess, but I recommend you get TextPad as you can compile and run your applications from within it, but it doesn't give you loads of code checking and auto-completion features : features which are an advantage later but will reduce opportunities to learn at the start.


  • Registered Users, Registered Users 2 Posts: 1,731 ✭✭✭GreenWolfe


    OP if you aren't a fan of Textpad (or if you're not willing to pay for it) you can also use the Java compiler with another text editor, Notepad++. There's a handy guide here:

    http://www.cs.auckland.ac.nz/compsci101s1c/resources/Notepad/Notepad++.pdf

    Using a text editor and compiler is definitely recommended, you'll get a much better grasp of the basics that way.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 52 ✭✭iFergal


    If reading is your thing, books are sure to be a good start. However, I do highly recommend the video tutorials at TheNewBoston.org.


  • Closed Accounts Posts: 734 ✭✭✭Tom_Cruise


    Thanks for all the replys.

    I haven't found it to challenging thus far - but im only covering the basics but i know i will get stuck and maybe lost as it gets tougher.

    Practice practice practice it is so!

    Just out of curiousity, how long does/would it take to become competent and some what confident programming Java? would 2 years be a reasonable estimate (providing the hours were put in)?


  • Registered Users, Registered Users 2 Posts: 2,300 ✭✭✭PixelTrawler


    Well, I don't know Java at all.

    But I have been coding c# for 9 years. The one thing I've learned is the more I learn, the more I learn theres so much about the language I don't know...

    And c#'s not a million miles off Java

    Two years should give you a decent grounding... you will learn every single day you use the language. Its very hard to define what makes one competent, I still don't feel fully competent. Theres always ways to improve and you will always look at the code you wrote 6 months ago and realise it could have been written so much better.

    Also the tech never stays still and will likely evolve faster than you can learn.
    After all, the language itself is being developed by a vast number of people.

    I would recommend as well as learning the language fundamentals
    a) get a hold of the language specification
    b) get a good OO patterns book


  • Registered Users, Registered Users 2 Posts: 27,370 ✭✭✭✭GreeBo


    Evil Phil wrote: »
    Eclipse is the industry standard I guess, but I recommend you get TextPad as you can compile and run your applications from within it, but it doesn't give you loads of code checking and auto-completion features : features which are an advantage later but will reduce opportunities to learn at the start.

    I'm not sure I agree with this.
    What learning (that you need) is it reducing?
    If it saves you spending time trawling through an api for the correct method name to use or find a misplaced bracket....I dont see that as not learning Java.
    You are never going to be writing any real, deployable software for someone from outside an IDE these days...and tbh if you are then I think its just for the "look at me, I code in vi" type of people.
    Using an IDE means you spend more time solving the business problems and creating features than you do trying to find out what is wrong with your "hammer".

    To me its similar to the argument around learning something like basic jdbc;
    there comes a time when we should accept that you are never going to roll your own jdbc package, create your own pooling logic etc. Its been done, use the tools that make your life easier...but understand why/how they work.

    You shouldnt need to get burnt to learn that fire burns....


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Well in my experience it helps bring up trouble shooting skills from the start. Also, trawling through an API has it's advantages as it helps a newbie to learn how to navigate Java docs. Both important skills.

    Also: VI - why do people have such a problem with its users?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 27,370 ✭✭✭✭GreeBo


    Evil Phil wrote: »
    Well in my experience it helps bring up trouble shooting skills from the start. Also, trawling through an API has it's advantages as it helps a newbie to learn how to navigate Java docs. Both important skills.

    Also: VI - why do people have such a problem with its users?

    Trouble shooting what though? I would argue that its often trouble shooting stuff that you shouldnt need to care about. A good IDE will prevent you from getting into lots of trouble that a text editor wont.
    Who wants to spend time on compilation errors that an IDE will warn about before you even hit save?


    No problem with VI. But I wouldnt use it to write code, in the same way I wouldnt use a brick to hammer in a nail.


  • Registered Users, Registered Users 2 Posts: 232 ✭✭lemon_remon


    Learning a language with an IDE is like learning maths with a calculator and never actually learning how arithmetic works.


  • Registered Users, Registered Users 2 Posts: 27,370 ✭✭✭✭GreeBo


    How does a text editor teach you how java "works" exactly?

    Its a place to write code, just like an IDE, its just not designed for that purpose.
    Learning is up to the individual, an IDE makes it easier, a text editor makes it harder, I dont see why you think coding in an IDE means you dont understand what you are writing, its not AI, its still you writing the code.

    99.999...% of new software is written in an IDE...I learn new libraries while coding in an ide...new frameworks....are you saying that anyone who learns something new while using an IDE doesnt really understand it?
    Did you go back and start using textpad when Spring came out...just to make sure you understood it?

    You can learn just as much about a language using an IDE, if not more, because its far easier to see how things fit together.
    Its far easier to check available API's, read documentation, debug to see whats actually happening.

    Enjoy debugging through something with notepad?

    Use the right tool for the job:-

    Integrated Development Environment - An environment for developing
    Text Editor - for editing text.


  • Registered Users, Registered Users 2 Posts: 12,349 ✭✭✭✭starlit


    Learn by doing and online projects I suppose or join a club that might do it.

    To be honest I tried learning it through a book it helped but to be honest it only helped me understand it rather than code it. I found it hard to code Java off my head without some help from book/online it was one of those codes I had difficulty learning compared to other coding languages I flew through them for what ever reason Java was never my strong point like maths/accounting! :(

    Understanding it is half the battle but being able to write the code on paper and on screen without help/books/notes is a great indicator you know your stuff regarding Java!

    Takes a lot of practise to get it right, its like any language you either pick it up grand or your fluent or what ever but its struggle if you finding it difficult to learn it and reproduce it compared to other programming/web/OS programming languages!


  • Registered Users, Registered Users 2 Posts: 53 ✭✭onlyup


    If you're new to programming in general, I would recommend using an IDE and would back up what GreeBo said.

    You will have so many headaches using a plain text editor and it will just put you off.

    And just as a side note, my college course started off using an IDE and not a plain text editor.


  • Registered Users, Registered Users 2 Posts: 53 ✭✭onlyup


    doovdela wrote: »
    Learn by doing and online projects I suppose or join a club that might do it.

    To be honest I tried learning it through a book it helped but to be honest it only helped me understand it rather than code it. I found it hard to code Java off my head without some help from book/online it was one of those codes I had difficulty learning compared to other coding languages I flew through them for what ever reason Java was never my strong point like maths/accounting! :(

    Understanding it is half the battle but being able to write the code on paper and on screen without help/books/notes is a great indicator you know your stuff regarding Java!

    Takes a lot of practise to get it right, its like any language you either pick it up grand or your fluent or what ever but its struggle if you finding it difficult to learn it and reproduce it compared to other programming/web/OS programming languages!

    What languages did you find easier to pickup than Java?


  • Registered Users, Registered Users 2 Posts: 52 ✭✭iFergal


    Agreeing with GreeBo here, I don't understand why on earth you would want to learn from a text editor as opposed to an IDE - all it will do is really annoy you. I do realise that using a text editor occasionally to test your knowledge is good practice, but not while learning.


  • Registered Users, Registered Users 2 Posts: 12,349 ✭✭✭✭starlit


    onlyup wrote: »
    What languages did you find easier to pickup than Java?

    CSS, HTML, PHP, SQL, Unix, actionscript a bit hard, VB isn't too bad but difficult at times especially VBA, Ajax is ok, only recently learning it and Javascript. wouldn't say javascript that easy to learn but its bit easier than java! Same applies to perl and Python (both that and java script a bit of a pet hate of mine) annoying though in terms of looking for work as java seems to be a major requirement compared to other programming languages. I rather web programming or os programming over software programming to be honest. I think a lot of it is self learning that way you get an idea what you like and good at in terms of programming. Its something you can learn on the side in your own time.

    Most of them I learnt in college but javascript and ajax I am currently learning through an online course as only barely touched on javascript/perl and a little python in college, vb just touched the surface, but not enough to work in it compared to the other programming languages, but rubbish at java though way better at the others.


  • Banned (with Prison Access) Posts: 1,435 ✭✭✭areyawell


    Download BlueJ, great for beginners. Don't need eclipse yet.

    A decent introduction book is good as well.


  • Closed Accounts Posts: 799 ✭✭✭Logical_Bear


    I started off compiling from the command line(i dont earn a living at coding,more just amateur fluting about :) ) and the one thing I did learn from it was class paths and the like.I found I spent half my time fixing typo's:DI also found once a project went past a couple of classes it was a pain in the hole.

    With eclipse it just makes it a hell of lot easier to code.The IDE wont tell you why you're getting NullPointerExceptions or how threading works and why you should/have to use try/catch clauses and so on.

    @ the op like a lot of people have said get coding!As you learn more of the java language start making more ambitious projects that force you to explore what you know more and hopefully make yourself say 'well what if I could get the code to do this',a quick google turns up that you can indeed do the extra feature you want and before you know it you're learning even more about java and what it can do.

    Again,i'm just an amatuer coder and the majority of posters on this forum work day in,day out with code and can probably give better advice than I can


  • Advertisement
  • Closed Accounts Posts: 734 ✭✭✭Tom_Cruise


    Again, thank you all for the reply's.

    One question i have (probably a stupid question), but when coding i have to always refer to code that i have already written as at times i forget the syntax or just get some what confused in the layout etc. Do experienced users have this problem? Do they literately know all the code and are able to reproduce it from the memory - or do they also need to use references?

    Also i should of added that i have been using BlueJ. I haven't used anything else so i cant compare it but so far it seems to be ok for me.


  • Closed Accounts Posts: 799 ✭✭✭Logical_Bear


    The more common stuff i use from memory.I also have a folder with notepad documents with some of the trickier code or methods i have made that can be used again.

    here's a few websites that have coding projects for you to do that will help your code improve


    http://codekata.pragprog.com/2007/01...ackg.html#more

    http://www.codechef.com/

    http://codingbat.com/


  • Registered Users, Registered Users 2 Posts: 27,370 ✭✭✭✭GreeBo


    Tom_Cruise wrote: »
    Again, thank you all for the reply's.

    One question i have (probably a stupid question), but when coding i have to always refer to code that i have already written as at times i forget the syntax or just get some what confused in the layout etc. Do experienced users have this problem? Do they literately know all the code and are able to reproduce it from the memory - or do they also need to use references?

    Also i should of added that i have been using BlueJ. I haven't used anything else so i cant compare it but so far it seems to be ok for me.

    An IDE will help you with syntax, etc but its pretty common to not remember the exact format of something (until/unless you are using it regularly)

    References are fine, you dont need to have all the code in your head, anymore than you needed to learn off the mathematical tables back in school.

    Seriously, install Eclipse or STS or some full IDE and see what you think.
    For the relatively small ramp up time it will save your hours, and if you are going to be coding as a job, you well need to learn multiple IDE's at some stage.


  • Registered Users, Registered Users 2 Posts: 12,349 ✭✭✭✭starlit


    Its difficult to learn java from memory unless you understand it and write Java code without notes/books. You could easily write/type it wrong and mess up the whole code.

    Once you understand the principles of coding, layout, functions and so on and what the purpose of each line of code is doing - method, implementation, is it an integer, what value is it and so on. There is a slight difference too between how codes are presented like PHP for example. The concepts are the same though just how you write the code varies on the type of programming language you doing. Once you have learnt one its handy when learning another one, some people its like once you learnt one language you learnt them all programming is like that but you still need to understand that each programming language varies in format and so on. Ruby be slightly different to VB.

    I don't know if codeacademy does Java but it does Javascript alright great way to teach you the principles of coding in Javascript and other web programming languages especially if you not learn them before but if you have great way to brush up on code for fun!


  • Registered Users, Registered Users 2 Posts: 134 ✭✭d4v1d


    In my experience it depends on what you want to learn it for.

    For any job in Java you will have to learn how to use and IDE so it's worth jumping in at the beginning and getting used to it. (I'd say go for Intellij!)

    If you learning Java however for one of the certifications then I'd say just use a text editor and command line compiler. You'll need to be able to compile code in your head to pass the exam.

    I was using java comfortably enough in an IDE for a year or two before I tried for the certification. Once I started the study I realized how much was being done automatically in the background via the IDE without fully understanding why. Using text editor filled in a lot of gaps and improved my confidence. But it wasn't a fun way to learn :)


Advertisement