Why can’t I understand Java? [closed]

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?

6

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

  • http://www.tutorialspoint.com/java/
  • http://javabeginnerstutorial.com/core-java/

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!

2

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

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật