[Tutorial] Learn Java Programming

No he isnt thenewboston. BuckyRoberts is the newboston. Also bucky roberts is from boston, Hint is in the name.
 
Buckyaustin are you thenewboston?

No but thank you for considering me to be as good as a man with years upon years experience, in teaching and working in the industry.
I'm only beginning to work in the industry. But thank you so much.

By the way since you commented on this post, I think that I will revive it and finish off the tutorial.

I didn't know if any one was interested because I was getting very little feedback. The aim of this tutorial is to bring all the readers up to the level of a graduate from college. The college I'm comparing my tutorial to is the college I came from. Which in my opinion so far, my tutorial is better.

I will definitely finish this tutorial. Everyone be grateful to pxoxrxn.(Nice name, how did that not get noticed yet?).

I know if you read the rest of the tutorial, you will be able to plan a program, have a near complete understanding of programming and be able to put that into practice.

My tutorial differs from the newboston though, I'm stepping you through making a functional program, while explaining as much as possible. Even have an error in the code, not syntax but a logical error, I asked everyone to point it out before, no one succeeded in spotting it. I will explain all this too.

The next post will be tomorrow at 18.30 GMT-0.
 
Last edited:
I recommend the oreilly cookbook series....the java cookbook has shittons of small examples for you to follow....
 
I recommend the oreilly cookbook series....the java cookbook has shittons of small examples for you to follow....

I would recommend that book as well, but not for an absolute beginner. I know all them books are designed for beginners but it is hard for some one who knows quite a bit to start at the basics again. After reading tutorials, watching videos then jump into a book. But nothing beats practice. I mean practice where you can't look at the solution. That just means your going to cheat which is only lying to yourself.

I have read some of the O'Reilly books myself. But having to jump between books to get the software development life cycle and to get Java is just too much for a beginner. In my opinion. My tutorial is trying to teach both in one. Just didn't want to tell anyone that yet. :P. Wanted it to be a surprise. I wanted to say at the end of the tutorial that they had learned about SDLC without even thinking about it.
 
That's really great to see! Keep up the good works dude. You are motivating me to open a PHP tutorial thread now :D ;)
 
No but thank you for considering me to be as good as a man with years upon years experience, in teaching and working in the industry.
I'm only beginning to work in the industry. But thank you so much.

Oh yeah, I didn't read your tutorial, just saw the name and decided to ask. Is case, break common practice with Java? I've never found a use for it.
 
That's really great to see! Keep up the good works dude. You are motivating me to open a PHP tutorial thread now :D ;)

Well that's great, you should I know a few people on here that would appreciate that. Will be looking forward to see your aproach.

Good luck.
 
Oh yeah, I didn't read your tutorial, just saw the name and decided to ask. Is case, break common practice with Java? I've never found a use for it.

OK brilliant, a question. Case and break are necessary, otherwise when the condition is true and the code is run, the switch doesn't just exit, it runs every other case below that. Some people do this on purpose in their programs, but that is bad practice so I won't be explaining why. This is common in nearly all languages.

Your other option as I have shown above is to use an if else statement. That could be potentially huge and a huge pain debugging, thou if the if statement is small then switch is going to be more of a pain. More on that in test plans and test logs.
 
Generally speaking, it depends upon your taste really. I personally hate the elseif thingy because it looks so ugly when there are lots of conditions ( and multiple conditions). If you look at my codes, you will almost always find switch cases!!
Oh yeah, I didn't read your tutorial, just saw the name and decided to ask. Is case, break common practice with Java? I've never found a use for it.
 
Generally speaking, it depends upon your taste really. I personally hate the elseif thingy because it looks so ugly when there are lots of conditions ( and multiple conditions). If you look at my codes, you will almost always find switch cases!!

I've only ever used if else because that's what we did at uni and I started out with VB 6, which was just a bunch of if else then
 
