|
1 | 1 | \hsection{}%
|
2 | 2 | \hsection{Introduction}%
|
3 | 3 | %
|
4 |
| -This is work in progress. |
| 4 | +In this book, we want to learn \emph{program}. |
| 5 | +Programming is often described as \emph{the activity or job of writing computer programs}~\cite{CDE2024PMOPIE}. |
| 6 | +However, this is only \emph{one} aspect of it. |
| 7 | +Actually, in the real world, the act of programming is not just the activity of writing some code. |
| 8 | +Imagine the following scenario: |
| 9 | + |
| 10 | +A person, say your future boss, comes to you and says: |
| 11 | +\inQuotes{Write a program that solves this task here.} |
| 12 | +Then you write the program and give here the text file. |
| 13 | +Everybody is happy, the problem is solved. |
| 14 | + |
| 15 | +Sounds kind of unrealistically, right? |
| 16 | +You get a task and just write the program that solves it. |
| 17 | +Is it that easy? |
| 18 | +Well, OK, you can reasonably expect that you learn how to do that in this course. |
| 19 | +We will teach you \texttt{Python} programming. |
| 20 | +So you expect to learn how to translate some kind of specification into code. |
| 21 | +Fine. |
| 22 | + |
| 23 | +But how does your boss know that the program you give her will do the job? |
| 24 | +And that it will do so reliably? |
| 25 | +What sort of confidence can she have into the assumption that you won't be making any errors? |
| 26 | + |
| 27 | +And what if your program is not just a single-use, stand-alone kind of program? |
| 28 | +What if it is part of some sort of software ecosystem? |
| 29 | +What if other programs need to use/run it? |
| 30 | +Maybe it can access some sort of sensor measuring something, or maybe it can convert data from one file format to another one. |
| 31 | +Then, other programmers may need to be able to at least understand how to correctly run the program and what kind of input and output data it will expect or produce, respectively. |
| 32 | + |
| 33 | +What if this program is going to be needed for the next ten or so years? |
| 34 | +Maybe it could be necessary to add new functionality? |
| 35 | +Maybe some of the libraries you use get outdated and need to be replaced? |
| 36 | +There are several reasonable situations in which a totally different person may need to work, read, modify, and improve \emph{your} code. |
| 37 | + |
| 38 | +Or maybe you are a researcher, using \texttt{Python} to implement some algorithm and to run an experiment. |
| 39 | +In order to make your experiments and results replicable, you would probably want to publish your algorithm implementation together with the results. |
| 40 | +This only makes sense if your code is at least a bit readable. |
| 41 | + |
| 42 | +All of these things need to be considered when we learn how to program. |
| 43 | +And in typical courses, they are not. |
| 44 | +In a typical course, you learn how to write a small program that solves a certain task. |
| 45 | +The task is usually simple, so the teachers are able to read your code even if you have ugliest style imaginable. |
| 46 | +Also, nobody is ever going to look at or use the programs you write as your homework again. |
| 47 | +So one of the above really matters. |
| 48 | +But in reality, things are not always simple. |
| 49 | + |
| 50 | +One may hope that, as one of the very first things, surgery students in medical school are taught to wash their hands before performing surgery. |
| 51 | +Hence, we will teach you how to write clean, well-documented, and properly tested programs. |
| 52 | +Right from the start. |
| 53 | +Such that all of your code will be reusable, readable, clear, clean, and beautiful.% |
5 | 54 | %
|
6 | 55 | \endhsection\endhsection%
|
7 | 56 | %
|
0 commit comments