What is Programming? Programming
are directions that you assign your computer to perform. It is programming that
allows you to see what is on this screen right now. Almost everything from a
calculator to the robot roaming around mars uses programming. By learning how
to program, you can program things to your own need. For example, programming
your phone to turn off the ringer once it connects to the school wi-fi. To do
this, you would need to learn its language to give it instructions so it can
perform the task. Just like the many languages on earth there are different
languages in programming as well. Programing languages have different purposes
such as JavaScript is used to make websites while C++, a more complicated
language, is used to make web applications.
I will be learning how to use Java
since it is one of the most general and used language.
There are many different data types
which help the application read what you are typing. So far, I have learned
three basic data types. One of them is “int”, which stands for integer. This
allows the application to tell the difference between a text and a number. The
integer includes all positive and negative numbers. The second basic data types
I learned is Boolean which will only print out true or false. In the book, Java
for Dummies, it explains what a Boolean is pretty well, “It doesn’t contain any
other information. However, Boolean variables are really important in Java
because they help the application make decisions” (Mueller 65). For example, if
you were to input a question like “do you go to school?” it will print out true
or false. Lastly the third basic data type I learned is char, which is short
for character. A char is out with one letter enclosed by single quotes, like
this: ‘A’.
I have also learned how to use
variables which is like the variables in math. In math, the variable “x” would
store a certain number and in programming you would do the same but the
variable doesn’t have to be a letter and the value doesn’t have to be a number.
In the picture, I assigned “int” to
be called “LuckyNumber” and then typed in a number. For Boolean, I called it
“CanBeTorF”, which means it can be true or false and since that is a true
statement, I typed in “true”. Lastly, I assigned “char” to be called
“MathGrade” which I then put “A” in between single quotes. Just like how every
sentences end in a period, instead of a period you would end it with a
semicolon when finishing a line of code. In lines 9 through 12, it is basically
telling what the application needs to output. I told it to print out
“LuckyNumber” so that means it would output the number “42” since that was the
number stored in the variable, and so on for “CanbeTorF” and “MathGrade”.
Anyone with any experience in programming, what are the most common
mistakes when learning how to use Java?
Hello Andrew, your post is very intriguing! As I am starting Java as well, I can relate to the connections you make to describe things, such as your relation of variables in Java to math. I know from experience that it helps to relate coding language to concepts you are already familiar with. Good luck!
ReplyDeleteHi Nathan, thank you so much for your input. I hope my blog post gave you more insight about programming. I decided to learn how to program because I think it can be very useful for many things. Why did you decide to learn how to use Java?
ReplyDelete