Posts

Showing posts from July, 2025

Terminal

Terminal is an application to display text only information from CLI of Linux operating system. CLI has an advantage over GUI in the volume of data transmitted. Volume of data transferred over CLI is much less than transferring data for GUI.

Shell in Linux

Shell in Linux is an environment to run Linux commands and to execute scripts. There are several shells in Linux. Popular shells in Linux are Bash shell and Z shell. There are other shells in Linux, but I had never used these.

A script

A script file is file that can be executed to perform a series of operations. A script file simplifies execution of repetitive actions, make them more efficient and reliable.

root home folder in Linux

root folder in Linux has a name /root. It is a default folder for root user. By default it is a folder that a root user work in while that user first logs in into a system.

Case sensitivity of files in Linux

Unlike in Windows operating system files and folders in Linux operating system are case sensitive. Meaning that a folder named “Desktop” will be different from a folder named “desktop”.

Binary files

Binary files are non-human readable files. They contain information that is encoded in non-text format. Binary files can be executable files or data files. Binary files are more efficient for processing by a computer than text files. Binary files are smaller in size containing same volume of data as the files containing same data in text format.

Linux SQL database servers

Two of the popular Linux SQL databases are MySQL and Postgres. You can establish relationships with these. For example customer and customer purchases tables can be linked together to ensure that customer purchase record has corresponding customer record. Advantage of doing so is integrity of the data. Disadvantage of doing it is reduced performance to verify integrity of the data. If more and more records are created and volume of traffic increase than it is needed to get a faster machine. It is called vertical scaling.

Lighttpd web server

Lighttpd web server is another popular web server. It is released under FreeBSD license. It is optimized for speed.

Nginx web server

Nginx is one of the popular web servers. Nginx is owned by F5 Networks company. Nginx popularity is based on its speed. It is very lightweight web server and it is very popular because of it. Now days Nginx is owned by F5 Networks company.

Advanced version of Gemini achieves gold-medal at the International Mathematical Olympiad

Advanced version of Gemini achieves gold-medal at the International Mathematical Olympiad. News article

Chinese universities want students to use more AI, not less

Chinese universities want students to use more AI, not less. News article

Cyber attack grounded more then 100 Russia's Aeroflot flights

Cyber attack grounded more then 100  Russia's Aeroflot flights. News article

ChatGPT agent can pass through "I am not a robot" verification

ChatGPT agent can pass through "I am not a robot" verification Article

Running a program in Linux in a current folder

If an executable file is located in a current folder a user had switched to, then it is possible to specify ./ (dot slash) symbols to indicate current working directory

Linux distribution

Linux distribution is a set of software packages that work well together. Different Linux distributions have various support options. Some of the distributions are supported by a company and some are supported by individuals. Example of a company supported Linux distribution is RedHat Linux. Example of individually supported Linux distribution is Debian Linux. Why would someone select a company supported Linux vs. Linux supported by individuals. If there is a critical issue then company supported Linux distribution has backing from individuals who work there. It doesn’t mean that company supported Linux distribution will have bugs fixed earlier. Please do your own research of the timing of fixing issues.

Performance of Linux

Many people had found that performance of Linux is better than Windows. There are two reasons for that: Design of Linux - only certain services can be installed and enabled in a system that runs Linux. Linux can run without graphical user interface, and GUI can add to the overhead. Even so it is possible to have GUI in Linux, however many server installations run without GUI and use text only mode. I think that Microsoft used it as an example when they released Server Core. Similar to this Linux design is design of BSD environments, however I have limited experience of BSD systems. Many of the Linux systems are accessed remotely via SSH and graphical user interface is not needed for that.

ChatGPT gave instructions for pagan rituals

ChatGPT gave instructions for pagan rituals. News article.

Hackers almost slipped malicious code to Amazon’s Q Gihub repository

Hackers almost slipped a malicious code to Amazon’s GitHub repository. News article

Secure and insecure communications

