Results 51 to 75 of 78

  1. Post
    #51
    Hatch wrote:
    Eventually would like to get into Android Dev.
    Get comfortable with Java. Google have done a pretty good job with their tutorials/dev resources.

    http://developer.android.com/

    I advise using a dual core/2GB at a absolute minimum for the android emulator, but a quad/4GB would be preferable, especially if you plan on running more than one virtual android device at a time. Also consider getting a couple of physical devices (of different sizes/resolutions/etc) to test on.

  2. Post
    #52
    So I received my Beginners Guide to Java book (Fifth Ed.) and started reading up. Got to my first very simple program task and ran into a javac path issue where I had to set the path variable in Windows 7. No worries, sorted that out. But know when I try to compile I get the error below (I have replaced my directory names because they aren't important):

    C:\...\...>
    C:\...\...>cd C:\...\...\...\...\...\...\...

    C:\...\...\...\...\...\...\...>javac Example.java

    Example.java:9: error: cannot find symbol
    System.out.printIn("Java drives the Web.");
    ^
    symbol: method printIn(String)
    location: variable out of type PrintStream
    1 error

    C:\...\...\...\...\...\...\...>
    What is going wrong? I looked for a fix online but they all just said that I must have mispelled or mistyped something (which I have checked over and over again), but that doesn't seem to be the case.

    Also as a side note, I have to change directory every time I want to compile or run a program (because I save them - txt/program .java files - just in a documents folder and not in the /bin folder with the JDK tools). It's slightly annoying to have to 'cd' every time I want to compile a program. Can I add my projects/tutorial programs folder that I have made to the path variables in Windows 7 like that of the Java/bin directory for executing java and javac? This is all done in the windows CommandPrompt as well FYI. I'm interested in using NetBeans but am following my book for the easiest way just to grasp the basics.

    Hope I'm not hijacking this thread btw; didn't want to create a new one when this seems to be a good place to ask about things when 'Getting into programming'

    Cheers.

  3. Post
    #53
    System.out.println(data)

    lowercase 'L', not uppercase 'I'.

  4. Post
    #54
    Jordan NZ wrote:
    So I received my Beginners Guide to Java book (Fifth Ed.) and started reading up. Got to my first very simple program task and ran into a javac path issue where I had to set the path variable in Windows 7. No worries, sorted that out. But know when I try to compile I get the error below (I have replaced my directory names because they aren't important):



    What is going wrong? I looked for a fix online but they all just said that I must have mispelled or mistyped something (which I have checked over and over again), but that doesn't seem to be the case.

    Also as a side note, I have to change directory every time I want to compile or run a program (because I save them - txt/program .java files - just in a documents folder and not in the /bin folder with the JDK tools). It's slightly annoying to have to 'cd' every time I want to compile a program. Can I add my projects/tutorial programs folder that I have made to the path variables in Windows 7 like that of the Java/bin directory for executing java and javac? This is all done in the windows CommandPrompt as well FYI. I'm interested in using NetBeans but am following my book for the easiest way just to grasp the basics.

    Hope I'm not hijacking this thread btw; didn't want to create a new one when this seems to be a good place to ask about things when 'Getting into programming'

    Cheers.
    Dude, use NetBeans or Intellij IDEA Community because it'll make your life easier. Sure, no harm in using javac/java manually to learn the basics, but once you've done that, use a decent IDE so your learning is about concepts and not syntactical errors.

  5. Post
    #55
    csikh wrote:
    System.out.println(data)

    lowercase 'L', not uppercase 'I'.
    Wow, I'm such a rookie, haahahha. Thanks for that csikh!

    Edward Diego wrote:
    Dude, use NetBeans or Intellij IDEA Community because it'll make your life easier. Sure, no harm in using javac/java manually to learn the basics, but once you've done that, use a decent IDE so your learning is about concepts and not syntactical errors.
    So does NetBeans essentially save me from having to use the CommandPrompt for everything? Is it like a word processor, compiler and runtime all in one? OR at least does it combine all of those Java tools under one 'roof'? I just didn't want to confuse myself any more as the book/guide I'm using to learn the basics does everything through the traditional (?) way of cmd. That being said, it did recommend NetBeans to users who already had programming experience but said 'in order to follow the tutorials, it's easier and often quicker to use cmd' (something along those lines anyway.

  6. Post
    #56
    As far as I understand, yeah. You just click compile and run. For starting off do it the way you are thru command prompt. It's definitely something that's useful if you progress to a *nix OS doing C/C++.

  7. Post
    #57
    Jordan NZ wrote:
    So does NetBeans essentially save me from having to use the CommandPrompt for everything? Is it like a word processor, compiler and runtime all in one? OR at least does it combine all of those Java tools under one 'roof'? I just didn't want to confuse myself any more as the book/guide I'm using to learn the basics does everything through the traditional (?) way of cmd. That being said, it did recommend NetBeans to users who already had programming experience but said 'in order to follow the tutorials, it's easier and often quicker to use cmd' (something along those lines anyway.
    Yup. So for example, if I take your program with the error and stick it in my IDE (Intellij IDEA):



    It flags the error straight away. The immediate advantage of an IDE is making Java's objects more easily accessible via autocompletion of methods etc. (in Python or similar, (like Clojure) you can interactively poke objects, but Java is less accessible, hence an IDE helps for exploration.)

    So, it flagged printIn as not being a member (method/function or field/value) of System.out. So I type [font=monospace]System.out.[/font] and then press ctrl + space to autocomplete, and it gives me a list of members of System.out



    The IDE also makes it easy to see which parameters a method takes, read the Javadoc documentation for code, etc. etc.

    I can then compile and run the code by right clicking on the class and selecting Run. The output then appears in my IDE. The other main advantange to an IDE is you can easily debug your code if you can't figure out the cause of a problem. But you'll cross that bridge when you come to it.



    When you start writing more complex code, a good IDE will save you heaps of time when improving your code. If you rename a class or method, for example, or reorder the arguments to a method, manually changing it everywhere is a slow and tedious process. A decent IDE will do it for you with a couple of keystrokes or clicks.

    There is an initial learning curve to an IDE, but Netbeans has some good tutorials out there, and it'll save you time in the long run. And of course, just ask in here if you have any problems, plenty of people in here will be able to help.

  8. Post
    #58
    Thanks Edward! Very informative. Should I try to learn using an IDE, or just stick to the CommandPrompt way while grasping the language?

    Also, can I install NetBeans after the JDK is installed, or do I have to install them as a bundle? Are their advantages to the latter method (i.e. does NetBeans organise the class paths automatically, etc)?

    Cheers!

  9. Post
    #59
    Jordan NZ wrote:
    Thanks Edward! Very informative. Should I try to learn using an IDE, or just stick to the CommandPrompt way while grasping the language?
    Whatever works for you man. I'd recommend an IDE when you start needing more than one class.

    Jordan NZ wrote:
    Also, can I install NetBeans after the JDK is installed, or do I have to install them as a bundle?
    Nope you don't, you'll just have to configure Netbeans and tell it where the existing JDK is.

  10. Post
    #60
    Jordan NZ wrote:
    Thanks Edward! Very informative. Should I try to learn using an IDE, or just stick to the CommandPrompt way while grasping the language?

    Cheers!
    This depends, doing things outside of an IDE is a great way to learn the syntax of the language and understand writing the basics of code, however it can also take a lot of time debugging why things arn't working (which is not a bad thing always).

    I learnt php using notepad and while it was good, I always made silly syntax errors which can take a while to spot, now I use an IDE I spend my time looking for input/logic errors.

  11. Post
    #61
    Is netbeans good at working with android? I'd be keen to try it out if it is.

    Aside, anthrax2, it wouldn't hurt to become familiar with SQL if you're not already. Its used with most programming languages, and there are some non-programming tasks where you might have occasion to use it also.

  12. Post
    #62
    Blue Vein CHEESE wrote:
    Is netbeans good at working with android? I'd be keen to try it out if it is.

    Aside, anthrax2, it wouldn't hurt to become familiar with SQL if you're not already. Its used with most programming languages, and there are some non-programming tasks where you might have occasion to use it also.
    If you want to work with Android your best bet is Eclipse as it handles the virtual devices nicely. See here: http://developer.android.com/sdk/installing.html

  13. Post
    #63
    Duck wrote:
    This depends, doing things outside of an IDE is a great way to learn the syntax of the language and understand writing the basics of code, however it can also take a lot of time debugging why things arn't working (which is not a bad thing always).
    The downside in Java is having to manually provide a classpath.

  14. Post
    #64
    Stevie wrote:
    If you want to work with Android your best bet is Eclipse as it handles the virtual devices nicely. See here: http://developer.android.com/sdk/installing.html
    Intellij IDEA Community does too. http://www.jetbrains.com/idea/featur...e_android.html

  15. Post
    #65
    I'd use IDEA over pretty much everything

  16. Post
    #66
    porges wrote:
    I'd use IDEA over pretty much everything
    Hehe, I use it for Java, Scala, Android dev, Python, PHP, Ruby, HTML, JavaScript, ActionScript, CoffeeScript, and Clojure. Not Perl though, it doesn't do Perl.

  17. Post
    #67
    My preference is Eclipse - it does everything I use (C/C++, Python, a wee bit of Java, etc). I'd definitely use an IDE over just a text editor - it's so much nicer.

  18. Post
    #68
    Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.

  19. Post
    #69
    Stevie wrote:
    Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.
    Not for languages where you need to manage project files, or where code completion is useful.

    I use Sublime Text in Vim mode for Haskell.

  20. Post
    #70
    Stevie wrote:
    Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.
    I'm here!! Use macvim all day for ruby and about to switch to it for PHP as well I think. It's becoming harder and harder to go back.

  21. Post
    #71
    Stevie wrote:
    Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.
    I use Vim as my daily text editor, and for Perl, but I don't typically write code in text editors, even if they're text editors with syntax highlighting. I mean, my daily work is 300M of source code.

    Several of my workmates have Vim plugins for IDEA... and Firefox.

  22. Post
    #72
    Stevie wrote:
    Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.
    I use Vim, primarily for R and Python development. Became pretty swift as a text editor when I managed to piece together something not too dissimilar to Intellisense.

  23. Post
    #73
    I love vim because there's always something cool to learn. I'm still pretty new to it, but was already quite productive with it, but (n00b, but whatever) didn't realise about A and I did beginning and end of line insert, already this has made me more productive again.

    It's just one of those things that has a super difficult learning curve, but once you get enough to get by day to day, you can hang in there and enlightenment slowly comes.

    FWIW this is the article that convinced me to try it properly (well that and all the Enspiral guys use it...): http://yehudakatz.com/2010/07/29/eve...vim-was-wrong/

  24. Post
    #74
    Stevie wrote:
    If you want to work with Android your best bet is Eclipse as it handles the virtual devices nicely. See here: http://developer.android.com/sdk/installing.html
    I already do android stuff in Eclipse, was more curious to know about peoples experiences doing android dev in NetBeans, and perhaps other environments.

    Current project is an app for one specific device, a 7 inch galaxy tab. Not having to worry about different screen sizes/densities is awesome!

  25. Post
    #75
    Stevie wrote:
    Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.
    Oh man I just shaved my neckbeard. I used to advocate these options, but I'm now quite happy with Eclipse CDT. Anyway, OP's question has an obvious answer: learn x86 assembly first. It's everywhere man.