Restricted access. Examples are protected (replaced by "?"). Read more
Programming tutorial for beginners

Computer Programming from Middle School to College

Hi guys. If you want to know how to program using a computer, here is a tutorial for you.

We try to show how to program using the Python programming language. Python is not a snake! It's just a wired name of “language” that gives instructions to computer. This will also help you to jump to many other languages (such as Java, Groovy, BeanShell, Ruby,..), but we will come back to this later. We can shows how to run a code, i.e. a text that can be understood by a computer. You code will slave the computer and makes it to do anything you like!

What do you need

You need two programs to run this tutorial. Please install Java and DataMelt DataMelt program. This is the most complicated step and you may need to ask your parents to do this.

So why do you need these programs? Java is a “Virtual Machine”. It is like a robot that sits inside a computer, reads your program code and gives instructions to computer what to do. It runs or “executes” your code by the computer. Java can be inside any computer (or it can be “installed” inside any computer). It does not matter what exactly computer you have: Mac (whitish expensive boxes with apple the bite taken), Windows computer (have different colors, but with squares “windows”) or anything else. So, Java executes your program code without worrying that different computers do not understand your program. Java also helps you to write the code - it may correct your program before giving it to the computer to “execute”. Or even it can protects the computer from a code that can harm the computer. Java thinks about your code before giving it to a computer.

Java drinks coffee Java is often pictured as a penguin. He sits inside a computer, reads the code you have written, and then does the job - executes it. But before he drinks a coffee (kids, do not try coffee before 12!). Some people think that Java is slow because of this. Not true - Java is thoughtful first, and then it is super fast!

After Java is installed, it starts to talk to your computer. It waits for your program to execute. Then install DataMelt program to help to write simple codes that are executed by Java. DataMelt is a collection of program codes written by others that can give you a hand. When you write programs, you can reuse the code of other people. Such code is put into “libraries” inside DataMelt. When you write your code, you call others people code from the “library”, without reinventing existing programs. Libraries can be huge! In fact, Java also has many libraries inside and DataMelt uses them.

You will need to learn how to find needed pieces of code that can be inserted inside your program. You will learn about this here.

You code will be read by Java. Java transforms the code and runs it by a computer. Java understands how to run a code on any computer. First it checks the code and tells what can be wrong with it. It also understands code and help you to write a code when you type.

So why do you need to program?

  1. You can make a game (Remember, Minecraft and Call of Duty and other games were all made using programing.)
  2. You can make calculations using numbers.
  3. You can get a job, earn money and count them, see (2)
  4. You can do a lot of serious staff (your job does not count!) which we will be explained later. For example, you can study this universe you live it, or even “simulate” it inside a computer.

So, let us start a first lesson. Jump to Lesson 1.

If you a college student, you can skip lessons 1-50.

start.txt · Last modified: 2015/05/10 17:18 (external edit)
CC Attribution-Share Alike 3.0 Unported