Java was my first language, and I found it very difficult. I'm not sure how much of it is just because I was a new programmer (I didn't realize I had to go through a learning stage before I would be able to even start the program I wanted to write); how much was because I was following the official Sun tutorial ("why is this going on and on about"), and how much of it is related to the fact that Java is not a great first language (or in my opinion for anything: it does a lot of things passably, but nothing excellently).
Sure, I could make stuff happen but I didn't understand why or what I was doing at all.
I recommend Python for the earliest starting:
* less focus on "Object-oriented" propoganda, but actually better and really being object-oriented
* dict
, list
, and set
as builtin types instead of library types.
* saner use of exceptions (but please specify types)
* more functional style as opposed to imperative
* a REPL
* doesn't hide things behind an IDE (there are IDEs for python, but you should just use some text editor that's designed for programmers and explicitly save and run your code)
After you write your first several programs, go back and write them all without using any mutable global variables (probably the biggest thing that newcomers use way too much, and also ask more experienced python programmers about things you're missing).
Once you're confident that you can write any small-to-medium (to your sense of scale) program in Python, go back and rewrite the same programs again in Java. Learning involves a lot of this "go do the same thing, but in a different way".
It would also be profitable, you'll learn a bit of C. Don't expect to write any big programs in it, but you should be confident that you no bugs related to malloc/free, strcpy, I/O that may have errors.
Also, it is unquestionably useful to get comfortable with the command line in general, and with a version control system in specific. A programmer who can't use version control is a net loss to any programming team.
I recommend your first version control be some decentralized one, such as git or mercurial, so that you don't need a remote server. As a newcomer the most important rule is "commit early, commit often". Eventually, you'll get a better idea of when it is useful to commit, when to amend or squash (it is always easier to start with many small commits and turn them into one larger commit later - if you have a reason to do so); and you'll also gain the skill to be able to follow the "every commit must work, for some definition of work" rule.
Do not make the mistake of doing version control from an IDE. If you must use an IDE, pretend that the VCS-integration doesn't exist, because it will be worst than useless whenever the slightest thing goes wrong (and things go "wrong" very often when there are 2 people working on the same project). Just type git status
a lot, and make sure you understand why everything is red or green, then figure out the best way to get rid of the red (some common ways: add untracked files, add changes to a tracked file (only in git), add to ignore list), and run both git diff
and git diff --cached
before making a commit. (The concept of staged vs unstaged changes is a bone of contention between git and most (all?) other DVCS, but I find it much more obvious to be able to separately talk about "changes I'm fairly confident will go into the commit without much change" from "changes that I'm still working on". But again, as a newcomer, commit often).
You may note that I didn't explicitly mention the commands to actually add changes or make commits. This is because it is far more important to know how to get information out of the VCS than to put it in.
You may also note that I didn't put any links here. This is a deliberate decision, learn to Google, and remember than 90% of everything (including the front page of Google) is crap.
Finally - congrats on trying to get an early start. If you know programming when you start college, you won't be hopeless like most graduates. Of course, if you're really good and know how to make friends, you might be able to avoid wasting time and money on college at all.