It is possible to transmit information to and from a web server secretly or not. Secret communication by a web server is usually done via TCP port 443. For example email messages at Gmail are read via port 443. If anyone intercepts such a communication it will be just a garbage, you can securely type your username and a password to a website that establishes secure communication. Secure communication comes at a cost of increased processing resources. Encryption of a server communication requires additional processing resources. At the client side we don’t notice an increased CPU utilization. This is because we typically send and read one message at a time. However servers need to make these messages available to a lot of users. Servers handle a lot of messages and traffic. Encryption of it requires significant processing resources.

Servers vs. desktops

I want to point out that servers and desktop are used for different reasons. Desktops (and laptops) are designed for a personal use. A person may use a desktop publishing application, or a person may edit a music, a person can read email messages, or play a favorite video game. Servers on other end allow many users to connect to them. Servers maybe used to host websites, databases, or they can be used to send and receive emails messages. It is not a comprehensive list of things servers can do. It is just an example.

Services

Unlike applications services or daemons don’t have interactive interface. Example of it is a mail service. A person may interact with a message by reading it, replying to it, or deleting it, but there is no reason for a person to interact with a mail service. If an issue is found with a service it maybe logged to a file. It depends on implementation by a developer of such a service if errors will be written to a log file.

Refactoring code

Refactoring code means to make changes to it to make it better. Refactoring of the code can happen by two reasons: 1. A more optimal solution is found by a developer. 2. A new feature is added to a programming language to implement this functionality.

UK student jailed for selling phishing kits

UK student had been jailed for selling phishing kits that are used for fraud. Link to the article

AI is used to change movie ending to a happier one

AI (artificial intelligence) had been used to alter ending of a movie to a happier one. Link to the article We live in the world that uses AI more and more…

Stanford student sounded alarm for their education

Stanford students sounded alarm of their education saying that information that they received is not up to date. Link to the news article

Common Linux commands

I will list a few commonly used Linux commands: pwd - shows the path of current working directory. cd - change directory. It is possible to specify either full path to the cd command or a relative path. cd also takes a couple of special arguments. cd with two dots will move one directory up. cd with no arguments will change location to home folder, cd with dash will take a user one level up. ls command will list the files that are in current working directory. ls command has a few options. cat command will list the content of a file to a standard output. cp command will copy the files. cp command has a few options. mv command will move or rename a file. mkdir command will create a directory in a current working folder. rm command will delete a file or a folder. rm command has a few options. YouTube video

Commercial and community supported Linux distributions

Commercial versions of Linux have support of a company. This is what many companies want. Example of commercially supported Linux distributions are RedHat and Ubuntu. With RedHat it is possible to get a release of Linux that will be supported for a few years, such a release has software which is well tested. At the same time it is also possible to get a release of RedHat Linux that is supported for much shorter period of time, but it has newer software. It is also possible to get unsupported and free versions of Linux, if a company trusts packages, or has expertise in-house to support these, or can deal with issues until these are resolved by maintainers of that specific distribution. Example of free distribution of Linux are Debian and CentOS. Debian looks like Ubuntu, and CentOS looks like RedHat Linux. YouTube video

Introduction to Linux operating system

Linux kernel was developed by Linus Trovalds while he was at University of Helsinki. Linux operating system has mentality of being open source and free. Free does not mean that companies cannot charge. Good example of this is RedHat. Even so source code of RedHat Linux is available, and people can get it for free, people still need to pay for support. Support is optional, if there is skills and knowledge to support Linux installations, then a person may not need one. It is one thing to have a downtime of a personal computer at home, but it is another thing to have a downtime of a server at an enterprise. Today Linux had grown beyond just a kernel, it has a few major distributions, which have commercial support for them. Linux distributions have not just command line interface. Linux distributions have other software, they have several graphical user interfaces. https://distrowatch.com web site can be used to identify popularity of Linux distributions. YouTube video

Gemini had received gold-medal standard at the International Mathematical Olympiad

Gemini had received gold-medal standard at the International Mathematical Olympiad

Administrator of a major dark web forum had been arrested in Ukraine

Administrator of a major dark web forum had been arrested in Ukraine

White house had announced AI action plan

White house had announced AI action plan . We are entering a new era of innovation, at the same time it is scary of what type of impact artificial intelligence will have on people that work with computers: developers, security analysts, etc.

