Tuesday, March 8, 2016

Part 3 making Java Program Finally!

                                     THE FIRST PROGRAM YOU NEED TO BUILD
This is Part 3 and the last post we build on for a Java Program before we get into programming based on the simple Hello World. I will break this simple program into a million pieces because when you first see something like this it looks like gibberish and it looks alien like but once I break it down my goal is for you to see the fog clear and get used to seeing this and more in the future. My one tip if you can understand this, you will be able to understand the next steps. The hardest part is looking at each lijne and figuring out what each line means. Once you got that your golden. :-)

Now I know this looks hard and difficult but lets break this down line by line:
each line has a number this is not part of the program it is more for reference to know where your putting down the code, DONT PUT IN YOUR OWN NUMBERS!!!

LINE 1= is called a class each program must have at least 1 CLASS. A class is like a bigger picture for example a human is a class of species, and jayson is a subclass of that. Human is the generalized one and Jayson is the subclass. We will get into more detail in a bit about this. CLASS ALWAYS STARTS WITH AN UPPERCASE!!!

LINE 2: Called the MAIN METHOD: In each class in order to run it has to have a method in order to go, so that is called the main method. ALL JAVA PROGRAMS START WITH {PUBLIC STATIC VOID MAIN(STRING[] ARGS)!!
A METHOD  is a block of statements of code. In this example the main method being used is System.out.println("Welcome to java!"). THIS JUST SHOWS THAT THE INSTRUCTIONS GIVEN TO THE COMPUTER ARE RUN AND PRINT THE LINE WELCOME TO JAVA! thats it!!

This may seem hard at first even when I started writing this code, getting used to remembering the public static void main and the [] was the hardest for me, but with practice will help you make it become natural and flow without slowing you down.

LINE 3: its known as a java comment in which the programmer communicates with the user reading it to show or tell them what is going on in the program.
There are 2 types with slashes: IN LINE COMMENT: // OR /*.....*/ BLOCK COMMENT.
in the code above the comment just tells the person reading it: This is the display message that says welcome to java on the display screen. COMMENTS ARE IGNORED BY COMPILER!!!

LINE 4: is a print line in which the system will print out the line Welcome to Java! using this line:
SYSTEM.OUT.PRINTLN(" WELCOME TO JAVA!")
This just tells computer to output and print to screen the line in ("").

** EVERY LINE OF CODE NEEDS TO HAVE A ; OR ELSE THE PROGRAM WILL NOT KNOW WHERE TO END! 
** EACH BLOCK OF CODE NEEDS TO HAVE A {} IF CONFUSED LOOK AT CODE ABOVE

            BUILDING, COMPILING AND RUNNING YOUR FIRST PROGRAM

STEP 1:
CLICK ON YOUR BUILDER .
 




                                                         STEP 2:
WRITE AND PRACTICE CODE FROM ABOVE IN EDITOR FOR CODING.!!!!!!


STEP 3:
GET TO YOUR TERMINAL!!!!! NOW...
for me im using MAC, in Windows it should be in tools as terminal.



STEP 4:
<YOU SHOULD SEE THIS, IF YOU DO YOUR NOW CLEARED HOT TO COMPILE THE PROGRAM YOU JUST WROTE>

STEP 5:
COMPILE PROGRAM JUST LIKE I DO. IF IT DOESNT WORK REFER BACK TO PICTURES.


STEP 6: IF NO ERRORS IT MEANS IT COMPILED AND WORKS NOW ALL THAT IS LEFT IS TO RUN IT!!!






CONGRATULATIONS YOU JUST SUCCESSFULLY BUILT,COMPILED AND RAN YOUR FIRST PROGRAM! IF YOU CAN DO THIS THE REST WILL JUST BUILD ON THIS, IF THIS WAS HARD, TAKE SOME TIME TO PRACTICE TILL YOU CAN DO THIS IN YOUR SLEEP IT WILL HELP YOU IN THE LONG RUN TRUST ME!!

Thanks for reading and as always Enjoy!!!


Computer World Part 2



This is part 2 of a long series of the basic building blocks of computers. I will try to keep it simple something in the Navy is called Brilliance on the Basics, which consists of hitting all the key points and getting the necessary takeaway needed to succeed. we will be discussing:

{What a computer program is, the different hierarchy or levels of programming. what an OS is, and lastly acronyms you need to know and be able to recite. Part 3 will consist of what we have all wanted to start with and learn which is the basic ditty gritty simple Java Program and lastly how to build, compile and run it!!!!
} screenshots will be provided to help guide you, just in case like me you forget what to do.

Computer programs are programs made specifically built to tell the computer to do a specific thing. Now our computers don't understand human language so we have to break it down barney style for it, and put it into a language it understands  this is called: MACHINE LANGUAGE. IE right now when you opened up the internet such as the internet explorer button or Firefox or chrome it told the computer:
HEY YOU, WHEN I CLICKED THIS BUTTON YOU NEED TO GO INTO THE COMPUTER MEMORY AND OPEN UP THE WINDOW FOR THE INTERNET AND NO EXCUSES TO NOT OPEN IT, IF YOU DON'T OPEN I WILL BE SAD!!!

Like I said in the beginning there are different levels of language the computer has to figure out and use or else it woudl not turn on a couple examples are:
If you look at this picture you will see that it is built from the ground up just like most things. The basic building block is located in the hardware, then a language in which the machine can understand, then it gets higher from there. I know this is a little confusing but for right now, just know that each level builds on each other and as you get higher it becomes more complicated.

                                                     {OS or Operating System}

AN OPERATING SYSTEM: is one of the most important things that  runs a computer which manages and controls all of the computers activities LITERALLY!!!!


ACRONYMS AHHHHHH!!!!!!!!!!!!!

JAVA SPECIFIC LANGUAGE: specific syntax and language context only used in java.

API: APPLICATION PROGRAM INTERFACE: these are premade or fabricated classes or interfaces for developing a java program.

JDK: JAVA DEVELOPMENT TOOLKIT:  this is a java kit used by SUN corporation that helps people or developers make or build programs for us humans.

IDE: INTEGRATED DEVELOPMENT ENVIRONMENT: In simple terms this is a program you run to build or make your programs, there alot out there I specifically use ECLIPSE or JEDIT. But everyome has their own program that they like.




Computer world Part 1









Hello all,
Today is day one of many where i start to learn and try to understand the world of computer science, although I have a full time job in the US Navy. I want to switch one day over to working in the Software development field and being the best at it at all costs. The book I have been told to read and understand and read is Introduction to Java programming 9th ed by Y Daniel Liang.  Today I wanted to start off with the basic building blocks  as a building block and will break each item into a series or posts.I will be building upon  these each day so if you have any questions let me know in the comments. Todays topics are:
1. what is a computer you ask?
2. What is a  program and what does it consist of?
and lastly final thoughts and ideas to help those like me to better understand what the material is and to break it down to the best of my ability.


Computers!!!!
In today's world computers are the epitome of our world and they are only getting bigger and smarter. The basic idea of a computer is that it is a device whether big or small that stores and processes data, it has such things as hardware and software. Now you may be asking yourself what is hardware and software, well have no fear jayson is here to explain! ( Hardware is the physical things you see in the computer that make it run) { Software is the program or invisible program that tells the hardware what its job is}.and these things combined and running properly make a computer program.

A Computer is broken down as such in hardware:






CPU: is the basic builder block it is the central processing unit, which is the brains of the operation where it gets instruction from the memory and does what it says.

Memory:



well this may look confusing at first but know this, its just like looking at a light switch, what I mean by that is it is the same concept in which they both have on and off electrical states also known as 0 and 1, when turning off a light or on you will have flipped a 0 or a 1 to either connect the circuit or break it. Cool huh?? These 0 and 1 are interpreted into things called {bits = binary digits}. data and other such things are stored in the memory as a group of bits or bytes. ASCII is the basic understanding of these 0 and 1 for example 3 woudl look like this= 01001010. Now a byte is just the beginning of this there are way bigger storage areas that are randomly stored. This is called the {RAM= have you heard of this??? It stands for Random Access Memory}

Bytes are measured in different storage capacities such as in order like a set{bytes, kilobytes, megabytes, gigabytes and terabytes. Each of these have a specific # of bytes.
a KILObyte is 1024 bytes/ MEGAbyte is 1048576 bytes. WOW thats a lot to byte off!!!

Storage Devices:
I should say all computers in todays world, all have some sort of storage device, aka space to put files and pics and movies and games and music. This could be a external hard drive yo buy from Best Buy or it coudl be using the Hard drive that comes on your computer internally. Or when your on the move it could be a USB drive.


Input or Output devices:
This is simple and although every computer has one there all different. Now what do I mean by that I mean things such as for input a mouse, Keyboard or a game controller. A output device could be things such as a a computer monitor or a cool 55 in TV screen you got from your birthday.  INPUT just means something that is being taken in and OUTPUT is something displaying what you have taken in. I promise if that doesnt stick I will break it down further later, just hold fast.






Communication devices:
This just means how we get data from one area to another. I good example of this is, right now your reading this which had to come from the internet, in order to get to the internet you had to use a communication device, although your computer did it behind the scenes and you never physically had to do anything it happened. A communication Device is a {modem or DSL or WIFI using a NIC or Network Interface Card} to connect to your local service provider that you or someone pays to have the internet. Most people such as myself only use a NIC but is you were at a University or reading this from a college it woudl most likely be running using a {LAN or Local Area Network}.





OVERALL:
These things are just the beginning of what a computer is and in the next post I will be discussing what a computer program is, an OS im going to build a basic Java Program and how to run it and then finally I will talk about a GUI. Thanks for reading and if you like what your reading send me an email or comment on what I can do better or improve upon. Feedback is always important.

Friday, March 4, 2016

Hello World

Hello World,

This traditionally is the beginning of the end, what I mean by that is that by starting this post and the future ones, you and I  will start on a adventure. This blog is to show that no matter what your doing now or if you would like to get into the IT field that you can learn how to code and be successful with alot of practice and determination.This adventure starts from the beginning from me being a student on day one to in the next couple years being a Software Engineer. Each week I will post what I have learned or what i am learning or a trick or some new information  to make this dream a reality and the ups and downs whether good or bad. Currently I am currently a Freshman at the University of Maryland working on my Bachelors of Science degree in Computer Science. Thanks for taking the time to read this and have a great day Enjoy!

Total Pageviews

Follow by Email