Welcome to buckyaustin?s Java tutorial. In this tutorial I will be discussing SDLC, this will just be an introduction. Too many tutorials, lectures just jump right into this and don?t give an introduction. By doing this you don?t learn how SDLC can benefit you or your project.

What is SDLC?


Software Development Life Cycle is a proccess that allows a developer to break the creation of a project into organized repeatable steps.

Why is that a benifet?


Making a program can seem daunting at the beginning because there is so much work that has to be done. Breaking the project into steps means the developer has smaller goals to achieve, making the project easier to imagine and come into reality. The steps involved in the SDLC also force the developer to think which aspects of the project are necessity and which are just dreams. Using the cycle the dreams can be added to the project but only after the necessities are added.

What are the steps?


The exact steps are different for each SDLC, but they do share common steps.



  1. Analyze
  2. Design
  3. Develop
  4. Testing
    1. Finished? Yes procced, No back to step 2.
  5. Finalize


Analyze is where the developer comes up with the project ideas. Breaks them into categories, determines if they are neccesities, needs and wants. This is also where you check if the project is actually possible, by looking to see if the budget is there, the resources etc. For example a project that would involve a super computer on Saturn is just not feesible. For the first cycle you only add the necessities, and gradually add on to this.

Design is where you create your psudeo code, site-maps for Web. This is where you draw out the GUI(General User Interface), what the users see. You also see if you should create methods for different pieces of code. Are some of these methods so closely related that they should have their own class? Would this piece of code be useful in the future in another project? If yes then write your psudeo again to reflect these new classes.
This is also where you plan for what you will be testing.

Develop which is by far the easiest step in the SDLC. Something you will not believe now, but you have already done most of the brain work. Development is just creating the code, you all know how to do this. But as you create each line of code, ask yourself does that code need to tested? If yes, write test plan. No, then no test plan. Maybe, write test plan.

Testing, this means pulling out your test plans, logging all the results of the test into test logs. Now what should a test plan be? Well I always look at it this way. I?m trying to break the program. Always just trying to break it. Testing can be fun this way. Get some one who loves a challenge. Ask them to break your program. When they break it, you try to prevent some one else from repeating that. Keep doing this until the program is unbreakable. I have done this to make testing fun, otherwise it is really boring.


You can get example test plans and logs online. I will not be explaining how to use them. Just remember that you only want the user to put in a number where you ask for a number. Not a letter. If you want a positive number then no negatives. No fractions if you want a whole number. You get the point. Also if you want some person?s age, they will be aged 0-120 nothing below or above that scope. Scope yes that is a trick in testing. You only need to do two tests for that scope, -1 and 121. If they break your program, then your program needs to be fixed by adding a check or validation there. I will be going into validation in more detail.

Finalize. This is where you package,export,build your project. Different IDE?s use different words but they all mean the same thing, finalize. This is where you hand out your project to the world. Are you done? No your not back to step one. That is why it is called the software developement life cycle.
What is pseudo Code?

This just where you try to think how can I get this program to do what I want. If it?s making a cup of coffee, how would I go about making that? Easy.


  1. Grab the kettle.
    1. Pick the kettle up.
    2. Open the lid.
  2. Walk to the tap.
    1. Turn on the tap.
    2. Place the kettle under the tap.
    3. Wait for the kettle to fill.
    4. Close the lid.
  3. Walk back to the beginning.
    1. Place the kettle down.
    2. Turn on the kettle.
    3. Wait till the kettle boils.
  4. Grab a cup.
    1. Place it nearby.
  5. Grab the cofee.
    1. Place that nearby.
  6. Grab a spoon.
    1. Place that nearby.
  7. Grab the coffee jar.
    1. Open the jar.
  8. Grab the spoon.
    1. Place the spoon in the coffee jar.
    2. Pick up the coffee with the spoon.
    3. Bring the spoon over to the cup.
    4. Tip the Coffee on the spoon into the cup.
    5. Place the spoon in the cup.
  9. Grab the kettle.
    1. Pour the water into the cup.
  10. Grab the spoon in the cup.
    1. Stir.