Chinese hackers try to steal nuclear secrets

Chinese hackers try to steal information about nuclear fusion. This information was reported by The Guardian.

Linux GUI vs. CLI

There are a few Graphical User Interfaces (GUI) for Linux. Popular GUIs are Gnome and KDE. There are other Graphical User Interfaces. Often experienced Linux users chose to use command line interface (CLI) instead of GUI because it can speed up activity. How can it speed up activity? Usually a person can type faster than a person can use a computer mouse. Bandwidth requirements are also a lot less when a text only data needs to be transmitted over a wire. System utilization is also much lower when a system is not using graphics. It is also not needed to invest money in graphics cards, but these money can be invested into better processors.

Linux command line

Lots of Linux installations are done without Graphical User Interface (GUI), but only with a text interface. There are four reasons for that: Graphical User Interface uses more processing resources. In order to make a system performing better a Graphical User Interface is not installed. Using CLI is faster than GUI. In GUI a person relies heavily on using a mouse to perform operations. In CLI an operator relies on typing commands in order to perform specific functions. Commonly used sequence of commands can be automated by specifying these commands in script files. Bandwidth requirements to transfer text only data is much less than transfer graphical data. Encrypting text only data is much easier than encrypting graphical data, due to lower volume of transferred data.

ChatGPT receives 2.5 billion requests a day

ChatGPT receives 2.5 billion requests a day. It is a lot. It shows that AI is used by a lot of people. It is possible just to learn from ChatGPT, but I don’t know how these requests were used. Link to the article - https://techcrunch.com/2025/07/21/chatgpt-users-send-2-5-billion-prompts-a-day/

At least 750 hospitals experienced disruption during Crowdstrike outage

Wired reported that Crowdstike software outage impacted hospitals. Hospitals treat people with serious health conditions and disruption in service means putting these people at risk. Link to the story - https://www.wired.com/story/at-least-750-us-hospitals-faced-disruptions-during-last-years-crowdstrike-outage-study-finds/

A weak password

It is believed that a weak password led to closure of 158 year old company. This company was hit by ransomware. Ransomware is a type of malware that makes data unusable if it is not deactivated. 700 people lost their jobs because of a single ransomware. It is important to have good IT security practices in case bad things happen. Link to story YouTube video

Phones distract us

Google's CEO said that phones distract us. It was reported in business insider. Young generation is more impacted than older people. Average attention span is only 47 seconds, decade ago it was 2.5 minutes. YouTube video

Ransomware is dangerous

Ransomware is dangerous. Ransomware is a type of malware that demands for a payment in return to be deactivated. In recent news 700 employees of 158 old company had lost their jobs because a payment was not made to ransomware owners. Payment to ransomware owners does not guarantee that ransomware will be deactivated. It is needed to have good IT security practices implemented to deal with ransomware attacks. YouTube video News article

Server's CPUs from Intel and AMD

Both Intel and AMD make their versions of server CPUs. Differences of server CPUs from desktop version of CPUs include the following: 1. Their performance is better for software operations. 2. They support greater amount of memory (RAM) and I/O operations. 3. Server CPUs are designed for 24/7 operations. 4. Server CPUs usually consume more power than their desktop counterparts. Due to greater power consumption, they require more efficient cooling. Usually servers are in the cold rooms. 5.Server CPUs usually cost more then desktop CPUs. YouTube video

Processors architerure

There are several processor architectures out there. Home user will either chose Intel's x86 compatible systems or processors, AMD processors which are compatible with Intel processors. For servers both Intel and AMD make their processors too.  IBM makes processors that are called Power processors. These processors are geared toward mainframe computers. For low power systems both Intel and AMD make their processors, additionally Broadcom makes low power CPUs that are used in Raspberry Pi systems.  YouTube video

Linux distributions

Linux distribution is a collection of software that works well with each other. By design Linux is free, but it is possible to add commercial components to it and charge for that Linux distribution. It is done this way by RedHat. CentOS Linux distribution takes their software and removes commercial components, therefore it makes Linux software free of charge. in case of RedHat Linux there is a company behind that product, in case of CentOS you are on your own. If there is a problem that you experience then hopefully somebody else reported this problem and a way to fix it on the Internet, or hopefully you have experience to fix it. YouTube video

How do companies charge money for Linux distributions?

The source code of Linux is free, then how companies exist and charge money for Linux. It is possible to charge money for a Linux distribution, however source code which is open source needs to be made free of charge. Also it is possible to charge money for the support contract. If there is a critical issue with their distribution, then there is a company behind that product and there are people that are able to resolve that issue. If a company is capable of resolving issues on it’s own, or they can implement workaround, or they can live with an issue: than support contract for Linux is optional. YouTube video

GPL license

GPL stands for General Public License. Code under GPL license needs to be made available. It doesn’t mean that a company cannot charge. Yes, it doesn’t make sense to charge for the code, since it is available and everyone can download it for free, however a company can charge for a support contract. Good example of that is Red Hat Linux. The code of Red Hat Linux is available, however a person that needs to receive support from that company needs to pay for support contract. It doesn’t make sense to pay for support contract for personal use, however companies may chose to pay for support contract. If there is an issue that needs to be addressed quickly, than there is a company behind that product, and there is a good chance that they will resolve this issue.

History of Linux operating system

Linux is Unix like operating system. There is no one distribution of Linux operating system, there are many different distributions each with its own flavor. Some are bleeding edge distributions and some are conservative. Linux distribution is a set of software packages. Linux was originally developed for personal computers running on x86 architecture. Majority of servers run on x86 architecture. Android and Chrome OS have Linux roots. Many of the server on the Internet are running Linux OS. Many of the embedded systems are also running Linux OS. It is possible to use Linux for many things. Personally Linux can be used to watch videos, play or create music, run software to create documents or spreadsheets. Businesses may use Linux to host their applications or web sites. Linux also found in embedded systems, game consoles, phones. Linux has philosophy of open source, many people can contribute to new development or fixing issues. Originally development of Linux started by Linus Torvald...

Source code

Source code is code written by a developer in programming language of choice. Source code is a raw code and not compiled code in any way.

Reading and understanding somebody else code

It is important for a developer to understand what somebody else code does. It is important for code review. If it is unclear for somebody else of what the code does, then the question can be asked of the developer of what that specific section of the code does. If it is unclear to another developer what that specific code does, than there may be a bug with that code, or implementation can be done differently and more understandable by others. Why code reviews by others is important? It will minimize chances of an error to slip through into production environment. Errors may still slip through to a production environment, even so the code had been reviewed by others, however the chances of an error will be minimized by doing so.

Incremental improvements

One of the ways to make a big change is to implement incremental improvements. Even so final result will not that what we want, but it will be better with each iteration. It will get closer to that what we want the final result to be.

ICMP protocol

ICMP stands for Internet Control Message Protocol. ICMP protocol is used to troubleshoot networking or connectivity issues. Utilities such as traceroute or ping will use ICMP protocol.

Randomness

Getting a random number maybe useful for a game, where events will not happen not in the same order. If they happen in the same order, then it will be one boring game. Random numbers are used in cryptography. If it is possible to guess a number for cryptography algorithm, then it will be a weak encryption algorithm. Often in programming it is possible to initialize random function, so it will not give the same results. YouTube video

Splitting code to procedures or functions

Even so same functionality can be obtained by implementing same code several times within main body of a program, it is probably not the best design. It is a good idea to put repeatable code in standalone procedures and to call those procedures instead of executing same code again and again. The difference between function and procedure, is that a function will return a value, but a procedure will not. Example of a function is a sum of two numbers, example of a procedure - printing something on a screen.

Arguments of a function

Arguments of a function are the values that need to be passed to that function. For example taking a square root of a number will give us a number which is squared will give us the original number. Square root without a number will represent a good mathematical concept, but it will not solve any mathematical problem.

Runlevels

