Skip to content
Image with logo, providing a link to the home page
  • United Stated of America flag, representing the option for the English language.
  • Bandeira do Brasil, simbolizando a opção pelo idioma Português do Brasil.

Learn Programming: Introduction

Example of source code for the JavaScript, Lua and Python programming languages, that were presented in the pages describing development environments set-up.

Image credits: Image created by the author using the program Spectacle.

I Want to Start Programming

This is great! The will to learn is extremely important.

The next entries in this website provide material and the required theory to learn to program in any programming language. The examples are provided in the Python, JavaScript, Lua and GDScript programming languages. Thus, you will learn languages able to create programs for the command line, Web browsers, and even with graphical user interfaces.

Naturally, you can choose any the previous languages instead of all of them. The main reason to show examples in multiple programming is demonstrating that the acquired knowledge is valid to other languages besides the first you will ever choose.

What Do I Need to Begin?

To program, you need dedication, curiosity, discipline and perseverance. It is also desirable to enjoy solving problems. You will need a computer, preferably with Internet access and a keyboard.

In sum, that is all. The remaining can be acquired with software.

That Is All? But...

Am I / Do I / Have I...

  1. Required to be a Mathematics expert?

    No. To solve many problems, it is enough to know the four basic operations (sum, subtraction, multiplication and division), division remainder ( has 1 as remainder), power, and square root. You do not have to calculate mentally. If you can solve problems with a calculator, it is enough. The computer will work the numbers for you.

    Evidently, complex problems can require specific knowledge. Mathematics, Physics, Biology, Chemistry, Philosophy, History... All knowledge is welcome for programming activities.

  2. Need a last generation computer?

    No. Virtually any computer will do. In rigour, you could program even using a smartphone or a tablet, though I do not recommend it for professional practice. A keyboard is still important and more practical.

  3. Need to know English?

    It is advisable, though not. However, as you are reading this page, you probably know the language better than I do. One of the goals of this website is providing high quality programming material in Portuguese.

  4. Need a specific computer system?

    No. In my opinion, it is easier to configure development environments on Linux, though Windows and macOS are also good systems. After configuration, the practices described in this material are similar regardless of operating system.

  5. Need to spend money with programming tools?

    No. Many development tools are free software / libre software and/or open source. They are without financial costs, though you can donate for projects that you like.

  6. Need to be an Informatics expert?

    No. You should know how to type, run a program, use an Internet browser, and install a program. That is enough.

    Do you need to learn how to install programs? Check out install programs.

    What if you do not want to install programs? This website provide some online enviroments for some programming languages (for instance, JavaScript, Lua and Python).

    Do you need a text editor? Check out text editors. Microsoft Word and LibreOffice Writer are text processors, unsuitable for programming activities.

    Do you have doubts about accessing files and folders (directories)? Check out file managers and basic file manipulation operations.

  7. Too old; I was not born with a computer. Too young, I do not know if I am prepared.

    There is no minimum or maximum age to program. It is suffices to want to learn it.

  8. Disability or chronic pain:

    • Low vision, or I am blind:

      Do you know how to use a screen reader and a keyboard? Then you can start programming.

      The material in this website tries to be accessible to the broadest extension possible of people. However, some resources will be inherently inaccessible (for instance, visual languages), for which I apologize in advance. Such resources are not fundamental for learning, though they would ease the process.

    • Motor disabilities, Strain Injuries (RSI), Carpal Tunnel Syndrome (CTS) and tendinitis:

      There are assistive technologies for voice input. For instance, Caster.

  9. Am not gifted to learn; I do not know if I can, I think it is too hard; I am not a computer person.

    It is hard to begin any new activity; programming is not an exception. This is the reasons that need dedication, curiosity, discipline and perseverance are important.

    Programming and software development are challenging activities; even professionals doubt their own skills at times.

    You should never give up without trying. Most problems are solvable with dedication, time, study and research.

    The best programmers (men and women) were not born knowing how to program; they keep learning and improving every day. For trivia, programming was dominated by women on its inceptions. Computers do not judge. The only person who can limit your potential is yourself.

Programming activities are particularly hard when you are starting, for they require a different way to think. The so called computational thinking resembles a combination of how scientist, writers, inventors and artists think. Computational thinking is a skill that can be developed; such development is, hereafter, your goal.

What Language Should I Choose?

In theory, you can choose virtually any modern programming language in existence. You can find a more detailed discussion in the introduction about development environments.

