| GP Forums / Tech Discussion / Topics / Programming & HTML | |
| Getting into programming | |
| Page: 1 2 3 4 |
Blue Vein CHEESE
The Awesomeinator
|
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. ---
Steam: blueveincheese |
|||||||||||
|
|
||||||||||||
Jordan NZ
Noble
|
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. ---
<<Jordan>> |
|||||||||||
|
|
||||||||||||
csikh
Prince
|
System.out.println(data)
lowercase 'L', not uppercase 'I'. |
||||||||
|
|
|||||||||
Edward Diego
In The House
In A Heartbeat |
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. ---
|
||||||||||||||
|
|
|||||||||||||||
Jordan NZ
Noble
|
Wow, I'm such a rookie, haahahha. Thanks for that csikh!
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. ---
<<Jordan>> |
||||||||||||||
|
|
|||||||||||||||
nzraven
Noble
|
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++.
---
-teh llama- |
||||||||
|
|
|||||||||
Edward Diego
In The House
In A Heartbeat |
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 System.out. 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. ![]() ---
|
||||||||||||||
|
|
|||||||||||||||
Jordan NZ
Noble
|
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! ---
<<Jordan>> |
||||||||
|
|
|||||||||
Edward Diego
In The House
In A Heartbeat |
Whatever works for you man. I'd recommend an IDE when you start needing more than one class.
Nope you don't, you'll just have to configure Netbeans and tell it where the existing JDK is. ---
|
|||||||||||||||||
|
|
||||||||||||||||||
Duck
Monarch
|
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. |
|||||||||||
|
|
||||||||||||
Blue Vein CHEESE
The Awesomeinator
|
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. ---
Steam: blueveincheese |
||||||||
|
|
|||||||||
Stevie
|
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 |
|||||||||||
|
|
||||||||||||
Edward Diego
In The House
In A Heartbeat |
The downside in Java is having to manually provide a classpath. ---
|
||||||||||||||
|
|
|||||||||||||||
Edward Diego
In The House
In A Heartbeat |
Intellij IDEA Community does too. http://www.jetbrains.com/idea/featu...le_android.html ---
|
||||||||||||||
|
|
|||||||||||||||
porges
of mass destruction
|
I'd use IDEA over pretty much everything
![]() ---
You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here. > _ |
||||||||
|
|
|||||||||
Edward Diego
In The House
In A Heartbeat |
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. ![]() ---
|
||||||||||||||
|
|
|||||||||||||||
Zealot
Emperor
|
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.
|
||||||||
|
|
|||||||||
Stevie
|
Is there no one on this forum who is a neckbeard Vim/Emacs advocate anymore? Sad times indeed.
|
||||||||
|
|
|||||||||
porges
of mass destruction
|
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. ---
You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here. > _ |
|||||||||||
|
|
||||||||||||
te_chris
I know GP is all virgins
|
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. ---
|
||||||||||||||
|
|
|||||||||||||||
Edward Diego
In The House
In A Heartbeat |
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. ---
|
||||||||||||||
|
|
|||||||||||||||
haze_xp
The other red meat
|
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. |
|||||||||||
|
|
||||||||||||
te_chris
I know GP is all virgins
|
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/ev...-vim-was-wrong/ ---
|
|||||||||||
|
|
||||||||||||
Blue Vein CHEESE
The Awesomeinator
|
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! ![]() ---
Steam: blueveincheese |
|||||||||||
|
|
||||||||||||
caesius
Chieftain
|
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. |
|||||||||||
|
|
||||||||||||
| Page: 1 2 3 4 |
Show printable version Email this page to a friend Receive updates to this threadAll times are GMT +12 hours. The time now is 9:00 pm. |
Previous Thread | Next Thread |