This discussion is archived
11 Replies Latest reply: Jan 24, 2013 7:36 AM by gimbal2 RSS

A rather long post of me talking gibberish and asking LOTS of questions.

986245 Newbie
Currently Being Moderated
================================================== ================================================== ===
Before reading this MASSIVE post, please read the bottom at the stupid amount of P.P.S.'s as they probably have a lot of information that I forgot to put in the middle or something.
================================================== ================================================== ===

Hi, I'm some guy on the internet and I am 15 years old. For the sake of this post and the answers I hope to have, please ignore my age and understand my maturity and I hope that you can understand why I would like to learn this language so much. I seem to have major issues with learning this language and online tutorials and stacks of books do not seem to do the trick. Please do not reply saying "this is not for you, try something else" because although I do not know much in Java in terms of making good applications, I have learned quite a few things and I am able to make simple things with the console such as making a calculator where the user has to type in what operator they want to use and then they are asked to enter two numbers in which they are timed/added/divided etc. together and it gives the answer. Considering this I really want to continue learning this language because I find it fun to learn and fun to program in, yet I am having serious stress issues because I can't understand simple things and I just forget some of them and I then find it difficult to make simple applications. For example, I am trying to make a simple snake game where you have to find all the apples and eat them and then your body grows larger etc. but I just can't think of how I would do it. I know a few simple application type things and maybe how to put them to use, but I just don't know how to use them in this situation and how to start off making games like these.

Just to tell you a little bit about my background of programming, I have known about programming since I was about 11, I made a virus in Visual Basic believe it or not. It would disguise itself as Mozilla Firefox and would slowly delete random files that were opened or edited in the last month starting from the last used files in said month. It would delete a set amount of files every time you booted up and it was pretty nasty. It was obviously quite easy to get rid of it and it probably had many bugs, but it was a nasty virus nonetheless. Anyway, that lasted around 2 months and I never really picked up on programming until around 13 at which point I learned a bit of Java up until the System.out.println part, so not very far at all and I barely understood anything. Then I kinda picked it up at 14 last summer (2012) and learned almost as much I know now over the summer holidays and then kind of left it until after Christmas because I couldn't really get past a certain 'barrier' so I got bored and gave up. Until now. After Christmas I got back into it and starting learning a few more things, understood functions a little more and downloaded a bunch of source code from lots of different websites. I've now been extremely stressed out for the past 2 weeks going crazy because I can't fit anything else into my head because I just forget it or just don't understand it. So I am now in a complete frenzy not doing homework, being a douche to my friends and just not being very social or doing stupid things.

Unfortunately this is going to be a rather long post as you can probably already tell and there will be a 20 Q's kind of 'game' below where I ask things that I desperately need to know and maybe things that I want to know but don't necessarily need to know.

If you can, I would greatly appreciate it if you could answer all of the first 14 questions in one post instead of 1 or 2. Also, please do not post anything unnecessary or nasty as I am a new poster here and I just want to get started in Java and I have my own reasons for starting at such a young age and my intentions are rather personal. So please treat this matter with maturity and I hope someone can really help me.

I am sorry for any misspellings or grammatical errors, I am fully English, I am just rubbish at spelling.

THE QUESTIONS!!!

1) What is SUPER used for, when should I use it and why should I use it?

2) When making a new class and you type PUBLIC [insert class name here](){} what does this do and why does it need to be the same name as the class it is in?

3) Why do you need to make new classes inside already made classes sometimes?

4) What is the use of NEW and why do you need to use it when you are creating something like a JFrame, where for example you would use it in your main function and have NEW [insert name of function with JFrame inside]();, why can't you just do [insert name of function with JFrame inside]();?

5) What is actionPerformed, where is it used and why should I use it?

6) When using a function, what is achieved when you call another class and make another variable inside said function? Eg, public [insert class name here]([insert other class name here][insert new variable name here]){}

7) What 'type' is an ENUM? Is it an int? String? Double? So if I were to make ENUM [insert name of enum here] {A, B, C, D, E, F, G}; So what would happen if I were to say PUBLIC [insert name of enum here] B = 5; what would that mean? Would that assign it as an integer?

8) When should I use enums, what is the point in them?

9) What does [inset object here].ORDINAL mean? What is it used for and when should I use it?

10) Although I understand that the RETURN statement is used to end a function and return it with a value if there is one specified, but when it returns it with that value that you may have specified, what happens to that value, how do I retrieve it and how do I use it? When will I know when to use RETURN?

11) Briefly explain how to use KeyEvent, getKeyCode and just anything else to do with accepting user input and how I would use it.

12) When using the KeyAdapter, why do you need to make a new class inside an already made class? What does this achieve? Why can you not extend it on the current class you are using instead of making a new class? This links back to the 3rd question.

13) What is the difference between ++object and object++? Does it really matter which way I use them? Why should I use them differently and how will it affect my code if I use them differently?

14) What's the difference between an IF statement and a BOOLEAN statement? They are both booleans and if used correctly can be used to do the exact same thing with just one or two lines of codes difference. Which one should I pick over the other and why? Which one is better to use for what kind of things?

================================================== ================================================== ===
POINTLESS QUESTIONS THAT I JUST FEEL LIKE ASKING THAT DON'T NEED TO BE ANSWERED AND DON'T HAVE MUCH TO DO WITH THE CODE ITSELF
================================================== ================================================== ===

15) What is the best way to get into the mindset of 'a programmer'? What is the best way to understand the ways in which you would build an application and learning the step by step processes so you know what you have to do next and how to do it.

16) I seem to always be worried that it takes programmers 5 minutes to program a very simple game, like Tetris because I've seen videos and just other places where it makes it look like it takes them a very small amount of time to make something that might take me months to learn. Is this how it works? Or can it take hours to program 5 classes for a very simple game? If so, why does it, if said programmer hypothetically understands the language well enough to make said program? Surely they would know what to do and how to make it so it would not take long at all?

17) How often are IF and ELSE statements used in common programs? I feel when I am making a program I am always using them too much and I just stop programming from there because I feel that I am using too much of something so maybe it isn't the right way to do it or maybe there is a better way to do it.

18) What would be the best way to learn programming for someone who finds it difficult to teach himself said topic yet has no efficient way to have someone teach him? I feel I am somewhat intelligent enough to learn a programming language, I have gotten this far, so I feel I should just keep going. Besides, despite the difficulties I have and the ridiculous amount of stress I get from not being able to learn on my own, I find it very entertaining to program things, read over other peoples code and slowly learn the world of programming. I feel that I see myself as a programmer in the future and I just really hope that I can learn this language quickly before I am too old to have time to learn this as a hobbie as I do now.

19) I am someone who hopes to become a games developer as I thoroughly enjoy playing games as much as I do finding out how they work. What would be the right way about learning how to make games? Should I stick with Java or should I go to C++? I've only stuck with Java because I have more experience with it and I feel that I should learn an easy language and get used to OOP and other things before I go off making complex programs with a difficult language. I know how to print something to the console in C++ and that's about it.

20) I have no way of having an education on programming in my school at the moment and all courses that have programming in them aren't very good - you make a simple application for coursework and you do a computer physics exam at the end of the year, not too helpful for me. Also, I don't have many friends that are diversed in any language of programming and the ones I do have, coincidentally, absolutely none of them are any good at making games or painting anything in graphics or anything to do with frames and windows. They're all about the console and making mods for games instead of making full on programs with a window and what not so it's difficult to get any of them to teach me anything. I've looked at college courses and none of them are for my age and what I am wanting, or they are just too damn expensive. I have also looked at online courses, one-to-one tutoring etc. but they are either way too expensive or they aren't very good in terms of being in a country half way across the world or maybe they have bad ratings. Anyway, what I'm trying to ask, despite all the negative put backs and all the issues that seem to follow me whenever I try to learn this damn language, what would be the best way to teach myself this language or any other language, or where are the best places to have someone teach me for free/cheap prices? I just essentially want to make something basic like a video game like Tetris or something so I at least have some knowledge of making a video game so I can maybe learn other things much easier.

P.S. I am in top sets for all my classes at school, so any intelligence issues aren't a part of this. I guess you could maybe call it laziness, but I just prefer to say that I am too used to people teaching me things and doing things for me rather than teaching and doing things myself. So if I were stuck on an island alone I really would not know what to do at all because I would mainly rely on other people.

