What is writing code? How and where do you learn?

Share:

We can affirm that in our daily lives we carry out a series of fixed and almost unconscious actions that can be written schematically. Suppose, for example, starting our day in the morning:

  • I wake up at the time set by the alarm.
  • I proceed to clean myself.
  • I dress up.
  • Breakfast.
  • I start my way to my job or my place of study.

We could say that this is something “routine”, or that it “obeys our routine”, that is, a series of fixed actions that we know we are going to perform day after day for a certain period of time.

This previous example coincides fully with what in computing we call a program, algorithm or code: a sequence of instructions that determine the behavior of the entity that executes the program.

Why and for what purpose do we program?

Programming has the ability to express any computation within the reach of the programmer’s imagination, from solving a simple problem such as calculating bank interest, to highly complex applications such as a social network. It can be said that each program covers a need, but also represents an idea and implements a functionality.

An example is WhatsApp . Linked in its beginnings to the expansion of smartphones, the idea was to have a reliable form of text communication without the limitations of SMS and its associated cost, with the advantage of operating through the Internet. Therefore, regardless of the data rate, communication from any WiFi connection was assured.

But programming is not only focused on software development . It also allows us to address a set of microtasks that we can perform with simple commands, such as searching for common text patterns in text documents. This is what is known in computing as scripting : the creation of microprograms that perform ephemeral tasks.

Example of a program that receives numbers via keyboard and shows the final sum. Author Provided

How to learn to do it?

Writing code and generating programs are done through a programming language. Programming languages ​​are the instrument that we use as programmers when working with computers, so that they understand what we want to do.

These languages, like our natural language, are made up of a series of syntactic and semantic rules, as well as a series of “common tools” to all of them. In computing they are called programming fundamentals, and they cover concepts such as:

  1. Basic elements of a program (instructions, simple data types, operators, variables).
  2. Input and output (reading and writing variables, keyboard input, files).
  3. Flow control.
  4. Conditional structures ( if , if else , switch ) and boolean expressions .
  5. Loops or iterators ( while , until , for ).
  6. Control of errors and exceptions.

From 6th grade onwards, a student is already able to fully understand and handle all the concepts related to programming fundamentals.

Self-taught programmers

It is not necessary to have any prior knowledge to start programming. In fact, some of the most relevant programmers of recent decades were initially self-taught, making very relevant innovations along the way.

Some illustrious figures in this sense are:

So where do we start?

Without a doubt, the best way to start – and it is the one that is usually used in academic channels – is to learn with a language where the imperative paradigm is used , based on orders or instructions and that is also explicit and restrictive in its entirety. syntax.

In that sense, the C and C++ languages ​​(the second as an extension of the first) are perfect for the novice programmer. In its simplest form, writing code for these languages ​​is not only readable but expresses exactly what the programmer wants it to do.

Some examples of this form of programming using C++:

  • “Write the text string ‘Hello’ on the screen with a line break” => cout <<“Hello” << endl;
  • “Defines a variable for natural numbers” => unsigned natural;
  • “Save the value 2 in the ‘natural’ variable” => natural = 2;
  • “Add 2 to the content of the variable ‘natural’” => natural = natural + 2;

As you can see, there is no room for ambiguity or free interpretation: the programmer specifies what he wants just the way he thinks it.

‘Sample_Numbers’ program written in pseudolanguage and its equivalence in C++ language Author Provided

In addition, it is advisable to use an Integrated Development Environment (known as IDE), which provides the programmer with the necessary tools to write code.

Our recommendation to start with C++ would be the Codeblocks IDE, for which we will also need to install the MinGW compiler. On its website we will find the different versions according to our operating system.

Academic and non-academic possibilities

Currently the academic paths are well defined, and it is preferable to go through the technological path. A student who is currently in secondary education has these itineraries:

Pre-university education

  1. Completion of the Technical Medium Degree FP in Microcomputer Systems and Networks as a prerequisite at the level of the Higher Degree FP
  2. Completion of a Higher Degree FP of Higher Technician in Multiplatform Application Development or Higher Technician in Web Application Development.
  3. Through the Baccalaureate route, with the option of the Baccalaureate in Sciences and Technology as a prerequisite for Higher Degree FP and university education.

University education

The most suitable itineraries are the degrees in computer engineering offered in any of their variants, but the most interesting are undoubtedly the Degree in Computer Engineering and the Degree in Software Engineering .

Any of these degrees includes the skills necessary for the design and development of software in all its possible variants. However, the first trains more generally within the world of computing, while the second focuses on the strict field of software development .

Outside of academic avenues we also have many resources at our disposal. Online platforms like ToolboX.Academy are designed for a first introduction to this world of programming and computational thinking.

In English we find communities like StackOverflow (also in Spanish ) and various communities on Reddit ( r/learnprogramming , r/cpp_questions , specific for C++). Generic searches on Google are also the daily life of a programmer at any level, not just a beginner.

Of course, there is a huge number of well-structured tutorials (for example, on the C++ reference website ) with which we can get started with C/C++ languages, as well as reference introductory books on university degree subjects.

Programming, today more than ever, is available to everyone. However, computer literacy will only take place when it is officially included in the Primary and Secondary education curriculum. It is, therefore, a political responsibility.

Author Bios: Alberto Zamora Jimenez is a Graduated in Computer Engineering, Francisco Vico is Professor of Computer Science and Artificial Intelligence, José Alberto Álvarez Manoja is a Graduated in Computer Engineering and Raimon Segura Morera who is Lead Developer – Full Stack Engineer all at the University of Malaga

Tags: