Tag Archives: programming

The program is roughly divided into three stages.


[Stage 1] Specification decision stage

 The first step is to define what to program. If this is not well thought out, even if a code change occurs in one place, the other code may have to be rewritten, and eventually all may be rewritten.

[Stage 2] Coding stage

 The stage of writing code according to the specifications. It is also a stage where many programmer qualities are asked. In other words, whether or not a program that performs the same operation is not redundant and it is thought that bugs can be easily found depends greatly on the ability of the programmer.

[Stage 3] Quality confirmation and maintenance stage

 Confirmation of the operation of the completed program and the correction stage accompanying specification changes. Even program development is the most difficult stage. It’s a patience and time-consuming task that needs to prove that the program works correctly under all conditions and doesn’t crash or break the system, so it tries every possible input.

High level language

 A programming language closer to natural language or a programming language that easily expresses human thought is called a high-level language. For example, it is a programming language that can describe almost English, or a programming language that can describe mathematical expressions. The high- level language cannot be executed by the CPU as it is. It is converted into machine language using a compiler, and the CPU executes it. Alternatively, there is a method of interpreting and executing a high-level language using an interpreter without performing the conversion.

Assembly language

  Assembly language is a programming language that describes machine language instructions in a way that is easy for humans to understand (close to English). One line of the program written in assembly language corresponds roughly to one instruction of the opportunity program. A word representing a machine language instruction (integer) is called a mnemonic. The mnemonic depends on the CPU and the assembly language used. For example, the second mock of a machine language instruction to move data is “MOV” (The word “move” from English).

 Since assembly language is not a machine language, a CPU cannot execute a program written in assembly language. A program written in assembly language is converted into a machine language program by an assembler, and the obtained machine language program is executed.

 In assembly language, you can specify each action that the CPU performs. Therefore, it is suitable for creating a program for finely controlling the input / output device.

Machine language

 The only programming language that can be interpreted and executed by the CPU is machine language. A machine language program is a sequence of instructions that represent the operation of one unit of the CPU. Each instruction is represented by an integer for easy and high-speed interpretation / execution by the CPU. When a machine language program is stored in the main storage device (ROM or RAM) in advance and the start address is given to the program counter (: A storage device in the CPU that holds the address where the next instruction to be executed by the CPU is stored), the CPU fetches instructions one by one from the main storage device and executes them.

Types of programming languages

monitor-933392_1920.jpg Since the programming language is artificial, various programming languages ​​can be created according to the application. Many programming languages ​​have been created so far, and some of them are programming languages ​​whose main purpose is to be understood by computers (distant from natural languages) and vice versa. There are languages. Roughly classifying program languages ​​according to how similar to natural language, there are three types: machine language, assembly language, and high-level language.

Language grammar


 In order to communicate using words, it is necessary for the speaker and listener to have common rules about words, and to speak based on those rules and to speak. Otherwise, the listener will not understand what the speaker says. This common rule is called language grammar.

 For example, English has a basic five-sentence rule. In principle, English follows this rule. Words that do not follow this rule have no meaning as part of English, and the meaning is not conveyed to the listener.

 The programming language has the same grammar as the natural language. When a human describes a program according to the grammar and gives the program to the computer, the computer understands the program according to the same grammar and performs the described operation.

 Just as the Japanese and English grammars are different, each different programming language has its own grammar.

Difference between a program and software


 The difference between a program and software is that the software is all the intellectual information related to the computer, whereas the program is limited to a representation of the operation procedure of the computer. That is, the program is included in the software. In general, in the case of software, a program representing an operation procedure and data used during the execution of the program are often collectively referred to. For example, the word processor software includes font data as well as programs.

Programming and programming languages


 To make a computer do something meaningful, it is necessary to teach the computer the procedure of the operation. Unfortunately, today’s computers can’t fully understand human language. Therefore, it is not possible to teach the computer the procedure in the language (natural language) that we usually use, such as Japanese and English.

 Therefore, instead of using a natural language, a simple language that can be understood by a computer is artificially created, and an operation procedure is expressed as a language and transmitted to the computer. This artificial language is called a programming language, and a program that expresses an operation procedure as a language of a programming language is called a program. The computer given the program operates according to the described procedure.

When a computer is operated by a program, it is the CPU that actually understands the contents of the program inside the computer and operates accordingly. The CPU is operating according to the contents described as a program. The CPU operates the entire computer by performing calculations according to the contents described as programs and controlling the input/output devices and storage devices.

What is a programming language?


A programming language is an artificial language created to describe a program, and its role is to convey the operating procedure to the computer. 

 Therefore, the programming language is made easy to understand for the computer. The statement is different from natural language. 

 For example, if the meaning of displaying “Hello, world” on the display is described in natural language and programming language, it becomes as follows.

 Natural language statement: 「Displays『Hello, world』on the display」

 Programming language statement: 「printf (“Hello, world”);」