In practice, the languages listed in the beginning of this page are good options. Thus, I would advise choosing Python, Lua, and/or JavaScript. It is not a coincidence that these three languages are part of the examples adopted in this material.

To start, pick one.

To start with JavaScript, a Web browser (such as Mozilla Firefox, Google Chrome or Chromium, Microsoft Edge or Apple Safari) and a text editor. In other words, you can start right now, if you are using a modern browser in a computer (browsers for mobile devices as smartphones and tablets are more limited).

To start with Python or Lua, it is enough to install an Integrated Development Environment (IDE) recommended in the respective page of the language to begin programming.

To start with JavaScript, Lua or Python, you can also use an online programming environment created by the author. In this case, you will not have to install any program; you can simply use your browser.

Nevertheless, if any programming language suffices to start, why will you provide examples in several?

Programming languages are tools. Thus, my recommendation is that you learn more than once, to become able to choose the best option to solve a given problem. After all, there are no good reasons to dig a hole with a hammer when you can use a shovel.

In particular, when you are experience, try to learn different programming paradigms (models). This material will usually provide examples using the procedural paradigm in topics for beginners, to focus on concepts that are applicable to most languages. With practice, try to learn other paradigms, such as object orientation, declarative, functional and logic. A paradigm molds the form that you think using a language. Therefore, if you know multiple paradigms, you will have alternatives to think about a very same problem in different ways. You will be able to use paradigms as lens to aid problem-solving.

Who Is the Author?

You have accessed this page; I thank you for your visit.

Though who is the author? This question is pertinent. Critical thinking is fundamental in this century. It is, thus, important to question the authorship of a content.

You can learn a little more about my education in this page. In short, I am a Computer Science undergraduate, master (M.Sc.) and doctor (PhD), with some academic publications. My project include game engines, tools and techniques for digital game development (both for professionals and people who had never programmed before); games for education and health; end-user programming. When I was in the university, I have helped to supervise more than 15 undergraduate students doing scientific initiation, as well as two under-graduation classes.

Thus, this material reflects my programming and software development knowledge and experience (both theoretical and practice). From my (brief) experience with teaching, I have identified that students want to create projects with are modern and use their own devices. Something that, in a way, conflict with resources for beginners.

This material is an attempt at being the one I would like to have when I started to learn programming. Complete from a theoretical perspective, centered on fundamentals, professionally applicable, and practical, with interactive examples and applications. The material references programming language documentation and manuals (to help you learn how to find official help), and some external articles, as complementary resource (Wikipedia may not be an ideal resource for academic research, though it can be excellent as an introductory resource and to provide overviews of concepts). However, the attempt to provide a material that is more complete can result into greater complexity; thus, if you identify parts that are hard, confusing or incorrect, contact me so I can improve them.

Besides, my intention is providing a material that is accessible and inclusive. When applicable, topics are going to comment accessibility and usability aspects. The idea is allowing more people to create and use digital systems, respecting their own abilities.

Learn Programming

In the very first page of this blog, it was commented that programming can be similar to magic. Like combinations of magic words result into spells, combinations of special words (called reserved words) in programming along with the creativity and work of the programmer result into computer applications (programs, apps).

The number of reserved words in programming languages is often low. Many words are also similar in multiple programming languages, because they refer to concepts and fundamentals of programming. In fact, it is enough to know the main words to write code and programs in virtually any programming language.

The previous topics illustrate the affirmation. For each development environment described in previous entries, the section "Getting to Know Language Name Through Experimentation" presented some important reserved words for programming (including from different paradigms).

It should be noted that, even considering that they are few, it is unlike that a beginner could be able to write any computer program by only knowing reserved words. The knowledge of reserved words is a necessary condition, though insufficient to program in a language. It is also one the least important conditions, for it is possible to consult the documentation to find out the reserved words and commands.

As mentioned in JavaScript (and for all other languages in a section with similar title), knowing the words of a (human) language does not imply possessing the required knowledge to write literary works.

The same comparison apply to other activities. In particular, culinary (cooking or cookery) is a pertinent example. It cannot be enough to own ingredients and equipment to prepare a dish (for instance, break, cake or something more complex). On the other hand, once you acquire basic skills, you can follow recipes to prepare (simple or complex) foods.

Culinary has techniques for, for instance: cut, heating (baking, boiling, simmering...), seasoning, conservation. Programming has techniques for, for instance: storage, memory access and modification, arithmetic, choice, repetition, data input and output.

Culinary has equipment and instruments such as knives, ovens and utensils. Programming has reserved words, keywords, and commands to implement techniques, as well as libraries with ready-to-use code. Some of these words were presented in the section of experimentation of each language. The time to learn about them and how to use them is nearing; before, a last comparison between culinary and programming is apt.


Culinary and programming have another item in common: recipes. For culinary, a recipe offers a sequence of steps to perform a food preparation.

Even without programming experience, you can compare, item by item, the code in each language and notice similarities. As commented in the introduction about development environments, this happens because each item implements a very same algorithm.

An algorithm is a finite sequence of steps defined to solve a problem. Algorithms are not exclusive to programming. Math and Physics are full of algorithms, as applicable formulas and equations to solve problems. Some formulas can even have algorithm on their names.

Algorithms commonly define (classes of) expected input and calculated outputs. You can think of an algorithm as a black box, that performs the required processing to convert an input into the expected output (the solution).

The magic of programming is inside the black box. In other words, if you want to become a digital wizard, you should build black boxes. In a more appropriate terminology, you will build algorithms.

When you aim to solve a problem with programming, you should create an algorithm that instruct the machine how to solve it. Algorithms are independent of programming languages. The conversion of an algorithm to a programming language is called an implementation. The programming language is, thus, only a tool to implement an algorithm. By the way, if you are wondering that it is possible to implement algorithms without programming languages, you are correct.

If a language is a tool (which is insufficient for programming), though the goal is to build algorithms, there is an impasse. What should be learned to program?

Programming Logic, Computational Thinking and Algorithmic Thinking

The usual answer, though insufficient, is a programming language. Better answers are programming logic and algorithmic thinking. A more complete answer is computational thinking. More specifically, computational thinking skills.

Computational thinking does not mean thinking as a computer (after all, computers do not think), but to think as a programmer. Ideally, it is an organized, structured, detailed, non-ambiguous thinking, formalized as a sequence of finite steps (an algorithm) that computer is able to perform. In general, the activities are summarized as the Three As: Abstract, Automate, Analyse. They are related to the Four Cs: Communicate, Critical think, Collaborate, and Create; some people argue that Computational thinking could be the Fifth C.

Computational think includes activities such as:

  • Data abstraction, representation and modeling;
  • Process modeling;
  • Definition of process and data flows.

Problem-solving through computational thinking consists of reducing problems in smaller parts, that are simple enough that computers can perform operations to solve. The machine does not solve problems by itself; the person who commands the machine is the problem solver. The solution is expressed as an algorithm, implemented using a programming language as the source code of a program, ran as a program.

Like artists, programmers need creativity, innovation and practice. Like scientists, programmers should understand a problem, formulate hypothesis, conceive attempts for solutions, create experiments, test them. If an attempt proves to be correct, finite and repeatable, it represents an algorithm.

Painters use paint and brushes to express their thoughts and ideas in canvas. Writers use words and pencil to express their thoughts and ideas on paper. Mathematicians use numbers, symbols and operators as part of equations and expressions. Programmers use words and computational resources to communicate with computers. They make the machine work for them: people do the intellectual work, machines do the repetitive work.

Next Steps

Programming requires communication with a machine. Communication depends on a shared vocabulary. Vocabulary is the set of words in a (human) language or of a science. Lexical is the dictionary of a language.

Programming requires a vocabulary and syntactic rules to determine valid constructions, to enable a person to communicate with a machine.

The next topics describe concepts and basic resources for programming, with the goal of introducing programming logic and computational thinking.

  1. Introduction;
  2. Entry point and program structure;
  3. Output (for console or terminal);
  4. Data types;
  5. Variables and constants;
  6. Input (for console or terminal);
  7. Arithmetic and basic Mathematics;
  8. Relational operations and comparisons;
  9. Logic operations and Boolean Algebra;
  10. Conditional (or selection) structures;
  11. Subroutines: functions and procedures;
  12. Repetition structures (or loops);
  13. Arrays, collections and data structures;
  14. Records (structs);
  15. Files and serialization (marshalling);
  16. Libraries;
  17. Command line input;
  18. Bitwise operations;
  19. Tests and debugging.

The material does not assume previous programming experience. The examples for implementation will be written in JavaScript, Python, Lua, and GDScript (Godot Engine).

Your journey to become a software developer is in progress.

  • Informatics
  • Programming
  • Beginner
  • Computational Thinking
  • Learn Programming
  • Python
  • Lua
  • Javascript
  • Godot
  • Gdscript
  • Scratch
  • Flowgorithm