I'm a 9th grader and I joined my school's robotics team in order to learn how to code Java and enter the programming team. However, I am so confused! Even after the first lesson, I had no idea what the teacher was talking about. I don't know if it's just me but, but I just can't understand any of the terms or how to put them together to form code.

My teacher is always busy on weekdays so I only have Saturday to talk to him. Until then I'm just sitting in front of Netbeans without a clue on how to code our first assignment which is to write Java code that solves a geometry question of my choice. I really want to become a good programmer, but I just can't get a grasp on Java. My teacher and many websites say that learning Java is like learning a new language and one must practice to be good at it.

I learned HTML, which was a breeze for me, so I have experience with programming, but I just can't understand Java! The two are completely different the way I see it.

However, how am I supposed to practice if I have no idea what in the world is going on? Also, does one have to be a math wiz to be a good programmer?

  • 13
    HTML isn't really a programming language - it's a markup/formatting language. Nov 14, 2014 at 2:00
  • @cal Don't worry about the downvotes at this stage. It's actually quite a skill to ask a good question here. I'm certainly not good at asking good questions. But stick at it - as you ask more precise questions that have more definite answers you'll do fine.
    – andy256
    Nov 14, 2014 at 2:31
  • 1
  • 2
    @Cal: One does not have to be a math wiz to be a good programmer. My school teacher actually took me to a corner and advised me to take up Commerce instead of Computer Science because my math and physics grades were low (but I scored high on the logic test which was a test the school conducted to decide whether a person was good enough to study computer science). I chose CS anyway, went on to become one of the top three programmers in class and because of CS, my math and physics grades also improved coz thinking logically to write programs made me understand how to solve math and learn physics
    – Nav
    Nov 14, 2014 at 3:01
  • 4
    @Cal please do not continue to morph the post and add more questions to it. Stack exchange is a Q&A site (please see the tour), it is not an interactive tutorial session. Changing the question after it has been asked into something new makes existing answers less useful.
    – user40980
    Nov 14, 2014 at 3:33

2 Answers 2


It is true that you need to practice. But different people have different ways of learning, and not every teacher is

  • an expert in what they teach
  • an expert teacher.

So a key part of school is learning how to learn.

I have Googled "basic java tutorial" for you. Two of the top links look useful for you

I suggest you cut and paste example code, such as a "Hello, World" program, see what it does and how, then make changes and see what they do.

Expect to spend many hours at this. It is learning to express your thoughts in a new language.

Edit: does one have to be a math wiz to be a good programmer?

No. There are many different problem domains, and you'll initially deal with problems you know about. But programmers are learning about things all the time - new skills like how to handle particular math problems, or some new language, or some new way of thinking. A lot of programming just involves "If item A is XYZ put it in bucket B, but if it's UVW put it in bucket C".

But math is closely related to programming, in that it is a precise way of thinking and solving problems. You need to just as precise in programming. The computer doesn't know what you want it do - it does exactly what you've told it do. Which is both the joy and agony of programming.

And one branch of math is very important: logic. You will learn this one!

  • Thank you for answering this question. When you're learning, it's useful to learn how to learn, and that is a skill in and of itself. In my first year if college I had no idea how to find the resources I needed, now how to search for them :P Nov 14, 2014 at 2:36
  • @cal Another place a beginner can get help is http://www.javaranch.com/.
    – andy256
    Nov 14, 2014 at 2:50

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.

  • 1
    I think you're getting ahead a bit here suggesting the OP learns several different languages and how to use a version control system.
    – Simon B
    Nov 14, 2014 at 11:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.