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.

Blog

This page is available in the following languages:

List of Blog Entries

Ideas, Rules, Simulation: Drawing with Drawing Primitives (Circles, Ellipses and Polygons)

Published by Franco Eusébio Garcia

Published on 01/06/2022

Last updated on 02/06/2022

Outlines allow drawing illustrations, though filled graphics generate more pleasant results. With some algorithms, one can create contours and fills for shapes such as circles, ellipses, and polygons. After they are created, one she/he can use the implemented subroutines to start drawing on her/his own programs. Learn how in this topic. Examples in JavaScript (HTML Canvas), Python (PyGame), Lua (LÖVE / Love2D) and GDScript (Godot Engine)

Tags:
  • Video
  • Informatics
  • Programming
  • Beginner
  • Computational Thinking
  • Ideas, Rules, Simulation
  • Python
  • PyGame
  • Lua
  • LÖVE (Love2D)
  • Javascript
  • HTML Canvas
  • Godot
  • Gdscript
  • Cute

Ideas, Rules, Simulation: Coins, Dice and Rectangles

Published by Franco Eusébio Garcia

Published on 11/05/2022

Last updated on 30/05/2022

Throwing coins and dice are two of the simplest examples of simulations using random numbers. To introduce (or review) basic programming concepts such as conditional structures, repetition structures (loops), and subroutines (functions and procedures), this topic introduces the rectangle as a drawing primitive, and implement two systems with graphics to simulate flipping a coin and rolling a die. Examples in JavaScript (HTML Canvas), Python (PyGame), Lua (LÖVE / Love2D) and GDScript (Godot Engine)

Tags:

Ideas, Rules, Simulation: Randomness and Noise

Published by Franco Eusébio Garcia

Published on 30/04/2022

Last updated on 30/05/2022

The use of pseudorandom numbers is one of the simplest ways to add changes and variability to computer programs. Learn the concepts of determinism, indeterminism, randomness, pseudorandom number generators (PRNGs), and start creating images and animations of noise. Examples in JavaScript (HTML Canvas), Python (PyGame), Lua (LÖVE / Love2D) and GDScript (Godot Engine)

Tags:

Ideas, Rules, Simulation: Pixels and Drawing Primitives (Points, Lines, and Arcs)

Published by Franco Eusébio Garcia

Published on 21/04/2022

Last updated on 02/05/2022

In computer graphics, the basic unit of a drawing is the pixel. Drawing primitives define resources such as lines and arcs to make operations with pixels easier. Learn how to use and create points, lines and arcs using pixels. Examples in JavaScript (HTML Canvas), Python (PyGame), Lua (LÖVE / Love2D) and GDScript (Godot Engine)

Tags:

Ideas, Rules, Simulation: Introduction: Window and Hello World

Published by Franco Eusébio Garcia

Published on 05/04/2022

Last updated on 02/05/2022

Hello, world! The classical introductory program for programming languages will be the start point for the creation of interactive simulations and digital games. Learn how to create a window and write text (as graphics) on it. Examples in JavaScript (HTML Canvas), Python (PyGame), Lua (LÖVE / Love2D) and GDScript (Godot Engine). This page also serves as a table of contents for individual topics.

Tags:

Ideas, Rules, Simulation: Motivation

Published by Franco Eusébio Garcia

Published on 27/03/2022

Last updated on 28/03/2022

To learn programming, one must implement projects. Learn Programming provides a theoretical material. To complement it, Ideas, Rules, Simulation is a new project based approach to lean programming by implementing interactive simulations and digital games. The goal is to explore multimedia content in projects with incremental difficulties, for a continuous, iterative and interactive learning.

Tags:

Learn Programming: Tests and Debugging

Published by Franco Eusébio Garcia

Published on 21/02/2022

Last updated on 21/02/2022

Almost every minimally complex software has issues. Bugs may exist in the project, in the dependencies, or even in hardware. Good programmers acknowledge the issues and try to fix them. To do this, here are strategies, techniques and tools (such as debuggers). Learn some of them in this topic. Examples in JavaScript, Python, Lua and GDScript.

Tags:

Learn Programming: Bitwise Operations

Published by Franco Eusébio Garcia

Published on 16/02/2022

Last updated on 16/02/2022

In general, one variable stores one value. However, every variable is composed of bytes, which are composed of bits. With suitable operators, one can manipulate each bit that is part of a variable (normally of the integer type). Learn how to do it using bitwise operations. Examples in JavaScript, Python, Lua and GDScript.

Tags:

Learn Programming: Command Line Input (Command Line Arguments and Interactivity)

Published by Franco Eusébio Garcia

Published on 14/02/2022

Last updated on 14/02/2022

For some people, it is archaic; for others, it is irreplaceable. The command line is still an excellent resource for software development. With some adjustments, you can integrate your own programs to the command line. Learn how to work with command line arguments as a form of input. Examples in JavaScript, Python, Lua and GDScript.

Tags:

Learn Programming: Libraries

Published by Franco Eusébio Garcia

Published on 09/02/2022

Last updated on 27/03/2022

Predefined source code comes from three main origins: the standard library of a language; your own past creations; third-party libraries. In previous topics, you have used the standard library to build your own programs. Now it is time to move your reusable code to their own files (to create your libraries) and start using external libraries. Learn how to create and use libraries in programming languages. Examples in JavaScript, Python, Lua and GDScript.

Tags:

Learn Programming: Files and Serialization (Marshalling)

Published by Franco Eusébio Garcia

Published on 06/01/2022

Last updated on 17/01/2022

It is time to work with secondary memory. After ending a session of a program, it is common to save data to load it as the starting point of the next use. This is possible with files. Learn how to manipulate text files (including JSON) and binary files. Also learn how to create image and audio files. Examples in JavaScript, Python, Lua and GDScript.

Tags:

Learn Programming: Records (Structs)

Published by Franco Eusébio Garcia

Published on 24/12/2021

Last updated on 27/04/2022

Primitive types are convenient and built-in, though they are... Primitive. How about creating your own data types to abstract the data of a program? The solution's modeling would certainly become more elegant and customized, with relevant data gruped in their own types. Learn how to create records in programming languages. Examples in JavaScript, Python, Lua and GDScript.

Tags:

Learn Programming: Arrays, Strings, Collections and Data Structures

Published by Franco Eusébio Garcia

Published on 16/12/2021

Last updated on 08/01/2022

Programming allows processing and analyzing large amounts of data (for instance, hundreds or millions of samples). However, it is not convenient to declare one variable per value. As an alternative, one can use data structures and collections, that enables storing, accessing and manipulating multiple values using a single variable that abstract the memory for all samples. Learn how to use arrays, strings and collections. Examples in Python, Lua, GDScript (for Godot Engine), Scratch and Flowgorithm.

Tags:

Learn Programming: Repetition Structures (Loops)

Published by Franco Eusébio Garcia

Published on 23/11/2021

Last updated on 01/06/2022

As a programmer, you can solve a problem once. Then you can instruct the computer to repeat the solution as many times as it is needed. To do this, you should not duplicate code; rather, it is enough to define repetition structures, also called loops. Learn how on this entry. Examples in Python, Lua, GDScript (for Godot Engine), Scratch and Flowgorithm.

Tags:

Learn Programming: Subroutines (Functions and Procedures)

Published by Franco Eusébio Garcia

Published on 19/11/2021

Last updated on 21/12/2021

Modularization can make the code of a program easier to implement, debug, reuse, and understand. One technique to create modules is defining subroutines (or subprograms), a generic term that combines the concepts of functions, procedures and methods. Learn about subroutines and start using them in your projects.

Tags:

Learn Programming: Conditional Structures

Published by Franco Eusébio Garcia

Published on 15/11/2021

Last updated on 26/11/2021

It is possible to change the control flow of a program according to processed values. In other words, it is possible to make a program decide which instructions it should (or should not) execute according to its state or input values. To enable this, programming languages define conditional structures. Learn how to use them in this topic.

Tags:

Learn Programming: Logic Operations and Boolean Algebra

Published by Franco Eusébio Garcia

Published on 14/11/2021

Last updated on 15/11/2021

Combinations of logic operations allow to build complete computers. Programming languages allow using logic operations at a higher level than by combining circuits. With the operators and, or and not, you can analyze multiple sub-expressions to obtain the result as a single logic value. It is therefore convenient to learn how to use logic operators.

Tags:

Learn Programming: Relational Operations and Comparisons

Published by Franco Eusébio Garcia

Published on 11/11/2021

Last updated on 12/12/2021

Relational operators allow comparisons between program data, which enables decision-making and plans for future states based on the current one. Are two values equal or different? Is one greater than the other? Learn how to obtain logic values as results from comparisons. Examples in Python, Lua, JavaScript, GDScript (Godot Engine), Scratch and Flowgorithm.

Tags:

Learn Programming: Arithmetic and Basic Mathematics

Published by Franco Eusébio Garcia

Published on 07/11/2021

Last updated on 02/03/2022

Programming skills allow retiring calculators and spreadsheet software. Computer processors can solve arithmetic operations quickly; with programming languages, it is possible to use computational resources to solve problems. Learn to perform Mathematics operations in the programming languages Python, Lua, JavaScript, GDScript (Godot Engine), as well as Scratch and Flowgorithm.

Tags:
  • 1
  • 2
  • 3