Skip to content

Commit b61714c

Browse files
committed
first steps to reusable bibliography and merged acronyms with glossary
1 parent febd98f commit b61714c

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

text/main/basics/gettingStarted/gettingStarted.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
You need a nice editor in which you can write the programs.
1111
Actually, you want an editor where you can not just write programs.
1212
You want an editor where you can also directly execute and test your programs.
13-
In software development, you often work with a \pgls{VCS} like \git.
13+
In software development, you often work with a \pgls{vcs} like \git.
1414
You want to do that convenient from your editor.
1515
Such an editor, which integrates many of the common tasks that occur during programming, is called an \pgls{IDE}.
1616
In this book, we will use the \pycharm\ \pgls{IDE}~\cite{VHN2023HOADWP,Y2022PPADT}.

text/main/classes/dunder/dunder.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@
12611261
These methods are \pythonilIdx{\_\_enter\_\_} and \pythonilIdx{\_\_exit\_\_}.
12621262
Since \pythonilIdx{with}~blocks are nice syntactical sugar of the \python\ language, we will here play around with them a little bit.
12631263

1264-
As example, let us create a simple API that allows us to write output in a subset of the \acrfull{XML} format~\cite{BPSMM2008EMLX1FE,K2019ITXJY,CH2013XFCAMLTMC}.
1264+
As example, let us create a simple API that allows us to write output in a subset of the \glsreset{xml}\pgls{xml} format~\cite{BPSMM2008EMLX1FE,K2019ITXJY,CH2013XFCAMLTMC}.
12651265
\pgls{xml} is a format for data interchange which was predominant in distributed systems the~2000s.
12661266
After that, it began to fade out in favor~\cite{A2020XLATDOEOL} of \pgls{json}~\cite{E2017SE4TJDIS,RFC8259} and \pgls{yaml}~\cite{DNMAASBE2021YAMLYV1,K2019ITXJY,CGTYB2022YFFDCAIE}.
12671267
It is still very relevant today, for example, as foundation of several document formats such as those used in LibreOffice~\cite{DF2024LTDF,GL2012LTSOOSSCBAFACSOL} and Microsoft~Word~\cite{MS2024MW,DR2019STFAWAUMW}, or as the basis for the SVG graphics format~\cite{DDGLMSWFJJ2011SVGSSE}.
@@ -1302,10 +1302,10 @@
13021302
Therefore, they are escaped as entities~\xmlil{&} and~\xmlil{>}.
13031303

13041304
\gitPython{\programmingWithPythonCodeRepo}{dunder/xml_context.py}{--args format --labels part_1}{dunder:xml_context:part_1}{%
1305-
Part~1 of our very simply context manager-based \pgls{XML} output API.}%
1305+
Part~1 of our very simply context manager-based \pgls{xml} output API.}%
13061306
%
13071307
\gitPython{\programmingWithPythonCodeRepo}{dunder/xml_context.py}{--args format --labels part_2}{dunder:xml_context:part_2}{%
1308-
Part~2 of our very simply context manager-based \pgls{XML} output API.}%
1308+
Part~2 of our very simply context manager-based \pgls{xml} output API.}%
13091309

