Skip to main content

What is programming?

Programming is providing the necessary instructions to a machine or device so that it can work automatically.

In every program there are a series of elements that will always be present:

  • Input: data or information that must be provided to the machine so that it can perform the desired operations.
  • Ouput: information or result that the machine shows.
  • Storage: The data, while being processed by the machine, needs to be stored in some way to work with it. Here we will talk about variables, vectors, matrix or other complex data storage structures, although in this course we will limit ourselves to working with variables.
  • Processing: operations to which the data is subjected to obtain the desired results. They can be arithmetic, logic, loops, conditionals, etc...

The development of a program consists of the following steps:

  1. Definition and analysis of the problem
  2. Algorithm design using flowcharts.
  3. Program coding: obtaining the source code using the chosen programming language.
  4. Compilation: conversion of source code to machine language.
  5. Bug debugging and program checking.
  6. Operation: documentation and maintenance. In this course, due to the simplicity of the programs created, we will not go into this step, although it is essential that every good program be accompanied by good documentation and a good update plan.

There are a series of principles when designing software that are common:

  • KISS: acronym for Keep It Simple, Stupid! This principle tells us that any system will work better if it is kept simple than if it becomes complex. Simplicity has to be a goal in development and unnecessary complexity must be eliminated.
  • DRY: acronym for Don't Repeat Yourself. This principle talks about the duplication of the code, first of all because of the previous principle, and also because subsequent maintenance becomes more difficult since we do not know where we have to modify things because they are repeated on various occasions throughout the program and the inconsistencies multiply.

For further information about these principles consult here.