That is the pseudo code for making a cup of coffee. That is also called an algorithm. Repeatable over and over again for every kitchen lol. What would the test plan for this be?

Check if you spilled the water, check if you missed the cup, check if you forgot to turn on the kettle. Test log. Visualy see that the cup has a liquid of brown colour, feel the counter to see if it is wet. Taste to see if you made it the way you like.You get the point.

That all seems like a lot of pain in the ***, but seriously by doing it step by step, you know that you are progressing, you won?t feel overwhelmed. It will be faster.

When I was in college, we were asked to make a program. I went home and just tried to make the program, no SDLC. Took me seven hours (remember I was only learning). Went into college, the lecturer stands up, doesn?t seem to care if our programs work and asks us stick up our hands if we just hacked our way through. I stuck up my hand. He asked me how long it took. I told him. He than asked for some one who had done it using the SDLC asked them how long it took them, 1 hour and thirty minutes. You see how the SDLC is a much, much better way of making projects?


Also when you retire, you want some one to take over your legacy? Well that means the prodigy needs to know what the hell you were trying to do. Psudeo code, Test plans and logs everything document it all, comments in your programs, useful names on everything from classes to variables.

Well that is the SDLG, psudeo code, algorithims, test plans and test logs completed. One little thing to go. You notice that our project has different versions? This is called version control. If one of our versions is for some reason beyond repair, we don?t have to worry we just copy and paste a version that does work and work with that. Each cycle in the SDLC is a new version. Starting to see how it all fits together. Using the SDLC you will never fail to complete a project.

NB: Solving a rubix cube is just an algorithim, not that much harder than making a cup of coffee, has about the same amount of steps.

Since were talking about coffee, I?m going to put that algoritim into practice. You should too.
 
SDLC! Very boring but important subject lol. Glad that you covered it. Thank you :-)


Waiting for the types of SDLC!!
Welcome to buckyaustin?s Java tutorial. In this tutorial I will be discussing SDLC, this will just be an introduction. Too many tutorials, lectures just jump right into this and don?t give an introduction. By doing this you don?t learn how SDLC can benefit you or your project.

What is SDLC?


Software Development Life Cycle is a proccess that allows a developer to break the creation of a project into organized repeatable steps.

Why is that a benifet?


Making a program can seem daunting at the beginning because there is so much work that has to be done. Breaking the project into steps means the developer has smaller goals to achieve, making the project easier to imagine and come into reality. The steps involved in the SDLC also force the developer to think which aspects of the project are necessity and which are just dreams. Using the cycle the dreams can be added to the project but only after the necessities are added.

What are the steps?


The exact steps are different for each SDLC, but they do share common steps.



  1. Analyze
  2. Design
  3. Develop
  4. Testing
    1. Finished? Yes procced, No back to step 2.
  5. Finalize


Analyze is where the developer comes up with the project ideas. Breaks them into categories, determines if they are neccesities, needs and wants. This is also where you check if the project is actually possible, by looking to see if the budget is there, the resources etc. For example a project that would involve a super computer on Saturn is just not feesible. For the first cycle you only add the necessities, and gradually add on to this.

Design is where you create your psudeo code, site-maps for Web. This is where you draw out the GUI(General User Interface), what the users see. You also see if you should create methods for different pieces of code. Are some of these methods so closely related that they should have their own class? Would this piece of code be useful in the future in another project? If yes then write your psudeo again to reflect these new classes.
This is also where you plan for what you will be testing.

Develop which is by far the easiest step in the SDLC. Something you will not believe now, but you have already done most of the brain work. Development is just creating the code, you all know how to do this. But as you create each line of code, ask yourself does that code need to tested? If yes, write test plan. No, then no test plan. Maybe, write test plan.

