You are on page 1of 1

Day 1 - Programming, Basic Concepts

When we program, we wirte code in human-redeable form (High-Level Programming Language), this code is compiled into machine code that can be read by the
machine, or a low level code than can be interpreted by an interpreter and tell the machine what to execute.

Runtimes, provide an enviroment where your program can run, they can inlcude: * An interpreter that traduce your high level source code, to instructions that your
machine can understand * Memory allocation (accesing variables in memory, garbage collector , accesing heap and stack) * An interface that communicate with
your OS

We can see a runtime as a our home or building and us being a program, in most cases, we can't live/run in the open streets or fileds ( the OS), our live or time in
execution, run inside an encapsulated enviroment that work as an interface with the outside world and at the same time, it give you the space or meters ( ram) to
succefully run your operations or tasks. You need more/less wind, your open/close the windows on your building. You need light, you switch the lightswitch and the
building knows that has to conduct electricity from outside to the lamp on the bedroom. In both operations, you don't know or don't need to know how the building,
your runtime , is interacting with the outside, he is doing it, and you only need to know the functions that the building makes available for you to get the final result
done.

The runtime work the same way, if you program need to interact with data stored in your hardrive, he knows how to ask the OS to search for the data, if you need to
create a window, he knows how to talk with the OS so he create a nice colored windows with buttons and text in your monitor or smarthphone. You only need to know
the right function to execute the expected operation.

Programming Languages are in most cases purely textual, they use sequences of text including words, numbers, and punctuation, much like any written natural
languages. So one of the main elements of a Programming lenguage, is its syntax . This is very important to understand, the syntax most be respected always.
Going to a life example, if you work as an interpreter and you are traducing from english to spanish, you can't do it with a text that have grammatical or ortografic
errors, the text must have the correct semantic form so can be understended, and be transformed in meanings, or in programming case, operations executions. You
have diferent forms to say the same thing, but each form itself, has a correct and strict syntax for being written.

Java
There is no point in find an explanation in 'Why Java', let's skip that part and just explain how it works.

So, having the above concepts intruduced, let's presents the tools that exist in java. First we have Java as the Programming Language, is a High Level programming
language so it's redeable for a human. The source code it's stored in text files ended with the extension .java , then is compiled by his compiler javac and
transformed into a low-level code that can be interpreted by the Java Virtual Machine (JVM)

You might also like