13101310
Would it not be nice to have a simple \pgls{API} that allows us to produce valid~\pgls{xml} and that takes care of the escaping of special characters?
13111311
While countless such tools already exist {\dots} let us make our own.
@@ -1415,11 +1415,11 @@
14151415
%
14161416
\gitPythonAndOutputFormat{xml_style}%
14171417
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{dunder}{xml_user_print.py}{--args format}{dunder:xml_user_print}{%
1418-
An example of using our simple context manager-based \pgls{XML} output API from \cref{lst:dunder:xml_context:part_1,lst:dunder:xml_context:part_2}, where the output is printed to the \pgls{stdout}.}%
1418+
An example of using our simple context manager-based \pgls{xml} output API from \cref{lst:dunder:xml_context:part_1,lst:dunder:xml_context:part_2}, where the output is printed to the \pgls{stdout}.}%
14191419
%
14201420
\gitPythonAndOutputFormat{xml_style}%
14211421
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{dunder}{xml_user_file.py}{--args format}{dunder:xml_user_file}{%
1422-
An example of using our simple context manager-based \pgls{XML} output API from \cref{lst:dunder:xml_context:part_1,lst:dunder:xml_context:part_2}, where the output is written to a text file\pythonIdx{write}\pythonIdx{IO!write}\pythonIdx{open}\pythonIdx{remove}\pythonIdx{os!remove}.}%
1422+
An example of using our simple context manager-based \pgls{xml} output API from \cref{lst:dunder:xml_context:part_1,lst:dunder:xml_context:part_2}, where the output is written to a text file\pythonIdx{write}\pythonIdx{IO!write}\pythonIdx{open}\pythonIdx{remove}\pythonIdx{os!remove}.}%
14231423
14241424
We now use this \pgls{API} in \cref{lst:dunder:xml_user_print,lst:dunder:xml_user_file} to basically reproduce the small \pgls{xml}~snippet that I showed you before.
14251425
In the former example, we use \pythonil{print} as destination function.
@@ -1671,7 +1671,7 @@
16711671
The \emph{dunder} stands for \emph{double underscore}, because the names of such methods begins and ends with~\pythonilIdx{\_\_}.
16721672
16731673
Knowing about dunder methods allows us to create classes which can seamlessly be used in arithmetic expressions, in \pythonilIdx{with}~statements, as sequences to iterate over with \pythonilIdx{for}~loops, that support indexing with~\pythonil{[...]}\pythonIdx{[\idxdots]}.
1674-
By implementing dunder methods, we can use the \python\ syntax to construct new collections, support more complex mathematical structures, ensure that resources are properly managed (and eventually disposed), or create elegant and concise APIs.%
1674+
By implementing dunder methods, we can use the \python\ syntax to construct new collections, support more complex mathematical structures, ensure that resources are properly managed (and eventually disposed), or create elegant and concise \pglspl{API}.%
16751675
\endhsection%
16761676
%
16771677
\FloatBarrier%

text/main/controlFlow/exceptions/exceptions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
\gitPythonAndOutput{\programmingWithPythonCodeRepo}{exceptions}{file_with.py}{--args format}{exceptions:file_with}{%
610610
Using a \pythonilIdx{with}~block for closing files after writing to and reading from them\pythonIdx{os!remove}\pythonIdx{remove}\pythonIdx{IO!write}\pythonIdx{write}\pythonIdx{readline}\pythonIdx{IO!readline}.}%
611611

612-
Many of \python's resource-related APIs are realized as context managers.
612+
Many of \python's resource-related \pglspl{API} are realized as context managers.
613613
This also holds for the file input/output API.
614614
We now rewrite \cref{lst:exceptions:file_try_finally} using a \pythonilIdx{with} block as \cref{lst:exceptions:file_with}.
615615
The first thing you will notice is that the file is much shorter.

