Source Code  What is it and what is it for? ▷ 2020

Every time we are in front of a computer, tablet, smartphone or laptop we found 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 that is of great importance today.

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

Considering the importance of this computer science element, here we are going to explain a little more about it and what it is your role on the internet. To do this, follow this post in detail.

What is a source code and what is it used for in computing?

What is a source code and what is it used for in computing?

In the computer science area is known as source code to that set of lines of text that are expressed through a programming language. It basically takes care of point out or indicate What steps must the computer follow in order for each of the installed software at.

In other words, it takes care of giving the instructions for the softwares to be grouped and can be transmitted correctly without causing failures or errors in the operating system.

In general, these codes are usually visible in 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 websites and other types of programs like those programmed in JavaScript or HTML web languages.

It is worth mentioning that these elements have Copyright, for which each of them must be created and used exclusively by each of its programmers, where they cannot reach 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 for a website 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 which are the parts of this element to be able to freely create each of the programs of our operating system.

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

Section .data

.data It is used mainly 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

Using this section is very important to programming language, since through it they declare variables or memory spaces whose content we can modify as convenient while it is carried out program execution.

.Text section

Last we have .text where the sentences that will tell you to source code what to do must have the directive global _start which will indicate to kernel where is due start program execution.

Part of a sentence

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

Tags

These are placed right at the start of sentence and are mainly used for assign memory value where is the counter in that sentence. In this case, the tag identifiers can be found with the following characters: _, $, #, @ and?, or as follows: b[a-zA-Z0-1$#@_?]+ b

Instructions

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

Operands

These are the values ​​required to complete the instructions. These operands They may be addresses of memories, constants, expressions or registers, this will depend on the instructions that are being executed.

Comments

We finally found the comments, they begin with the character; and everything that is written right after this symbol is ignored when assembling source code. This acts like any other programming language, where its function is only to provide you with a help the programmer.

Source code and object code How are they different?

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

In the case of source code It’s about a set of sentences that are understandable by the programmer who is in charge of developing a program or only a part of it. Generally, this is usually contained in a text file which can be open in programs as Notepad or Wordpad.

This element will be found written in a programming language like the following: Basic, C, C ++, C #, Java, Perl, Python, PHP, which cannot 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 instructions and written data of a language that the computer understands for its execution, he himself can be binary or machine code. All this comes from what is the translation of certain source code, which may be a fragment of the final and specific program of the program to run or running.

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

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

Surely you have 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 to carry out 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 that we will teach you below:

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

  • The first will be open your browser of preference, 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 write that url of the web page who you want to meet the source code.

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

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

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

  • Then a new one will open for you tab where it will be shown to you the source code of the website.

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

View the source code from Safari

  • The first thing will be to enter your Safari browser from your Mac.
  • Now in the upper bar click on the section “Safari” so that the drop-down menu appears.

View the source code from Safari

  • In the list of options that appears on the screen select “Preferences”.

View the source code from Safari

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

View the source code from Safari

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

View the source code from Safari

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

View the source code from 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 said web page.

View the source code from Safari

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will be of great help to more members of the community. Thank you! 😉

You may be interested:

Rate this post

Leave a Comment