There are 7 runlevels in a Linux. These runlevels determine how the system will start. Runlevel 0 is used for system shutdown. Runlevel 1 is a single user mode, with networking disabled. Runlevel 1 is used to troubleshoot issues. Runlevel 2 is a multiuser mode, however networking is disabled. Runlevel 3 is multiuser mode with no Graphical User Interface. GUI maybe useful for fancy graphics, however it may slow down the system, and may be not necessary for remote operations. Runlevel 4: Not defined. Runlevel 5: It is a multi user mode with Graphical User Interface enabled. Runlevel 6: It is used for reboot of the system.

Journaling filesystem

Journaling filesystem is a filesystem where all the changes to its content first written to a log file, and this write is made then actual change is made. It enhances data integrity and recovery of the content of the filesystem. It slows down operation, but it adds integrity to them. Most commonly known filesystem that support journaling is ext3 filesystem. ext3 is essentially ext2 filesystem with added journal.

Applications in Linux

Applications in Linux have familiar names to a Unix user, however implementation of these are different. Over the years these have been changed, so the performance of these had been improved.

Flowchart

A flowchart is a graphical representation of a program flow. A flowchart let a developer think about implementation details of a solution. A flowchart may help a developer to uncover options that developer did not think about. A flowchart can be helpful to others to explain what a program does without actually looking at the code. Not everyone is a technically savvy person, and a flowchart may help explaining logic of a program to those people.

Algorithm

Algorithm is a set of instructions that needs to be executed by a computer to solve a specific computer problem. Algorithm is not an implementation, but rather a way for a developer to think about how to solve a specific problem. An algorithm is a step before implementation, it allows a developer to think about specific implementation details. An algorithm is often accompanied by a flowchart. Algorithm represents a logic that needs to be implemented. An algorithm maybe complex, if a problem that a person wants to solve is complex, and an algorithm may be easy, if a problem is small. An algorithm could be efficient or not. An inefficient algorithm may indicate that approach that is taken to solve a specific problem can be improved. Inefficient algorithm may also indicate that a problem that  needs to be solved is very complex. YouTube video

__FILE__ PHP directive

__FILE__ PHP directive will contain system path of the file that is being executed plus filename of the file which is being executed. If need to know just folder names __DIR__ directive must be used.

__DIR__ PHP directive

__DIR__ PHP directive will contain system path of the file that is being executed. This directive will only show the path, if needed to know the full path including filename, then __FILE__ directive must be used.

Displaying PHP errors

