Skip to content
Step by Step Internet 🌐 Guides for learning to surf the Net

Source code: What is it, what is it for and what is its importance on the Internet?

Source code: What is it

Every time we are facing a computer, tablet, smartphone or laptop we find an operating system that is made up of a large amount of software . All these softwares have a common element which we know as source code and which is of great importance today.

Source codes are nothing more than a set of files that have very precise instructions that are based on the programming language >, and which are used to group the different information programs that are used on a computer so that they run smoothly.

Given the importance of this element of computing , here we will explain a little more about it and what is its function on the Internet . To do this, follow this post in detail.

What is a source code and what is it for in computer science?

¿Qué es un código fuente y para qué sirve en informática?

In the area of ​​informatics is known as source code to that set of lines of text that are expressed through a programming language . Basically, it is responsible for pointing or indicating what steps the computer must follow in order to correctly execute each of the software installed on it.

In other words, it is responsible for giving the instructions so that the softwares are grouped and can be transmitted correctly without causing failures or errors in the operating system.

Usually, these codes are usually visible on some software while performing some certain operations . However, these instructions will be poorly understood unless the language with which it was programmed is handled. This is the same thing that happens frequently in the different web pages and other types of programs such as those programmed in JavaScript or HTML web languages.

It is worth mentioning that these elements have copyright , so each of them must be created and used exclusively by each of its programmers , where they cannot get to be reproduced by third parties . In this case, these tools are mainly used for what is the creation of computer programs .

What are the parts of a source code of a web or software ?

The source code is made up of a large number of elements which are responsible for facilitating its development . Next, we are going to show you what the parts of this element are so that you can freely create each of the programs of our operating system.

It is important to mention that it has three different sections such as .data .bss and .text, which we explain below:

Section .data

.data is mainly used to be able to declare constant or initialized values ​​before program execution . It is important to clarify that these values ​​are not modified during runtime .

Section .bss

The use of this section is very important for the programming language , since it declares the variables or memory spaces whose content we can modify for convenience while program execution takes place.

Section .text

Finally, we have .text where the sentences that will indicate to the source code to do must have the global _start directive which will indicate to the kernel where the program execution should start .

Part of a sentence

In the case of the judgment, the source codes are made up of four parts which are: label, instructions, operating and comments . Which we explain to you below:

Tags

These are placed just at the start of the statement and are mainly used to assign the memory value where the counter is located in that statement. In this case we can find the tag identifiers with the following characters: _, $, #, @ and?, or as follows: b [a-zA-Z0- 1 $ # @ _ ?] + B

Instructions

As the name implies are those that tell the processor what steps to perform. In this case they may exist or not operands , this will depend on the instructions given. These are typical of the language being used.

Operandos

These are the necessary values ​​to complete the instructions. These operands can be addresses of memories, constants, expressions or records, this will depend on the instructions that are being executed.

Comments

Finally we find the comments , they begin with the character; and everything that is written just after this symbol is ignored when assembling the source code. This acts like any other programming language, where its only function is to provide help to the programmer .

Source code and object code How are they different?

Today there are many doubts about what is the source code and the object code, where even many of the users tend to confuse these two terms even if each of them meets a different function. Therefore, here we are going to explain a little about the difference between them.

In the case of the source code it is a set of sentences that are understandable by the programmer who is responsible for developing a program or only a part of it. Usually, this is usually contained in a text file which can be opened in programs such as notepad or Wordpad.

This element will be written in a programming language like the following: Basic, C, C ++, C #, Java, Perl, Python, PHP , which does not It can be read or understood by anyone, but only by those who know about this programming.

While the object code is nothing more than a set of written instructions and data of a language that the computer understands for its execution , it can be binary or machine code . All this comes from what is the translation of a certain source code , which may be a fragment of the final program and specific to the program to be executed or running .

>

In other words, the source code is what you write as a programmer, while the object code is the result of the compilation made by the program as such , where a translation by the language has been previously done so that the computer understands it .

How can we see the source code of a web page easily?

Surely you’ve been wondering how you can do to see the source code of a web page in an easy and fast way. In this case we will teach you how to perform this process from web browsers in a very simple way, including the safari browser where this process differs from the rest.

Therefore, follow each of the steps we will teach you below:

View the source code using Google Chrome, Mozilla Firefox or Edge

  • The first thing will be to open your preferred browser , in this case we will work with Google Chrome, keep in mind that this process is similar for any of these browsers .
  • Now in the address bar type the url of the web page that you want to know the source code .
  • Ver el código fuente usando Google Chrome, Mozilla Firefox o Edge

    • When you have entered the page, right-click on it and in the drop-down menu select the option of “See source code” or ” Source”. Keep in mind that you should not click on a tab or image because this option will not appear.

    Ver el código fuente usando Google Chrome, Mozilla Firefox o Edge

    • Then a new tab will open where you will see the source code of the website .

    Ver el código fuente usando Google Chrome, Mozilla Firefox o Edge

    See the source code from Safari
    • The first thing will be to enter your Safari browser from your Mac.
    • Now in the top bar click on the “Safari” section to bring up the drop-down menu.

    Ver el código fuente desde Safari

    • In the list of options that appears on the screen, select permittedPreferences†.

    Ver el código fuente desde Safari

    • Now click on the “Advanced” tab located in the upper right corner of your screen.

    Ver el código fuente desde Safari

    • Now check the “Show development menu in the menu bar” box This option is located at the bottom of the “Preference” window.

    Ver el código fuente desde Safari

    • Then in the address bar place the url of the page you want to see the source code.
    • Here you select the “Development” option.

    Ver el código fuente desde Safari

    • In the list of options that appears on the screen, select “Show page source code”. This will allow you to know the programmed language of that web page.
    • Ver el código fuente desde Safari