This example is an example described in a programming language called C language, but there are many types of programming languages, and the writing method differs depending on each language.

A program is a program in which sentences in such a programming language are arranged in the order in which they are executed by a computer. The program is a natural language statement.

What is a programming language?


Calling in one programming language can be written in another programming language. But some programming languages are not good at it, and one programming language can be very complicated in writing, but it can be quite easy in another programming language. In addition, there are various writing styles, styles and techniques in programming languages, and each has their own strengths and weaknesses. Today’s popular programming languages and their simple features are as follows.

Machine language (machine language)
The only programming language that computers directly understand. As it is difficult and difficult to learn, it is common to translate (compile) objects programmed using C language etc. into machine language.

C language
It is fast and works on most computers. A universal language used from game programming to OS description. However, since the design is old, when writing complicated programs, it is inferior to other languages ​​such as C ++.

C ++
A programming language that extends object language based on C language. Program reusability is higher than C language alone and cooperation is very high. However, many disadvantages of C are dragged as they are, so they are still for advanced users. Many applications for Windows and game software are written in C ++.

C #
A language in which Microsoft has improved its shortcomings based on C ++. It is very descriptive and easy to maintain, but it has the disadvantage that its usable environment is limited. Recently, it has been widely used for game programming.

A general-purpose programming language that covers small terminals managed by Sun Microsystems and large servers. They specialize in programming for web services and mobile devices. Now that Oracle has acquired Sun Microsystems, Oracle owns. Apps for Android devices can only be developed with Java.

Objective – C
A derivative form different from C ++ that incorporates objective orientation based on the C language. It is strongly influenced by the language Smalltalk. It did not see the lift of day for a long time, but in the hit of the iphone, it was in the spotlight. Objective – C is used when developing apps for Mac and iOS.

Obejective-C is highly efficient in programming development, but it was developed by Apple to eliminate the drawback of being slower than C ++. A programming language just announced in 2014. Development for iOS is going to move to this in the future.

Pure function language. It has a number of very unique features. In some cases, parts of a web service may be implemented in Haskell.

Script language dedicated to Web service description. Anyway, while it is easy to write Web services, it has the disadvantage that programming is likely to be complicated. It is widely used all over the world, but the famous one is Facebook.

General-purpose script language developed by Japanese Yukihiro Matsumoto. A big break with the framework “Ruby on Rails” developed by David Haymail Hanson of 37 signals, a Dutch venture company. Ruby programmers talked about getting the highest pay in Silicon Valley. It is used by many web services including Twitter.

It was originally a simple scripting language for Unix, but it was diversified at the beginning of the Web as a programming language for describing Web services. There are still strong users, and they are active in web services with a rush.

One of the oldest programming languages ​​in the world. It is a language specialized in scientific computing and is good at handling mathematical formulas. The name comes from converting the formula (Fourmula) into a programming language (Translator). Developed by IBM, it is still used to program supercomputers. A language that strongly influenced C language.

The old programming language next to FORTRAN. The name comes from the List Processor, a language that specializes in dealing with the soul of data called “lists”. Developed by Professor John McCarthy of the Massachusetts Institute of Technology (MIT). It is characterized by extremely flexible programming, and there are still many enthusiasts. The idea of ​​functional language was also born in LISP. JavaScript, Ruby, etc. are languages ​​that were born under the influence of LISP.

The name is derived from COMMon Business Oriented Language, which stands for Common Document Processing Language, and is a programming language developed under the direction of the US Department of Defense. It may be used for the bank’s backbone system.

A programming language developed by Alan Kay who was at the Palo Alto Research Center in Zerox. This programming language is the first programming language that incorporates the concept of “differential programming,” in which components that are almost complete are prepared, and that only the necessary functions are written out, rather than programming from scratch. Called, and inspired many later programming languages. In particular, Objective-C is often mentioned because it adds the Smalltalk object-oriented functionality to C.

Hyper Text Markup Language is used to describe Web pages. It is called to mark up the text with a symbol called “tag”. Web browsers interpret only HTML. JavaScript is embedded as a tag in HTMl.

Stands for Cascading Styling, which determines the look of a web page. A language used as part of HTML.

Stands for Standard Query Language, which is used to interact with the database. This language is frequently used when creating web services.

OpenGL stands for Shading Language. This language is used when using graphic chips (GPU) directly in game software and graphic software. Recently, it is sometimes used for GPU computing to solve general problems with GLSL as well as graphics.

In this way, programming languages have a history of evolving as they interact with each other and seek out areas of expertise.

Learning a new programming language is the same as learning new ideas. And since programming languages are very easy to learn, unlike natural language foreign languages like English and French, programmers are usually learning multiple languages.