Testing, this means pulling out your test plans, logging all the results of the test into test logs. Now what should a test plan be? Well I always look at it this way. I?m trying to break the program. Always just trying to break it. Testing can be fun this way. Get some one who loves a challenge. Ask them to break your program. When they break it, you try to prevent some one else from repeating that. Keep doing this until the program is unbreakable. I have done this to make testing fun, otherwise it is really boring.


You can get example test plans and logs online. I will not be explaining how to use them. Just remember that you only want the user to put in a number where you ask for a number. Not a letter. If you want a positive number then no negatives. No fractions if you want a whole number. You get the point. Also if you want some person?s age, they will be aged 0-120 nothing below or above that scope. Scope yes that is a trick in testing. You only need to do two tests for that scope, -1 and 121. If they break your program, then your program needs to be fixed by adding a check or validation there. I will be going into validation in more detail.

Finalize. This is where you package,export,build your project. Different IDE?s use different words but they all mean the same thing, finalize. This is where you hand out your project to the world. Are you done? No your not back to step one. That is why it is called the software developement life cycle.
What is pseudo Code?

This just where you try to think how can I get this program to do what I want. If it?s making a cup of coffee, how would I go about making that? Easy.


  1. Grab the kettle.
    1. Pick the kettle up.
    2. Open the lid.
  2. Walk to the tap.
    1. Turn on the tap.
    2. Place the kettle under the tap.
    3. Wait for the kettle to fill.
    4. Close the lid.
  3. Walk back to the beginning.
    1. Place the kettle down.
    2. Turn on the kettle.
    3. Wait till the kettle boils.
  4. Grab a cup.
    1. Place it nearby.
  5. Grab the cofee.
    1. Place that nearby.
  6. Grab a spoon.
    1. Place that nearby.
  7. Grab the coffee jar.
    1. Open the jar.
  8. Grab the spoon.
    1. Place the spoon in the coffee jar.
    2. Pick up the coffee with the spoon.
    3. Bring the spoon over to the cup.
    4. Tip the Coffee on the spoon into the cup.
    5. Place the spoon in the cup.
  9. Grab the kettle.
    1. Pour the water into the cup.
  10. Grab the spoon in the cup.
    1. Stir.

That is the pseudo code for making a cup of coffee. That is also called an algorithm. Repeatable over and over again for every kitchen lol. What would the test plan for this be?

Check if you spilled the water, check if you missed the cup, check if you forgot to turn on the kettle. Test log. Visualy see that the cup has a liquid of brown colour, feel the counter to see if it is wet. Taste to see if you made it the way you like.You get the point.

That all seems like a lot of pain in the ***, but seriously by doing it step by step, you know that you are progressing, you won?t feel overwhelmed. It will be faster.

When I was in college, we were asked to make a program. I went home and just tried to make the program, no SDLC. Took me seven hours (remember I was only learning). Went into college, the lecturer stands up, doesn?t seem to care if our programs work and asks us stick up our hands if we just hacked our way through. I stuck up my hand. He asked me how long it took. I told him. He than asked for some one who had done it using the SDLC asked them how long it took them, 1 hour and thirty minutes. You see how the SDLC is a much, much better way of making projects?


Also when you retire, you want some one to take over your legacy? Well that means the prodigy needs to know what the hell you were trying to do. Psudeo code, Test plans and logs everything document it all, comments in your programs, useful names on everything from classes to variables.

Well that is the SDLG, psudeo code, algorithims, test plans and test logs completed. One little thing to go. You notice that our project has different versions? This is called version control. If one of our versions is for some reason beyond repair, we don?t have to worry we just copy and paste a version that does work and work with that. Each cycle in the SDLC is a new version. Starting to see how it all fits together. Using the SDLC you will never fail to complete a project.

NB: Solving a rubix cube is just an algorithim, not that much harder than making a cup of coffee, has about the same amount of steps.

Since were talking about coffee, I?m going to put that algoritim into practice. You should too.
 
Back
Top