Lekcja 7. Computer programming

10 marca 2016
1 gwiadka2 gwiazdki3 gwiazdki4 gwiazdki5 gwiazdek

Obejrzyj poniższy film. Nie przejmuj się, jeśli nie wszystko w nim zrozumiesz. Najważniejsze jest to, aby obejrzeć go przed przeczytaniem tekstu.

Odpowiedz na poniższe pytania.

  1. What is one way to approach the question of what is a programming paradigm?
  2. What is procedural code?
  3. What is the relation between state and actions on it in procedural programming?
  4. What is the relation between state and actions on it in object-oriented programming?
  5. What properties do statements have in functional programming?
  6. What does it mean that state is immutable in functional programming?
  7. What can functions return in functional programming?
  8. Is one line of code enough to understand the paradigm used?
  9. What does paradigm describe?
  10. What geometric figure is used by the author to explain the different paradigms?
  11. Is class-oriented programming the opposite of functional programming?
  12. What other concept does the author use to explain the relations between different paradigms?
  13. What types of code comprise any nontrivial application?
  14. What is wrong with mixing different paradigms in one code base?

Computer programming basics

Computer programming (coding) is the craft of translating computing problems into reliable, robust, useful, portable, maintainable, and efficient source code, which can be interpreted or compiled into an executable program by a computing system or compiler to perform a meaningful task.

Source code is written in one of many programming languages using a style often referred to as a programming paradigm which serves as a way of building the structure and elements of computer programs. Common programming paradigms are imperative programming, declarative programming, functional programming, object-oriented programming, procedural programming, logic programming and symbolic programming.

Using markup languages (such as HTML) is generally not considered "programming." Nevertheless, many markup languages allow inclusion of scripts, e.g. many HTML documents contain JavaScript.

Computer programming is one part of a much larger discipline known as software engineering, which includes several different aspects of making software including design, construction and quality control. Other activities involved in the process of programming include analysis, generating algorithms, verification of requirements of algorithms including their correctness and resources consumption, testing, debugging, and implementation of algorithms in a target programming language.

A special type of programming that is considered one of the most difficult styles of programming is concurrent programming, a technique that provides for the execution of operations concurrently — either within a single computer, or across a number of systems. In the latter case, the term distributed computing is used. Multiprocessor machines achieve better performance by taking advantage of this kind of programming.

Concurrent computing is related to but distinct from parallel computing. In parallel programming, single tasks are split into a number of subtasks that can be computed relatively independently and then aggregated to form a single coherent solution. Parallel programming is most effective for tasks that can be easily broken down into independent tasks such as purely mathematical problems, e.g., factorisation. By contrast, concurrent computing consists of process lifetimes overlapping, but execution need not happen at the same instant.

Vocabulary

achieve
osiągać
activities involved in the process of programming
czynności składające się na proces programowania
algorithm
algorytm
analysis
analiza
aspect
aspekt
by contrast
natomiast
coding
pisanie kodu (źródłowego), kodowanie
coherent solution
spójne rozwiązanie
compiler
kompilator
computer program
program komputerowy
computer programming
programowanie komputerowe
concurrent computing
programowanie współbieżne
construction
budowa, konstrukcja
correctness
poprawność
debugging
usuwanie błędów, diagnozowanie, debugowanie
declarative
programming programowanie deklaracyjne
design
projekt
distributed
computing obliczenia rozproszone
efficient
wydajny
executable program
program wykonywalny
execution of operations
wykonywanie działań, wykonywanie operacji
factorisation
rozkład na czynniki
functional programming
programowanie funkcyjne
HTML document
dokument HTML
imperative programming
programowanie imperatywne
implementation
implementacja
in the latter case
w drugim przypadku
independently
niezależnie
is generally not considered…
zasadniczo nie jest uważany za…
kind
rodzaj
lifetime
okres istnienia
logic programming
programowanie logiczne
maintainable
łatwy w obsłudze serwisowej, łatwy w zarządzaniu
markup language
język znacznikowy
meaningful
istotny, sensowny, znaczący
multiprocessor machine
komputer wieloprocesorowy
need not
nie musi
nevertheless
niemniej, jednakże
object-oriented programming
programowanie obiektowe
one of many
jeden z wielu
one part of sth
jedna część czegoś
parallel programming
programowanie równoległe
performance
sprawność, wydajność
portable
przenośny
procedural programming
programowanie proceduralne
programming paradigm
paradygmat programowania
purely mathematical problem
problem czysto matematyczny
quality control
kontrola jakości
related to but distinct from
powiązany z, ale odrębny od
reliable
niezawodny
resources consumption
zużycie zasobów
robust
solidny, niezawodny
script
skrypt
software engineering
inżynieria oprogramowania
source code
kod źródłowy
subtask
podzadanie
such as
taki jak
symbolic programming
programowanie symboliczne
target language
język docelowy
testing
testowanie
the craft of…
sztuka…
to aggregate
gromadzić, zbierać, łączyć
to be considered…
być uważanym za…
to break sth down into
podzielić coś na…
to compile sth into…
skompilować coś do postaci…
to happen at the same instant
wydarzyć się w tym samym momencie
to interpret
interpretować
to overlap
nakładać się, częściowo się pokrywać
to perform a task
wykonać zadanie
to provide for
uwzględnić, przewidzieć
to serve as a way of + ing
służyć do…
to split
podzielić
to take advantage of sth
wykorzystać coś
useful
przydatny
verification of requirements
weryfikacja wymagań
within
w, wewnątrz

Exercises

Exercise 1. Match the words in column A with their partners in column B.

computerdistinct from
sourceinstant
executablemachine
programmingcode
HTMLcontrol
softwarecomputing
qualitysolution
distributedengineering
multiprocessorlanguage
coherentprogramming
at the sameprogram
related to butdocument

Exercise 2. Answer the following questions.

  1. What is computer programming?
  2. What is source code?
  3. What is programming paradigm?
  4. What common programming paradigms do you know?
  5. Is using markup languages generally considered programming?
  6. What is software engineering?
  7. What activities are involved in the process of programming?
  8. What is concurrent programming?
  9. What is parallel programming?
  10. What is the difference between concurrent programming and parallel programming?

Exercise 3. Write sentences using the expression „the craft of” as in the example.

reliable source code -> Coding is the craft of translating computing problems into reliable source code.

  1. robust source code
  2. useful source code
  3. portable source code
  4. maintainable source code
  5. efficient source code
  6. correct source code
  7. meaningful source code
  8. testable source code
  9. flexible source code
  10. legible source code
  11. secure source code
  12. stable source code

Exercise 4. Kiedyś Jeremy Keith był łaskaw podzielić się ze światem następującą myślą: „In Fact, Java is to JavaScript as ham is to hamster”. Wymyśl podobne porównania po angielsku lub po polsku i podziel się nimi w komentarzu na dole strony.

Exercise 5. Translate the sentences into English as in the example.

Jednym z etapów procesu programowania jest projektowanie programu. -> One of activities involved in the process of programming is the designing of the program.

  1. Jednym z etapów procesu programowania jest analiza algorytmów.
  2. Jednym z etapów procesu programowania jest weryfikacja wymagań.
  3. Jednym z etapów procesu programowania jest budowanie algorytmów.
  4. Jednym z etapów procesu programowania jest sprawdzanie poprawności algorytmów.
  5. Jednym z etapów procesu programowania jest weryfikacja zużycia zasobów przez algorytmy.
  6. Jednym z etapów procesu programowania jest testowanie kodu.
  7. Jednym z etapów procesu programowania jest debugowanie kodu.
  8. Jednym z etapów procesu programowania jest implementowanie algorytmów w docelowym języku.
  9. Jednym z etapów procesu programowania jest kontrola jakości programu.
  10. Jednym z etapów procesu programowania jest sprawdzanie poziomu zużycia zasobów.

Exercise 6. Write sentences as in the example using the expressions provided below.

concurrent execution, efficient algorithms, parallel execution, efficient data structures, efficient implementations of algorithms, efficient implementations of data structures, efficient compiler, efficient interpreter, low-level instructions, more efficient instructions

Better performance of a program can be achieved by using concurrent execution.

Exercise 7. Transform and write the sentences from exercise 6 as in the example.

Better performance of a program can be achieved by using concurrent execution. ->Computers achieve better performance by taking advantage of concurrent execution.

Exercise 8. Transform and write the sentences from exercise 6 as in the example.

Better performance of a program can be achieved by using concurrent execution. -> Concurrent execution can be used to improve the performance of a program.

Exercise 9. Do the exercises 6, 7, and 8 orally. Repeat until you can say the sentences looking only at the list of expressions provided in exercise 6.

Exercise 10. Write sentences about programming paradigms following the example.

object-oriented paradigm -> A programmer need not use the object-oriented paradigm all the time. -> A programmer doesn’t need to use the object-oriented paradigm all the time.

  1. imperative programming
  2. declarative programming
  3. functional programming
  4. procedural programming
  5. logic programming
  6. symbolic programming

Exercise 11. Repeat the exercise 10 orally.

Exercise 12. Read the text and complete the sentences.

  1. Parallel programming is a technique that…
  2. Concurrent programming is a technique that…
  3. Parallel programming is most effective for tasks that…
  4. In parallel programming, single tasks are…
  5. The term distributed computing is used to describe…
  6. Parallel computing is related to but…
  7. Multiprocessor machines achieve better performance by…
  8. Parallel subtasks can be…
  9. Parallel subtasks are then…
  10. Factorisation is a…

Exercise 13. Change the following adjectives into nouns as in the example. Can you translate them into Polish?

portable -> portability

  1. maintainable
  2. testable
  3. flexible
  4. legible
  5. stable
  6. computable
  7. suitable
  8. applicable
  9. acceptable
  10. valuable
  11. sustainable
  12. available
  13. usable
  14. addressable

Exercise 14. Oral drill. Change the word "use" in the sentences into the expression "take advantage of".

  1. Computer programmer can use object-oriented techniques.
  2. Computer programmer can use imperative programming techniques.
  3. Computer programmer can use declarative programming techniques.
  4. Computer programmer can use functional programming techniques.
  5. Computer programmer can use procedural programming techniques.
  6. Computer programmer can use logic programming techniques.
  7. Computer programmer can use symbolic programming techniques.
  8. Webmaster can use HTML.
  9. Computer programmer can use parallel programming techniques.
  10. Computer programmer can use concurrent programming techniques.

Exercise 15. Translate the text into Polish.

Exercise 16. Summarize the text orally using questions from exercise 2 as an outline. Practice until you can say the summary without looking at the text.

Źródła:

Treść tej strony dostępna jest na zasadach licencji CC BY-SA 3.0

Zobacz również:

Autor: Łukasz Piwko

Tłumacz angielskiej i francuskiej literatury specjalistycznej, nauczyciel, wykładowca i maniak technologii programistycznych. Interesuje go wszystko, co związane z programowaniem i tłumaczeniem tekstów na ten temat na język polski. W wolnym czasie czyta Balzaka, słucha muzyki i trenuje karate.

Dyskusja

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *