Programming basics
Low-level VS high-level programming languages
Programming languages can be categorized into low-level and high-level languages based on their abstraction from machine instructions:
- Low-level languages: These are closer to the hardware and include Assembly. They offer high performance and control over system resources but require more effort to write and debug. They rely directly on the processor's instruction set for execution.
- High-level languages: These are closer to human language and include Python and Java. They are easier to write, read, and maintain but are less efficient compared to low-level languages as they rely on interpreters or compilers to convert code into machine instructions.
Compiled VS interpreted languages
Programming languages can be classified based on how their code is executed:
- Compiled languages: These languages, like C++ and Java, require a compiler to convert the source code into machine code before execution. The compilation process improves performance but adds an additional step.
- Interpreted languages: These languages, like Python and JavaScript, are executed line-by-line by an interpreter. They are easier to debug and run but can be slower than compiled languages.
Statically typed VS dynamically typed languages
Programming languages can also be categorized based on how they handle variable types:
- Statically typed languages: These languages, like Java and C++, require variable types to be explicitly declared at compile time. Type checking is performed before execution, reducing runtime errors but requiring more upfront definition.
- Dynamically typed languages: These languages, like Python and JavaScript, determine variable types at runtime. They offer more flexibility and reduce the need for explicit type declarations but may lead to unexpected errors during execution.
Types of programming paradigms
Programming paradigms define different approaches to problem-solving in programming:
- Procedural programming: Focuses on a sequence of instructions and uses functions to break down tasks.
- Functional programming: Treats computation as the evaluation of mathematical functions and avoids changing state or mutable data.
- Object-oriented programming: Models real-world entities as objects that encapsulate data and behavior.
Alphabet VS syntax VS semantics VS lexis
These concepts are fundamental to understanding how programming languages are structured:
- Alphabet: The set of valid characters or symbols in a language, such as letters, digits, and operators.
- Syntax: The rules that define the correct structure and format of statements in a language.
- Semantics: The meaning behind syntactically correct statements or expressions.
- Lexis: The vocabulary of a language, including keywords and identifiers.
How to write names?
The following naming conventions are commonly used to improve readability and maintain consistency in programming:
- Camel case: Words are written without spaces, and each word after the first starts with an uppercase letter. Example:
camelCaseExample
. - Pascal case: Similar to camel case, but the first word also starts with an uppercase letter. Example:
PascalCaseExample
. - Snake case: Words are separated by underscores, with all letters typically in lowercase. Example:
snake_case_example
. - Kebab case: Words are separated by hyphens, often used in URLs or CSS class names. Example:
kebab-case-example
.
Programs VS processes
A program is a set of instructions written to perform a specific task, while a process is the execution of a program by the operating system, including its current state and resources. There can be multiple processes running from the same program simultaneously.
Absolute VS relative file paths
When working with files in programming, paths can be specified in two ways:
- Absolute path: This specifies the full path from the root directory to the target file. For example,
C:\Users\John\Documents\file.txt
(Windows) or/home/john/documents/file.txt
(Linux). - Relative path: This specifies the path relative to the current working directory. For example,
files/document.txt
refers to a file located in a folder namedfiles
within the current directory.
Time
In Unix systems, a timestamp represents the number of seconds that have passed since January 1, 1970, 00:00:00 (UTC). This starting point, known as the Unix epoch, marks the beginning of time measurement for Unix-based systems. The Unix epoch was selected as a practical and arbitrary reference. By using a continuous count of seconds, it streamlines time calculations and eliminates the challenges posed by calendar irregularities, such as leap years or months with varying numbers of days.
Important file extensions
In software development and configuration, certain file formats are widely used for storing and exchanging structured data. Three of the most common are .json
, .xml
, and .yaml
. Each has its own syntax and preferred use cases, often depending on readability, complexity, or tool compatibility.
JSON (.json) – JavaScript Object Notation is a lightweight format used to represent structured data, especially in web APIs and configurations.
{
"name": "John",
"age": 30,
"active": true
}
XML (.xml) – Extensible Markup Language is a verbose but flexible format often used in document storage, data exchange between systems, and Android development.
<user>
<name>John</name>
<age>30</age>
<active>true</active>
</user>
YAML (.yaml / .yml) – YAML Ain’t Markup Language is a human-readable format used primarily in configuration files, especially in tools like Docker, Kubernetes, and CI/CD systems.
name: John
age: 30
active: true
Important terms
- Lorem ipsum - a text consisting of Latin and quasi-Latin words, with roots in classical Latin, modeled on a fragment of Cicero's treatise "On the Limits of Good and Evil." The text is used to demonstrate typefaces (fonts). It was first used by an unknown printer in the 16th century.
- API - Application Programming Interface, a set of rules and protocols that allows different software applications to communicate with each other. It defines the methods and data formats that programs can use to request and exchange information.
- API key - a unique identifier used to authenticate and authorize access to an API, ensuring that only authorized users or systems can interact with it.
- URI - Uniform Resource Identifier, a general term used to identify a resource. A URI can locate a resource (URL), name it (URN), or do both.
- URL - Uniform Resource Locator, a specific type of URI that provides the address used to locate a resource on the Internet. It includes the protocol (HTTP, HTTPS), domain, and path.
- URN - Uniform Resource Name, a type of URI that names a resource uniquely without necessarily providing its location. For example, "urn:isbn:0451450523" uniquely identifies a book by its ISBN.
- Framework - a pre-built structure of code and tools that provides a foundation for developing software applications efficiently and consistently.
- ASCII table - a standardized character encoding system that assigns numeric values to letters, digits, punctuation marks, and control characters, allowing computers to represent text.
- Source code - the human-readable instructions written by programmers to create software, which can be open source (freely accessible and modifiable) or closed source (restricted and proprietary).
- CRUD - Create, Read, Update, Delete; the four basic operations that are the foundation for managing data in a database or an application.
- SaaS - Software as a Service, a cloud-based service where applications are hosted and maintained by a service provider, and users access the software over the internet, typically via a subscription model.
- CRM - Customer Relationship Management, a strategy and software system used by organizations to manage interactions with current and potential customers, track data, and improve customer relationships.
- EOF (End-Of-Line) - a character or sequence of characters that marks the end of a line of text.
- A command - an instruction given to a computer program to perform a specific task or operation.
- Bytecode - an intermediate representation of source code that is typically generated after compiling a high-level programming language. Bytecode is platform-independent, allowing it to be executed on different systems by a virtual machine or runtime environment.
- Machine code - the lowest-level representation of a program, consisting of binary instructions that a computer's processor can directly execute. Machine code is specific to the architecture of the processor and is the result of compiling or assembling high-level code into a form that the hardware understands.
- IDE - Integrated Development Environment, a software application that provides comprehensive tools and features for software development.
- Overflow - a condition that occurs when a calculation or data operation exceeds the maximum limit of storage capacity for a variable, memory space, or buffer. For example, adding 1 to the maximum value of a 32-bit signed integer (2,147,483,647) causes it to wrap around to -2,147,483,648.
I recommend also reading an article about networking basics.