Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artainmo/general-programming

Notes from studying and small projects surrounding general-programming.
https://github.com/artainmo/general-programming

assembly bits c clean-code cpp ide ocaml operating-systems os python rust self-learning shell study team vim

Last synced: 11 days ago
JSON representation

Notes from studying and small projects surrounding general-programming.

Awesome Lists containing this project

README

        

# general-programming

Programming consists of giving instructions via written code to an operating system. Those instructions usually manage data, define screen display or audio.

An operating system (OS) is the software that manages computer hardware and software resources, providing common services for computer programs. It acts as an intermediary between users and the computer hardware, enabling users to run applications, manage files, and control hardware.

Personal computers usually have as operating systems macOS (from Apple), Windows (from Windowns), or Linux (open-source). Different operating systems demand you to interact differently with them, even code differently to some extent, usually the one we are familiar with we prefer. Mobile operating systems are Android (from Samsung) and iOS (from Apple). Other operating systems also exist, such as for embedded systems, servers, networks.

Operating systems are essential for running computers and devices, managing resources, and providing user interfaces.

When programming we usually start by interacting with a terminal and shell. A terminal is an interface that allows you to interact with the computer by entering commands. A shell is a program that interprets and executes the commands you type by acting as a command-line interface (CLI) between the user and the operating system. They work together, you open a terminal to interact with the shell. They allow you to navigate between folders, create folders, create the files in which you will code, and [a lot more](https://github.com/artainmo/general-programming/tree/main/shell).

In the end we need to code in files. For this we use specialized [text editors](https://github.com/artainmo/general-programming/tree/main/text-editors).

Bits and bytes are fundamental units of data in computing. A bit (short for "binary digit") is the smallest unit of data in a computer. Bits represent two possible states, often thought of as "off" (0) and "on" (1). They form the basis for all digital data, including text, images, and audio. A byte consists of 8 bits. It is a standard unit of data that can represent 256 different values (from 0 to 255). Bytes are used to encode characters in text (such as in ASCII), because a char data type is one byte long, and to represent larger numerical values. Larger data types, like integers or floating-point numbers, are represented using multiple bytes. For example, a standard 32-bit integer uses 4 bytes.

Larger data quantities are often measured in multiples of bytes, Kilobyte (KB)(1,024 bytes or 2^10 bytes), Megabyte (MB)(1,024 KB or 2^20 bytes), Gigabyte (GB)(1,024 MB or 2^30 bytes), Terabyte (TB)(1,024 GB or 2^40 bytes).

When multiple bits are grouped together, they can represent larger values by using binary numbers, which is a base-2 numbering system. In binary, each bit can have one of two values, 0 or 1. The position of each bit determines its contribution to the total value. Each bit in a binary number represents an increasing power of 2, starting from the rightmost bit (the least significant bit) to the leftmost bit (the most significant bit). The formula for calculating the value of a binary number is, "value = bn 2n + bn-1 2n-1 + ... + b1 21 + b0 20", Where each 'b' represents a bit that is either 0 or 1, and 'n' is the position of the bit, starting from 0. For example the binary number '1011' equals "8+0+2+1=11".

One step above machine code (binary), we have [assembly](https://github.com/artainmo/general-programming/tree/main/languages/assembly). Assembly is the lowest-level language someone can program in. Usually, higher-level languages are used instead, but assembly is still crucial in certain domains. Such as in security to analyze malicious code or vulnerabilities at the machine level, or when reverse engineering. Like with all low-level languages, assembly can be useful when wanting direct control of the hardware to improve performance of processing time or resource management. In embedded systems even small optimizations can have significant impact. Also, learning assembly helps programmers understand how computers execute programs at the most fundamental level. Operating systems are often written in C/C++ but for certain critical functions assembly is still needed.

Next, [C](https://github.com/artainmo/general-programming/tree/main/languages/c) is one step above assembly, and [python](https://github.com/artainmo/general-programming/tree/main/languages/python) one step above C. The higher level a language, the easier it is to write but the less performance potential it has.

## The future of programming
In the future, as most code is already written or will be generated, being able to [setup services together](https://github.com/artainmo/DevOps) will become most important.