To display or not display PHP errors it is possible to use display_errors directive in the. Full syntax of it is ini_set('display_errors,1) setting it to 0, will disable displaying errors. It is a good idea only to show errors in your development or QA environment, and hide errors in production environment. Users have no reason to see errors, errors can be exploited by a person with malicious intent.

CSS syntax

Each element in CSS file consists of three things: 1. Name of the objects. 2. Property name. 3. Property value. Name of the corresponds to HTML element. For example header. Property name is characteristic of that element. For example font. Property value is what is assigned to that element. Since I gave an example of font, property value is the font type to be used.  Property name and value will vary depending on the type of HTML element.

Declarative and procedural programming languages

HTML and CSS are examples of declarative programming languages.HTML is responsible for content and CSS is responsible for the look of that content. Even so it is possible to specify how each element is going to look like with HTML document itself, it is probably not as efficient from developer standpoint. Procedural programming languages are programming languages such as C, C# and so on.

A binary search tree

A binary search tree is a mathematical principle of sorting an information and get to it efficiently. Binary search tree consists of a node with two branches, one to the left and one to the right. Left branch will contain a number that is less than original number, and the right branch will contain a number that is larger than original. This principle can be used in computer software development.

Nested loop

Nested loops consist of two (or more) loops. A loop which is inside is called an inner loop and the loop which is outside is called an outer loop. One the example of using a nested loop is to count number of cells in a rectangle. One the loops will count cells that are horizontal and another one will be counting cells that are vertical. I know that this process is inefficient, there is more efficient way of doing it, but I hope that this example gives a good example of using a nested loop.

Declaring constants in PHP

Declaring a constant in PHP is done via define method. This method takes two arguments. First one is a name of a constant, and second one is a value of that constant. Name of the variable needs to be enclosed in quotes. Older way of declaring a constant is via using a keyword const in front of the variable that needs to be treated as a constant. A value of a constant cannot be changed at a later time. Constants add clarity to the code.

Data casting in PHP

Data casting in PHP means to take a data of one type and convert it to another. For example 3 represent a number. It is possible to represent this value as a string. In order to do so a desired data type, in this case string data type needs to be added in front of this value in parenthesis. A number 3 in this case will be converted to a string "3".

Data types in PHP

Basic data types in PHP are: integer, float, boolean, array, string and null. These data types can be used for basic programming. There are additional data types in PHP can be viewed on php.net web site.

Troubleshooting with var_dump in PHP

var_dump() function in PHP can be used for troubleshooting. var_dump() function can be used without any value. In this case this method will display a lot of system and environment information. If a variable is included in var_dump() method, then this function will provide information of what data type that variable is.

Multiple assignment in PHP

It is possible to assign the same value in PHP to more than one variable at the same time. It is done via assigning first variable to second one, second one to a third one and so on. Last variable in this list will be assigned to a value. All of the variables in this list will be assigned to the same value. It is called "multiple assignment".

Strict type of variables

Strict type of variables is a requirement of a programming language to specify a type of a variable at variable initialization time. For example C is a strict type programming language.

Loose type of variables

Loose type of variables is a programming language technique to determine type of a variable by that variable content. For example PHP is a loose type language. Opposite of loose type is strict type.

Pascal casing

Pascal casing is a technique is to capitalize first letter of each word while naming variable names. For example $CarSpeed with capital letters C and S is an example of Pascal casing.

Snake casing

"Snake casing" is a name used for variables, when words in a variable name is separated by underscore character,

Camel casing

A common technique to name variables is to capitalize the first letter of a word. The first word will stay lowercased. For example: $currentCarSpeed is an example of that. The first word current in this variable name is lowercased, however first letter of each new word is capitalized. This technique adds clarity to variables. This technique is know as camel casing.

Prohibited characters in variable names in PHP

There are some characters that can not be used in PHP for variables naming. For example dash (-) symbol cannot be used in a variable name, please consider replacing a dash symbol with an underscore. Variables cannot start with a number, even so they can contain one.

Case sensitivity in PHP

PHP is a case sensitive language, for example two variable with the same name, but with different casing are different.

Declaring vs. defining a variable

Declaring a variable is to first time initializing it. Defining a variable means to assign a value to it.

Finishing code in PHP with semicolon

Finishing piece of code in PHP is done by putting a semicolon. Some sections of code in PHP do not require semicolons. For example loops or if statements do not require semicolons, because these are not executable code, but code flow logic.

JSON format

JSON allows for efficient data exchange. JSON data is human readable. JSON stands for JavaScript Object Notation. JSON format is well known and widely used. Alternatives to JSON format are XML format, and sending data in binary. Disadvantage of XML format, that such data is larger in size, binary data even so it is small in size, however it is difficult to understand and it is not flexible. JSON data easily can be modified.

Special symbols in programming

Some of the characters in a computer cannot by typed, or if typed they may have a different meaning. Three of the commonly used symbols that can be represented by escape sequence are: \n - new line \r - carriage return, or return cursor to the beginning \t - tab

Listing files in Linux

It possible to list files and folders in a command line interface (CLI) in Linux (or BSD, or Mac) using ls command. ls command has a number of command options. I will not list these here, you can lookup help for this command using --help option. ls stands for list. There are two special directories: . (single dot) represents current directory. .. (two dots) represent parent directory.

Dynamic binding

It is possible to do static binding, when a specific object is tied to a specific class, however it is also possible to perform dynamic binding. Dynamic binging is a binding to a class that depends on a value of a variable. For example a pet can be a dog or a cat depending on what owners got.

Class inheritance in PHP

Classes in PHP can inherit properties or methods of another class. When a new class is created, then a new class may use extends keyword to specify what is underlying class a new class is based on. This will do two things: 1. Minimize errors while developing a new functionality by utilizing functionality that exists in a parent class. 2. Reduce or completely remove duplicate functionality.