2013年4月19日 星期五

Second Lesson, Variables


Variables
This passage is teaching me how to use variables on scripting. Sometimes, when there are many same words in your program, we use this skill to save some time. For example, if you want to write a latter to your girlfriend, Alice. In your latter, you may need to mention her name many times. For this time, giving Alice in the place of x variable will help a lot. Whenever you need to use her name, just go ahead use x to replace where the name should be. That will be much more convenient.
EX:
X = ”Alice”
Print(x, “is my favorite girl in high school year,”, x, x, “ I can’t forget you”);
Print(x, x, “What a beautiful name”, x ,“I want to kiss your lips…”);
Print(x, “my loving”, x);
This is an example of programing words, it will shows like the following words:
Alice is my favorite girl in high school year, Alice Alice I can’t forget you
Alice Alice What a beautiful name Alice I want to kiss your lips…
Alice my loving Alice


First Lesson, Print

Today, I am teaching you one of the basic string you will need for programming, that is the print string.

this is what it looks like:
print()

In this phrase, you can put in numbers you want 
As an example, if you type these words and run,

print (12345);
the following words will show out:

12345

It is easy right? Someone may ask, what if I want to show some words. To put words in print, we need phrase around it, because phrase tells computer not to do what we have wrote in the phrase. In this time, the computer will see it as a object that needs to be show out.
this is the example:

print("happy dog");
you will see the following words:

happy dogs

Remember to put ";" after each sentence, so the computer will notice that this is a end of command. Each individual words or phrases should be separate by ",", so the computer can notice their differences. 

If there is anything you do not understand, welcome to ask questions. 

JavaScript













JavaScript 
This is one of the most easy but also useful language you should learn before you get connect to any other languages.
It is like the ABCD you learned before you get into Literature. Without it, you will have no idea how other languages are working. 
JavaScript is very easy to learn. Just like another one called C language, but I decided to teach this one since I am also learning it. This language can be used on either CSS or HTTP, and it also fit for Flash documents to work under it. 
You can easily get improvement on this if you spend enough time on it. I am sure that if you spend time on this today, you may see your own program in a week. 

What is Computer? Why Do We Need Programmer?

Here is a sentence that can easily explain what computer is

Computer= Power+ Stupid

You may wonder why computer are stupid. The truth is, they can only do instructions and operations with your commands. Those mechanical works are very easy for them. In this case, we need programmer. 
Programmer are bunch of people who are good at communicate with computer. They are creative and know how computer work. So what they do is to think of some works they want computer to run and put them into orders of codes, so the computer will be able to understand them. 
Base on those codes, computer will finish the calculating work that human can hardly use their brain to do. 














See this image? this is a example of computer system doing instructions. Your computer are doing billions of these per second when you are using your computer to play Facebook or doing something else

Hello Everyone!


Programming 
Hello guys, my blog is about how programs work and some skills for programming . 
If you are interested about programs, and how it works. Go ahead to here and I will tell you something I learn. The words will not be complicated, because I am just a student. You can easily understand what I mean. So, let's start it.