P.P.S. Just for anyone's curiosity, I use Eclipse as my IDE on a Windows 7 Ultimate OS.

P.P.P.S. I am British.

P.P.P.P.S. I have read through about 4 books about Java, but on most of them I just get really bored and stop reading them half way through because they either don't explain what I want to know or they really suck at explaining what I want to know.

P.P.P.P.S If you are going to post a good tutorial, please post one that I have most likely NOT been on. PLEASE. I have gone through MANY tutorials which all of them don't do me any favours. Please post one that you think that I might not have seen and actually tells me what EACH line of code does and WHY it does it and WHY I might use it and WHERE I might use it. Etc.

P.P.P.P.P.S If this is a TL;DR kind of post, then I am awfully sorry to have bored you, please go onto another post, but thank you very much for taking the time to actually LOOK and CLICK on my post. However if you do not have any intention of helping my dilemma, please leave as although I am asking for A LOT for FREE, I really don't need pointless posts that really do not solve my problem. Thanks.

P.P.P.P.P.P.S (Last P.P.S I swear! I just keep forgetting things.) If you have any questions to ask or I might not have asked something properly, feel free to ask as I will probably be refreshing this page non-stop for the next 2 weeks. Thanks ^^

For all the people out there who are THAT awesome to post here answers to these questions, I really salute to you and I would VERY gladly give you money for your time and effort, if I had the funds to give you what it's worth. ;-)

