What revolutionary computer novelty did the manufacturer prepare for release? SPACE LUMINA
We are witnessing the advent of a new computer era, the era of the so-called wearable technology. There is a super-miniaturization of computer devices. At the same time, the list…

Continue reading →

The computer is very noisy
PC noise often interferes with collecting thoughts, annoying - especially in the absence of other sources of noise. To the credit of PC manufacturers, it should be noted that the…

Continue reading →

What is a "computer generation"? Generation 1: Tube
In our era of multiprocessing and distributed computing, the once seemingly important division of computers into generations has already been forgotten a little. The first generation is tube computers, the…

Continue reading →

Can I start programming in 5 minutes? Is quite real

The topic of programming lessons has been raised more than once, but many of these materials are either too complicated for beginners or require additional preparation and installation of various (often expensive and time-consuming) software packages. Is it possible to do without all this? Can!

We will try to get by with a minimum of additional information, so that in 5 minutes our first program will work. So let’s get started. Introduction According to the encyclopedia, a computer program is a sequence of instructions for a computer. A programming language is a formalized way of writing computer programs. It is important to note that the computer itself does not need a “human” language; it copes well with machine codes in binary format. These codes are simple instructions like: “Take the number at address 100, add the number at address 101, put the result in cell 102”.

The first computers were programmed in this way, but for a person this method turned out to be extremely inconvenient, and already in the 50s of the last century programming languages ​​appeared that made it possible to record commands in a format that people understood. Any program consists of at least two components: Source code written in a programming language. A translator program that converts code into a sequence of actions performed by a computer. To create and debug programs, there are large and complex programming environments that occupy up to several gigabytes on the hard drive, but we will not need any of them. Moreover, we do not need anything at all – to write the simplest program, the tools that are available in the Windows operating system are enough. The browser included in the system has the ability to run Javascript programs, which we use. The advantage of Javascript is that it has a modern syntax that practically coincides with the C language, modern C ++ and C # languages. First program Since we use a browser, the program must be stored as an HTML file. Open the notepad and create the file as shown in the first screenshot. As you can see, the text is an HTML file, the program code of interest to us is located inside the angle brackets with the name “script”. Save the file as 01.html. The first program is ready! It is enough to open the “Explorer”, find the created file and launch it by double-clicking. A browser will open in which the results of the program will be displayed, namely the text Hello world (see the second screenshot). Variable declarations Obviously, a program must do something, for example, process and display various data. To store them, we can declare variables inside our program. Consider the example in screenshot No. 3. It is unlikely that this code needs comments. We created the variable R, assigning it a value of 10, and calculated the circumference using the well-known formula. Note the use of the “+” operator in output, which allows you to combine lines into one.

Loops A program, like the one written above, runs linearly, from operator to operator. However, it is often necessary to repeat a code fragment a certain number of times, for this there is a for loop. For an example, we will display a table of squares and cubes of numbers from 1 to 10. The code and the results of its execution are shown in screenshots Nos. 4 and 5. The inner part of the code, separated by curly brackets, will be executed the required number of times, determined by the condition of the cycle. The result of the work is shown in screenshot No. 6. The BR tag is used in HTML for line feeds, which allows you to split the table into lines. Conditions It is often necessary for code to execute under certain conditions. For example, consider the simplest “magic square” – this is a 3 × 3 square, the sum of numbers in which is the same across all lines and diagonals. We derive such squares using a computer, for this we need cycles and the condition for comparing equality. As in the previous case, the code and the results of execution can be seen in the screenshots. In Javascript, as in C or C ++, the == operator is used to calculate equality, the additional condition that the sum is greater than 12 is also checked (since there are 9 in the diagonal of the square and at least 2 more, the sum cannot be less than this value). To run this program, the computer will have to “think” for a few minutes, because to search for all the options you need to sort out 999999999 values, which is ensured by nine nested cycles. However, it is on such tasks that the main advantages of a computer over the human brain are manifested – the ability to quickly process information. Although it should be noted that the found “square” (in the screenshot No. 7 circled in red) was known in China under the name “Luo Shu” even before our era, so that ancient people were not born too … You can also note the use of the variable count to count found squares, as soon as the square is found, we increase the value of the variable by one.

How to replace a computer mouse? The future is now!
While corporations are creating the future, I will offer a fairly simple “innovative” solution that helps with computer work. All that is needed is to replace the mouse-type manipulator with…

...

How to choose a laptop? Specifications, keyboard and battery
The operating system and screen size are not the only important parameters of the laptop. Its ability to process data is linked to the characteristics of components, autonomy largely depends…

...

The motherboard and its role in personal computers
One of the most important components of your computer is the motherboard. However, her name speaks for itself. After all, it depends on it what equipment you can install on…

...

How does a person control a computer? Present and future
What devices do we use to control computers with? At first there were the tumblers, then the electric typewriters. The technique developed, color video monitors appeared, various new devices appeared…

...