Skip to content

Latest commit

 

History

History
124 lines (100 loc) · 5.59 KB

001-what-is-programming.md

File metadata and controls

124 lines (100 loc) · 5.59 KB

What is programming?

Feel free to skip this part if you already know everything it's talking about.

As a computer user you know that computers don't have feelings. They don't work any faster or slower depending on if we're angry at them or if we're happy. Computers can perform millions of calculations per second, but they require us to tell them exactly what to do. If they do something else than we want them to do the problem is usually that they don't understand our instructions the way we understand them.

The only big difference between programming and what you're familiar with already is that instead of clicking buttons to do things we write the instructions using a programming language. Most programming languages consist of English words, digits and some characters that have special meanings.

Unlike people often think, programming is usually not complicated. Large programs are always made of small, simple pieces, and those pieces are written one by one. Programming languages are made to be used by humans, so if there's an easy way to do something and a difficult way to do something, you should use the easier way.

What do I need?

First of all, you don't need to be good at math. Some programmers are good at math, some are not. Programming and math are two separate things and being good or bad at one doesn't mean you are automatically good or bad at the other.

You also don't need a powerful computer. I could do almost all of my programming on a 12-year-old computer if I needed to. Fast computers are nice to work with, but you don't need them.

Programming takes time like all hobbies do. Some people learn it quickly, and some people don't. I don't expect you to read this tutorial in a couple hours and then master everything it's talking about. Take your time with things, and remember that I learned to program slowly.

Getting started

This tutorial uses a programming language called Python because it's easy to learn and we can do many different things with it. For example, we can create our own applications that have buttons that people can click instead of just using applications written by others.

Character Names
+ plus
- minus, dash
_ underscore
* star, asterisk
/ forwardslash (it's leaning forward)
\ backslash (it's leaning back)
= equals sign
% percent sign
. dot
, comma
: colon
? question mark
! exclamation mark
< > less-than and greater-than signs
' " single quote and double quote
# hashtag
() parentheses
[] square brackets, brackets
{} curly braces, braces, curly brackets

That may seem like many characters, but you probably know many of them already so it shouldn't be a problem.

How to read this tutorial

I've done my best to make this tutorial as easy to follow as possible. Other people have commented on this and helped me improve this a lot also. But what should you do if you have a problem with the tutorial?

  1. Try the example code yourself.
  2. Read the code and the explanation for it again.
  3. If there's something you haven't seen before in the tutorial and it's not explained, try to find it in the previous chapters.

One of the most important things with learning to program is to not fear mistakes. If you make a mistake, your computer will not break in any way. You'll get an error message that tells you what's wrong and where. Even professional programmers do mistakes and get error messages all the time, and there's nothing wrong with it.

If you want to know what some piece of code in this tutorial does just try it and see. It's practically impossible to break anything accidentally with the things you will learn by reading this tutorial, so you are free to try out all the examples however you want and change them to do whatever you want.

Even though a good tutorial is an important part about learning to program, you also need to learn to make your own things. Use what you have learned, and create something with it.

But reading is boring!

This chapter is probably the most boring chapter in the whole tutorial. Other chapters contain much less text and much more code. You can also get pretty far by just reading the code, and then reading the text only if you don't understand the code.

Summary

  • Now you should know what programming and programming languages are.
  • You don't need to be good at math and you don't need a new computer.
  • Complicated programs consist of simple pieces.
  • You don't need to remember how to type different characters. Just find the character on your keyboard and press the key, holding down shift or AltGr as needed.
  • Make sure you understand everything you read.
  • Experiment with things freely and don't fear mistakes.
  • Error messages are our friends.
  • Let me know if you have trouble with this tutorial.
  • Now we're ready to install Python and get started!

List of contents