Programming Languages#

Midjourney: Skyscraper City Code Rain, ref. Matrix Code Rain

There are only two kinds of programming languages: the ones people complain about and the ones nobody uses.

— Bjarne Stroustrup (creator of C++)

Slides/PDF#

Generations of Programming Languages#

  1. Generation - At first, computers were programmed directly in binary machine code that a processor could execute directly, but it could usually understand only a single processor type.

      1101 0000 0000 0111 1011
      1011 1111 1110 1000 1010
      1101 0010 0000 0111 1111
    
  1. Generationassembly languages use machine instructions (ADD, MOV, …) for a specific processor type. The instructions are translated into machine code with the help of an assembler.

      CLO
      MOV AL, 2      ; copies 2 into register AL
      ADD AL, 3      ; adds 3 to register AL
      END
    
  1. Generation - High-level programming languages are human-readable and closer to natural language. A compiler translates the code into machine code.

  while i < 20:
      x = x + i * i
      if x > 100:
          i = i + 3

Python#

Python has gained popularity in recent years, although it is older than Java, C#, and JavaScript. Its popularity stems, on the one hand, from the language being designed with a strong emphasis on readability and simplicity, which makes it very easy to learn. Moreover, due to its age there are now many libraries, and for almost every problem there is an existing solution. As a result, Python is also highly versatile.

Quiz#

--- shuffleQuestions: true shuffleAnswers: true --- ### What is a programming language? - [x] A formal language for creating programs - [ ] A special hardware component - [ ] A visual representation of data - [ ] A file format for word processing ### Which features define a programming language? - [x] Character set - [x] Syntax - [x] Semantics - [ ] Color scheme ### What characterizes first-generation programming languages? - [x] Binary-encoded machine code - [ ] Use of high-level languages like Python - [ ] Direct human-to-human communication - [ ] Use of HTML ### What characterizes assembly languages? - [ ] They are independent of the hardware architecture - [x] They must be translated into machine code - [ ] They are interpreted directly by the browser - [ ] They are a form of natural language ### What characterizes third-generation programming languages? - [x] They are human-readable and closer to natural language - [ ] They do not require translation into machine code - [x] They use compilers or interpreters for translation - [ ] They consist only of zeros and ones ### Why do new programming languages emerge? - [x] Because of new requirements in software development - [ ] Because old languages no longer work - [ ] To display graphics better - [ ] For controlling monitors ### Which factors influence the popularity of a programming language? - [x] Community support - [x] Application areas - [x] Tools and frameworks - [ ] The color of the logo