Edited by: 983242 on 21-Jan-2013 16:26
  • 1. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    EJP Guru
    Currently Being Moderated
    Before reading this MASSIVE post
    I didn't read it. I went straight to the questions. The rest of it was a complete waste of your time. Nobody cares whether you are 15, are stressed, get bored, etc. You should spend more time learning and less time emoting, and typing.
    I am rubbish at spelling.
    So fix that. If you stay in this business you will have to spell properly or get nowhere. Compilers won't accept mis-spellings: why should anybody else? Get over it. In a few years you will have to write a resume. If I get it and it is misspelt it goes in the bin.
    1) What is SUPER used for, when should I use it and why should I use it?
    It is used for two purposes that are described in the Java Language Specification. If you can't read language specifications you will have to learn, or get nowhere. You can't learn languages in forums.
    2) When making a new class and you type PUBLIC [insert class name here](){} what does this do and why does it need to be the same name as the class it is in?
    That's two questions. 'public' is used for a purpose that is described in [etc as above]. The class name needs to agree with the file name because that is a rule of Java. Period. There's a reason for the rule but you should be able to discover it for yourself eventually, and it doesn't actually matter what the reason is at this stage in your development.
    3) Why do you need to make new classes inside already made classes sometimes?
    Why not?
    4) What is the use of NEW and why do you need to use it when you are creating something like a JFrame, where for example you would use it in your main function and have NEW [insert name of function with JFrame inside]();, why can't you just do [insert name of function with JFrame inside]();?
    Meaningless. You have to use the language the way it was designed. Same applies to most if not all your questions.
    5) What is actionPerformed, where is it used and why should I use it?
    See the Javadoc.
    6) When using a function, what is achieved when you call another class and make another variable inside said function? Eg, public [insert class name here]([insert other class name here][insert new variable name here]){}
    I cannot make head or tail of this question. You could try making it intelligible.
    7) What 'type' is an ENUM?
    It is of type Enum.
    Is it an int? String? Double?
    No, no, and no.
    So if I were to make ENUM [insert name of enum here] {A, B, C, D, E, F, G}; So what would happen if I were to say PUBLIC [insert name of enum here] B = 5; what would that mean? Would that assign it as an integer?
    I'm getting sick of this [insert name here] business. Try making your questions legible and intelligible. And again, an enum is not an int.
    8) When should I use enums, what is the point in them?
    When you want them. Not a real question.
    9) What does [inset object here].ORDINAL mean?
    Nothing. There is no such construct in Java. There might be an occasional class with a public variable named ORDINAL, in which case it means whatever the guy who wrote it meant. If you're lucky he documented it. If not, not.
    10) Although I understand that the RETURN statement is used to end a function and return it with a value if there is one specified, but when it returns it with that value that you may have specified, what happens to that value, how do I retrieve it and how do I use it?
    You store it in a variable, or pass it to another function, or use it as a value in a statement, for sample as an if or while condition.
    When will I know when to use RETURN?
    Err, when you want to return a value?
    11) Briefly explain how to use KeyEvent, getKeyCode and just anything else to do with accepting user input and how I would use it.
    In a forum? You're kidding. Read the Javadoc. That's what I did.
    12) When using the KeyAdapter, why do you need to make a new class inside an already made class?
    You don't.
    13) What is the difference between ++object and object++?
    This is all described in the Java Language Specification [etc as above] and indeed most of this stuff is also in the Java Tutorial as well. Read them.
    Does it really matter which way I use them?
    Of course, otherwise they wouldn't both exist. Language designers are not morons.
    Why should I use them differently and how will it affect my code if I use them differently?
    That's just the same question all over again.
    14) What's the difference between an IF statement and a BOOLEAN statement?
    The difference is that there is no such thing as a boolean statement.
    POINTLESS QUESTIONS
    Thanks for stating that.
    THAT I JUST FEEL LIKE ASKING
    Bad luck. I don't feel like answering pointless questions. Ever.
  • 2. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    986245 Newbie
    Currently Being Moderated
    Hey thanks for the reply, you were very clear with your answers and I can tell you do not like the way I have asked them. I apologize for the way I have asked them or for any confusions I have caused.

    I will Google this 'Java doc' and this 'Java Language Specification' and hopefully that will help me. Being myself I would probably complain about the way you answered some of these questions, but I appreciate you even reading the first paragraph so I won't.

    Thanks very much and hope you can help more people today. :-)
  • 3. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    939520 Explorer
    Currently Being Moderated
    I suggest you go back and re-read your Java books cover to cover (a few pages per day) and work through some of the examples again to further drive the concepts into your head. Even then, you will have to review material you want to put into practice since human memory is so poor and error prone. After some 25 years of programming, there are (new) books I still read more than once and still work through some of the examples. Even then, implementing what I learned on a new project involves reviewing various chapters. After I create a project, I debug and refactor over and over to get it correct. I still have frustration and aggravation when trying to get something to work (however, I don't take it as a personal attack on my ability to program). It doesn't mean you're a bad programmer. It’s like that for anything you want to become good at. It takes years of deliberate practice. I believe there are very few natural born programmers. Most become good through a lot of hard work and self motivation. Since your only 15, I think it’s way too early to rule out programming as a carrier path. I'm self-taught and didn't start until I was 25. You may want to read up on the topic of 'deliberate practice'. The book I'm reading now on it is 'Talent is Overrated'.

    I don't know anything about writing Java games (I'm a Java web developer). However, you might consider creating other non-game projects. I suspect game development may be too advanced a topic at this time.

    By the way, when looking for good books to read on amazon.com, I suggest looking for good reviews at that site.


    Disclaimer:
    http://www.ibew.org.uk/link00d.htm
  • 4. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    Kayaman Guru
    Currently Being Moderated
    983242 wrote:
    Hey thanks for the reply, you were very clear with your answers and I can tell you do not like the way I have asked them. I apologize for the way I have asked them or for any confusions I have caused.
    Programmers need to be precise. Asking vague questions is as useful as getting vague answers. Although I can understand that it can be difficult to know what to ask, when you're unfamiliar with the terms and technologies.
    The Java Language Specification is quite dry, but it does specify all the keywords, rules and other things about the language. If that doesn't help, you can always Google the keywords.

    Also, if you want to become a programmer, you need a lot of patience. It'll take years to become any good, and you'll probably need/want to dabble around in other languages as well.

    Good luck.
  • 5. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    gimbal2 Guru
    Currently Being Moderated
    but I just prefer to say that I am too used to people teaching me things and doing things for me rather than teaching and doing things myself
    You have to change that attitude. Today.
  • 6. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    EJP Guru
    Currently Being Moderated
    Thanks, but no apology necessary. The question themselves weren't too bad, it was really the mountain of accompanying drivel, and your weird expectation that anybody would want to read it. Your post had no reason to be long, and there was no reason for you to talk gibberish. It was all irrelevant. The answers to your questions don't change just because you're 15, easily bored, stressed, etc. They are the same for everybody, whether 8, 80, dead, or not even born yet, or just plain non-existent.

    Much of this profession is boring from one point of view. You need the application and concentration to get through that. And you don't get to dictate how you want to learn. It's already decided in most cases. If you're lucky you will quite often be given something to do from scratch that you have to learn about, ask the right questions, find the right resources, etc., all on your own. That's what makes it interesting, at least to me.
  • 7. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    gimbal2 Guru
    Currently Being Moderated
    EJP wrote:
    Much of this profession is boring from one point of view.
    Indeed, you get the enjoyment not from the programming but from everything else. Solving a crisis (great feeling), learning about the core business of whatever company you're developing for, working as a team, etc. The hard part about being a developer/engineer is not the programming itself, that's a trick you can master given enough time (years). Its the fact that you need to be able to grasp a great many fields if you ever want to successfully contribute. You aren't going to be much use building a finance oriented application if you don't learn at least something about finance for example. You can't learn everything before you start to work, so you have to do it "on the job". To me that is a big source of satisfaction; I'm always learning about a wide variety of topics, most of them not IT related. But you have to be able to apply yourself if you want to make it.
    You need the application and concentration to get through that. And you don't get to dictate how you want to learn. It's already decided in most cases.
    For the most part yes. But you can still invest your own time into it, which is something you should be doing if you want to get into this business. You don't learn this stuff in school, you learn it by doing. I advise people to start out by creating simple games such as hangman or memory; the fact that its a game adds fun factor, which helps you to push the boundaries in stead of only doing the very minimal.
  • 8. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    abillconsl Explorer
    Currently Being Moderated
    gimbal2 wrote:
    EJP wrote:
    Much of this profession is boring from one point of view.
    Indeed, you get the enjoyment not from the programming but from everything else. Solving a crisis (great feeling), learning about the core business of whatever company you're developing for, working as a team, etc. The hard part about being a developer/engineer is not the programming itself, that's a trick you can master given enough time (years). Its the fact that you need to be able to grasp a great many fields if you ever want to successfully contribute. You aren't going to be much use building a finance oriented application if you don't learn at least something about finance for example. You can't learn everything before you start to work, so you have to do it "on the job". To me that is a big source of satisfaction; I'm always learning about a wide variety of topics, most of them not IT related. But you have to be able to apply yourself if you want to make it.
    From my experience it is a bit different for each of us. I enjoy the programming itself, and some languages are more fun to write in than others. I also enjoy programming by myself more than as a team. that's me.

    ~Bill
  • 9. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    BIJ001 Explorer
    Currently Being Moderated
    I will Google this 'Java doc' and this 'Java Language Specification' and hopefully that will help me.
    They are nice at a point but it will be maybe better to start with tutorials. 'Java doc' is useful if you know what to look up, the lang spec is abstract and dry, not really good to start with.

    [The Oracle Java tutorials. |http://docs.oracle.com/javase/tutorial/]

    Edited by: BIJ001 on Jan 24, 2013 3:37 PM
  • 10. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    939520 Explorer
    Currently Being Moderated
    I would like to clarify my previous post. I enjoy programming and consider it a very creative endeavor. The bulk of my time programming is enjoyable. The frustration and aggravation only occurs occasionally. Since you're just starting out, you should expect a lot more frustration until you gain a lot of knowledge/experience.
  • 11. Re: A rather long post of me talking gibberish and asking LOTS of questions.
    gimbal2 Guru
    Currently Being Moderated
    abillconsl wrote:
    From my experience it is a bit different for each of us. I enjoy the programming itself, and some languages are more fun to write in than others. I also enjoy programming by myself more than as a team. that's me.

    ~Bill
    Of course you're right. It even applies to me to be honest: professionally I prefer what I described, privately (super geek, programming is both a profession and a hobby) I enjoy more toying with new technologies and seeing how it all works. In other words: I live in the code.

    Often professionally you don't really get to choose the fun stuff though (although even there you can make steps, like becoming freelance), so in stead you have to take on a different mindset. But indeed: in my experience. Forgot to mention that.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points