text/main/controlFlow/iteration/iteration.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@
601601
%
602602
\begin{sloppypar}%
603603
Finally, generator expressions can also be passed to the constructors of collection datastructures or other functions that create such datastructures.
604-
Assume that we are processing numbers stored in a \pgls{CSV} format.
604+
Assume that we are processing numbers stored in a \pgls{csv} format.
605605
Often, the rows of text files with tabular or matrix data are in this format.
606606
In \cref{lst:iteration:generator_expressions_to_collection}, we first define a string \pythonil{csv_text} with the value~\pythonil{"22,56,33,67,43,33,12"}.
607607
Invoking \pythonil{csv_text.split(",")}\pythonIdx{split}\pythonIdx{str!split} will split the string into a list of single strings based on the delimiter~\pythonil{","}.
@@ -751,14 +751,14 @@
751751
%
752752
Another important utility function when dealing with sequences is the function~\pythonilIdx{map}.
753753
We explore its use in \cref{lst:iteration:map}.
754-
Back in \cref{lst:iteration:generator_expressions_to_collection}, we used a generator expression to process data that we exracted from a \pgls{CSV}-formatted string.
754+
Back in \cref{lst:iteration:generator_expressions_to_collection}, we used a generator expression to process data that we exracted from a \pgls{csv}-formatted string.
755755
Instead of doing \pythonil{int(s) for s in csv_text.split(",")} we can simply write \pythonil{map(int, csv_text.split(",")}.
756756
The first argument to \pythonilIdx{map} is a function that should be applied all of the elements in the sequence passed in as its second argument.
757757
The result of \pythonilIdx{map} is a new sequence with the return values of this function.
758758
In \cref{lst:iteration:map}, we map the string \pythonil{csv_text} split at all~\pythonil{","} to \pythonilsIdx{int} and then \pythonilIdx{filter} the sequence to retain only values greater than~20.
759759
We can conveniently iterate over the resulting filtered and mapped sequence using a~\pythonilIdx{for}~loop.
760760

761-
How about we now obtain all the unique squares of the values in the CSV data, i.e., we discard all duplicate squares.
761+
How about we now obtain all the unique squares of the values in the \pgls{csv} data, i.e., we discard all duplicate squares.
762762
First, we again use \pythonilIdx{split}\pythonIdx{str!split} to divide the text into chunks based on the separator~\pythonil{","}.
763763
Then we map these chunks to integers and return their squares using the \pythonilIdx{map}~function, but this provide a~\pythonilIdx{lambda} that does the transformation.
764764
Now we want to retain only the unique values.

text/main/ecosystem/ecosystem.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
A software developer rarely works on a stand-alone project all by themself.
44
Instead, they develop projects that are part of an ecosystem of applications.
55
Their programs will usually depend on libraries, i.e., \python\ packages that offer functionality.
6-
Often, their projects are stored in \pglspl{VCS} like \git\ repositories.
7-
In this part of the book, we will take a small glimpse on how to work within a system of existing projects and \pglspl{VCS}.%
6+
Often, their projects are stored in \pglspl{vcs} like \git\ repositories.
7+
In this part of the book, we will take a small glimpse on how to work within a system of existing projects and \pglspl{vcs}.%
88
%
99
\hinput{packages}{packages.tex}%
1010
\hinput{git}{git.tex}%

text/main/ecosystem/git/git.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
\hsection{The Distributed Version Control System git}%
22
%
3-
Today, \git~\cite{S2023LG,T2024BGAGVCPMATFTND} is maybe the \pgls{VCS} with the most wide-spread use.
4-
It is the \pgls{VCS} on which \github~\cite{PRGWSUdVLFTEKPKFBV2016TSRFTAOGAG,GH2025RD,S2021GAGCC} is based, which, in turn, is maybe the most important hub for open source software projects in the world.
3+
Today, \git~\cite{S2023LG,T2024BGAGVCPMATFTND} is maybe the \pgls{vcs} with the most wide-spread use.
4+
It is the \pgls{vcs} on which \github~\cite{PRGWSUdVLFTEKPKFBV2016TSRFTAOGAG,GH2025RD,S2021GAGCC} is based, which, in turn, is maybe the most important hub for open source software projects in the world.
55
\git\ is based on a \pgls{clientServerArchitecture}, where the \pgls{server} hosts and manages repositories of source code and other resources.
66
The \git\ \pgls{client} is a command line application that is run in the \pgls{terminal} and which allows you to clone (i.e., download) source code repositories and upload (i.e., commit) changes to them.
77
A repository is something like a directory with files and their editing history, i.e., you can work and improve source code, commit changes, and see the history of all past commits.
8-
This is what \pglspl{VCS} are for:
8+
This is what \pglspl{vcs} are for:
99
They do not just provide the current state of a project and allow teams to cooperative and continuous develop software, they also store the history of the project so as to enable us to see which code was used in which version of our software and to track changes.
1010
How to correctly use \git\ thus is a very complex and involved topic beyond the scope of this book.
1111
However, we will here take at least a look into a very small subset of functions that provide you a starting point for working with \git\ repositories.%

text/main/ecosystem/git/gitClone/gitClonePycharm/gitClonePycharm.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
%
239239
\subfloat[][%
240240
Well, there may be other issues unrelated to packages{\dots} %
241-
{\dots}the program I chose here is from our book on \citetitle{databases}~\cite{databases}, and it needs the \postgresql\ \pgls{DBMS} running with a specific \pgls{db} ready. %
241+
{\dots}the program I chose here is from our book on \citetitle{databases}~\cite{databases}, and it needs the \postgresql\ \pgls{dbms} running with a specific \pgls{db} ready. %
242242
So likely, you cannot just run it {\dots} it was just an example.%
243243
\label{fig:gitClonePycharm26ranError}%
244244
]{\tightbox{\includegraphics[width=0.48\linewidth]{\currentDir/gitClonePycharm26ranError}}}%

0 commit comments

Comments
 (0)