You are on page 1of 3

Why do we need to program a computer or a digital device at the first place?

-Programming a computer or a digital device is done by setting the right “switch” to perform specific
task such as logical and arithmetic operations were computers excel the most.

But, there is a problem. Programming a device electrically isn’t practical.

-That’s were programming languages came, it bridges the gap between human and machine
communications.

-Programming language mostly designed to be more akin to English language in order for us human
programmers to instruct the computers more effectively and programming languages translate this
closely human language into machine language for the computer to process and understand it.

How does a programming language actually work?

-Programming languages generally translate source code to machine code. It can be done in 3 ways.

-Compiled

-Interpreted

-Hybrid

Compiled language

-It works by converting the entire source code into machine code at once.

-Analogy, human speaker being bilingual and proficient in both languages like English to Korean

Interpreted language
-It works by converting the source code line by line in real time into machine code.

-Analogy, having an interpreter in real time to translate your language into another language

Hybrid language

-It works by combining compiled and interpreted language. First by compiling the source code into an
intermediate language then the intermediate language translates it to real time machine code.

-Analogy, reading a book that is from foreign language then it is translated for your native language.

Compiled Interpreted Hybrid


Pros
-fastest to run because it is -can virtually run on any -can be faster than interpreted
directly compiled for specific platform without any language and portable as
platform, thus no overhead on modification to base source interpreted language.
execution. code, thus easier to deploy.
Cons
-hard to maintain and you -relatively slow to run because -slower than compiled language
cannot run your code in the code is translated during and if the runtime is not
different platform without execution, thus having a major available for specific platform,
doing slight to major alteration overhead. you cannot run your program.
to your base source code.
Example Languages
C, C++ JavaScript, VBScript, PHP Python, Java, C#
So, hybrid is the best?

-It depends on application, compiled language is better if you need better hardware controls like
operating system, drivers, firmware, etc. Interpreted is better if you want to perform a fast action like
basic data manipulation and calculations. Hybrid mostly reign in general purpose language because it
can do the functions of interpreted and compiled language but not as efficient if you try to specialized it.

Why Python is mostly used as general programming language?

-Python can run on any platforms (Windows, Linux, Mac OSX, Android, iOS, Web browser,
microcontrollers, etc.)

-Python have all library that needs to perform specific task like web application (Flask, Django), desktop
application (PyQT, tkinter), image processing (OpenCV, PIL), Desktop and web app automation
(pywingui, Selenium), embedded systems (micropython, circuitpython, PiGPIO), database manipulation
(sqlalchemy, pymysql), IoT (pahoMQTT, requests), artificial intelligence (Tensorflow, PyTorch, skilearn),
natural language processing (NLTK, transformers) and etc.

Where I can see Python based systems?

-Majority of well-known web application uses Python (Instagram, Netflix, Spotify, YouTube, Dropbox)

-AI based applications (Google Translate, chatbots, FaceApp, face recognition apps and devices)
Wow, that was awesome, can I start coding now?

-You can but I need to remind you the basic operation of a computer

-Computers mostly operate in logical operations (NOT, OR, AND) and by accessing data from the
memory and input devices.

-Computer can understand various data types like

-Integer, represents whole number (eg. Age, population, item quantity, network port number, etc)

-Float, represents numbers with decimal places (eg. Area, speed, velocity, mathematical constants, etc)

-String, represents text (eg. Name, address, phone numbers, messages, comments, etc)

-Boolean, represents logical true or false

-List, represents a group of any data types

(Share screen, programming session na)

You might also like