HomeAboutBlogPortfolioTechNews Register Login

My Blog

As I have studied development I have learned that there is a lot to know. Everytime I learn something new, I realize there is much more I don't know.

Because I am learning, I may edit these blog posts multiple times.

I also may be incorrect on my understandings. So please feel free to create an account and use the comment section to point out where I am wrong. Also feel free to correct me on an grammatic errors.

Here are some things I have learned along the way!

Interpreted vs Compiled, Static vs Dynamic, Strong vs Weak

Becoming a Programmer

Source Code.


I first want to discuss the three levels of programming languages.  


Languages like JavaScript, Java, C, and other languages that we typically hear about are considered high-level languages.  Relatively speaking they are easy for humans to read and understand.  


A level below the high-level languages is Assembly code.  It is still somewhat readable by humans but a lot harder to understand.  


And the lowest level that the CPU can read is machine code.  This is the binaries with ones and zeros.


So when we write code we write source code.  Which is the code typed into a text editor or IDE’s source code editor by humans(I am not aware of any programing monkeys).  


In my research(googling) I have heard that source code is the term for code written in a compiled programming language such as C or Java and interpreted languages such as JavaScript code is not called source code, just code.  Either way, this is typically written in a high-level language.


Translation and Run-Time


The code needs to be changed from what we have written into machine code to be read and executed by the CPU.  This is called translation. Compiled languages and interpreted languages gets translated differently.  


Another thing we need to understand is run-time.  Run-time is the period when the code is being executed.  This is where the difference between compiled and interpreted languages comes in.  Compiled languages gets translated before execution, whereas interpreted languages gets translated line by line at run-time.  Because compiled languages are translated before run-time, they are typically faster at execution. 




Statically typed is when the data type for constructs are checked before run type.  As opposed to dynamically typed, which is checked during execution.  


I have found that there can be a little confusion with these definitions and the meanings of weakly and strongly typed.  


Weakly typed in general are languages that don’t require you to set a data type when you initialize a variable.  They generally are more flexible with changing that variable’s type later on in the code. Whereas strongly type requires you to define the data type for the variable.


Typically languages that are compiled, statically typed, and strongly typed are faster at execution.  Interpreted, dynamically, weakly typed languages allows for more flexibility.  


A language can have any combination or characteristics of those combinations that I have explained.  With today’s languages and technologies there is a lot more grey areas in these definitions, but understanding these characteristics of the programming language that you write, will help you write better code in that language.