Skip to content

Commit 99b9064

Browse files
committed
better discussion of why python is a good language for learning
1 parent 9123693 commit 99b9064

File tree

13 files changed

+114
-50
lines changed

13 files changed

+114
-50
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ share/python-wheels/
375375
MANIFEST
376376

377377
# PyInstaller
378-
# Usually these files are written by a python script from a template
378+
# Usually these files are written by a whyPython script from a template
379379
# before PyInstaller builds the exe, so as to inject date/other infos into it.
380380
*.manifest
381381
*.spec

bibliography/bibliography.bib

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ @string { winter
2323
@string { a_abadi_marin = "Mart{\'i}n Abadi" }
2424
@string { a_abbasi_hameer = "Hameer Abbasi" }
2525
@string { a_archibald_anne_m = "Anne M.\ Archibald" }
26+
@string { a_back_ralph_johan = "Ralph{-}Johan Back" }
2627
@string { a_barham_paul = "Paul Barham" }
2728
@string { a_beazley_david_m = "David M.\ Beazley" }
2829
@string { a_berg_sebastian = "Sebastian Berg" }
@@ -60,6 +61,7 @@ @string { a_ghemawat_sanjay
6061
@string { a_gohlke_christoph = "Christoph Gohlke" }
6162
@string { a_gommers_ralf = "Ralf Gommers" }
6263
@string { a_gramfort_alexandre = "Alexandre Gramfort" }
64+
@string { a_grendell_lina = "Linda Grandell" }
6365
@string { a_grisel_olivier = "Olivier Grisel" }
6466
@string { a_haberland_matt = "Matt Haberland" }
6567
@string { a_haldane_allan = "Allan Haldane" }
@@ -81,6 +83,7 @@ @string { a_larson_eric
8183
@string { a_laxalde_denis = "Denis Laxalde" }
8284
@string { a_lee_kent_d = "Kent D.\ Lee" }
8385
@string { a_levenberg_josh = "Josh Levenberg" }
86+
@string { a_mann_samuel = "Samuel Mann" }
8487
@string { a_mayorov_nikolay = "Nikolay Mayorov" }
8588
@string { a_michel_vincent = "Vincent Michel" }
8689
@string { a_millman_jarrod_k = "K.\ Jarrod Millman" }
@@ -95,6 +98,7 @@ @string { a_oliphant_travis_e
9598
@string { a_paquete_luis = "Lu{\'i}s Paquete" }
9699
@string { a_passos_alexandre = "Alexandre Passos" }
97100
@string { a_pedregosa_fabian = "Fabian Pedregos" }
101+
@string { a_peltomaeki_mia = "Mia Peltom{\"a}ki" }
98102
@string { a_perez_riverol_yasset = "Yasset P{\'e}rez{-}Riverol" }
99103
@string { a_perktold_josef = "Josef Perktold" }
100104
@string { a_perrot_matthieu = "Matthieu Perrot" }
@@ -108,6 +112,7 @@ @string { a_reddy_tyler
108112
@string { a_ribeiro_antonio_h = "Ant{\^o}nio H.\ Ribeiro" }
109113
@string { a_roscoe_timothy = "Timothy Roscoe" }
110114
@string { a_sachsenberg_timo = "Timo Sachsenberg" }
115+
@string { a_salakoski_tapio = "Tapio Salakoski" }
111116
@string { a_scipy_1 = "{{SciPy 1.0 Contributors}}" }
112117
@string { a_sheppart_kevin = "Kevin Sheppard" }
113118
@string { a_silva_sara = "Sara Silva" }
@@ -118,6 +123,7 @@ @string { a_steiner_benoit
118123
@string { a_taylor_julian = "Julian Taylor" }
119124
@string { a_ternent_tobias = "Tobias Ternent" }
120125
@string { a_thirion_bertrand = "Bertrand Thirion" }
126+
@string { a_tolhurst_denise = "Denise Tolhurst" }
121127
@string { a_torregrossa_dario = "Dario Torregrossa" }
122128
@string { a_torvalds_linus = "Linus Torvalds" }
123129
@string { a_tsitoara_mariot = "Mariot Tsitoara" }
@@ -128,6 +134,7 @@ @string { a_van_der_walt_stefan
128134
@string { a_van_horn_bruce_m_2 = "Bruce M.\ {Van Horn}~II" }
129135
@string { a_van_kerkwijk_marten_h = "Marten H. {van Kerkwijk}" }
130136
@string { a_van_mulbregt_paul = "Paul {van Mulbregt}" }
137+
@string { a_van_rossum_guido = "Guido {van Rossum}" }
131138
@string { a_varoquaux_gael = "Ga{\"e}l Varoquaux" }
132139
@string { a_vasudevan_vijay = "Vijay Vasudevan" }
133140
@string { a_virtanen_pauli = "Pauli Virtanen" }
@@ -148,6 +155,7 @@ @string { a_zheng_xiaoqiang
148155

149156

150157
%% locations
158+
@string { l_australia_hobart = "{{Hobart}, {TAS}, {Australia}}" }
151159
@string { l_portugal_lisbon = "{{Lisbon}, {Portugal}}" }
152160
@string { l_switzerland_cham = "{{Cham}, {Switzerland}}" }
153161
@string { l_uk_birmingham = "{{Birmingham}, {England}, {UK}} " }
@@ -161,6 +169,7 @@ @string { l_usa_hoboken
161169
@string { l_usa_ithaca = "{{Ithaca}, {NY}, {USA}}" }
162170
@string { l_usa_new_york = "{{New York}, {NY}, {USA}}" }
163171
@string { l_usa_piscataway = "{{Piscataway}, {NJ}, {USA}}" }
172+
@string { l_usa_reston = "{{Reston}, {VA}, {USA}}" }
164173
@string { l_usa_san_francisco = "{{San Francisco}, {CA}, {USA}}" }
165174
@string { l_usa_savannah = "{{Savannah}, {GA}, {USA}}" }
166175
@string { l_usa_sebastopol = "{{Sebastopol}, {CA}, {USA}}" }
@@ -171,6 +180,7 @@ @string { l_usa_new_york
171180
@string { p_acm = "{Association for Computing Machinery~({ACM})}" }
172181
@string { p_apress = "{Apress Media, LLC}" }
173182
@string { p_cambridge_uni_press_ass = "{Cambridge University Press \& Assessment}" }
183+
@string { p_cnri = "{Corporation for National Research Initiatives~({CNRI})}" }
174184
@string { p_cornell_university_library = "{Cornell Universiy Library}" }
175185
@string { p_github = "{{GitHub} Inc}" }
176186
@string { p_ieee = "{Institute of Electrical and Electronics Engineers~{(IEEE)}}" }
@@ -191,6 +201,7 @@ @string { p_wiley_and_sons_ltd
191201
@string { pa_acm = l_usa_new_york }
192202
@string { pa_apress = l_usa_new_york }
193203
@string { pa_cambridge_uni_press_ass = l_uk_cambridge }
204+
@string { pa_cnri = l_usa_reston }
194205
@string { pa_cornell_university_library = l_usa_ithaca }
195206
@string { pa_github = l_usa_san_francisco }
196207
@string { pa_ieee = l_usa_piscataway }
@@ -279,8 +290,8 @@ @xdata{j_nm
279290
@xdata{j_pcb,
280291
journal = {{PLOS} Computational Biology},
281292
issn = {1553-7358},
282-
publisher = p_ploss,
283-
address = pa_ploss
293+
publisher = p_plos,
294+
address = pa_plos
284295
}
285296

286297

@@ -291,6 +302,12 @@ @xdata{rep_arxiv_corr
291302
address = pa_cornell_university_library
292303
}
293304

305+
@xdata{rep_cnri_proposal,
306+
institution = p_cnri,
307+
address = pa_cnri,
308+
type = {CNRI Proposal},
309+
}
310+
294311

295312
%% series
296313
@xdata{ser_bs,
@@ -377,6 +394,14 @@ @book{CN2020ULB
377394
xdata = {ser_bs},
378395
}
379396

397+
@inproceedings{GPBS2006WCTIPIHSUP,
398+
author = a_grendell_lina # and # a_peltomaeki_mia # and # a_back_ralph_johan # and # a_salakoski_tapio,
399+
title = {Why complicate things? Introducing Programming in High School using \python},
400+
crossref = {PROC2006ACE},
401+
pages = {71--80},
402+
doi = {10.5555/1151869.1151880}
403+
}
404+
380405
@article{H2007MA2GE,
381406
author = a_hunter_john_d,
382407
title = {\matplotlib: {A} 2D~Graphics Environment},
@@ -427,6 +452,16 @@ @article{PRGWSUdVLFTEKPKFBV2016TSRFTAOGAG
427452
xdata = {j_pcb},
428453
}
429454

455+
@proceedings{PROC2006ACE,
456+
booktitle = {Proceedings of the 8th Australasian Conference on Computing Education~({ACE'06}), } # jan # {~16-19, 2006, } # l_australia_hobart,
457+
editor = a_tolhurst_denise # and # a_mann_samuel,
458+
isbn = {978-1-920682-34-7},
459+
date = {2006-01},
460+
volume = {52},
461+
publisher = p_acm,
462+
address = pa_acm,
463+
}
464+
430465
@proceedings{PROC2016OSDI,
431466
title = {12th {USENIX} Symposium on Operating Systems Design and Implementation~({OSDI'16}), } # nov # {~2-4, 2016, } # l_usa_savannah,
432467
editor = a_keeton_kimberly # and # a_roscoe_timothy,
@@ -457,7 +492,7 @@ @book{S2023LG
457492
author = a_skoulikari_anna,
458493
title = {Learning \git},
459494
date = {2023-05},
460-
isbn = {9781098133917},
495+
isbn = {978-1098133917},
461496
publisher = p_oreilly,
462497
address = pa_oreilly
463498
}
@@ -505,6 +540,16 @@ @book{VHN2023HOADWP
505540
address = pa_packt
506541
}
507542

543+
@techreport{VR1999CPFERPASEFTPOT,
544+
author = a_van_rossum_guido,
545+
title = {Computer Programming for Everybody (Revised Proposal). A Scouting Expedition for the Programmers of Tomorrow},
546+
date = {1999-07},
547+
xdata = {rep_cnri_proposal},
548+
number = {90120-1a},
549+
url = {https://www.python.org/doc/essays/cp4e},
550+
urldate = {2024-06-27}
551+
}
552+
508553
@inproceedings{WW2023RSDEWASSAA,
509554
author = a_weise_thomas # and # a_wu_zhize,
510555
title = {Replicable Self-Documenting Experiments with Arbitrary Search Spaces and Algorithms},

text/main/basics/gettingStarted/gettingStarted.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
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}.
16-
In our course, you will work with the \pycharm\ \pgls{IDE}~\cite{VHN2023HOADWP}.
16+
In this book, we will use the \pycharm\ \pgls{IDE}~\cite{VHN2023HOADWP}.
1717
If you do not yet have \pycharm\ installed, then you can work through the setup instructions outlined in \cref{sec:installingPyCharm}.
1818

1919
Before we get into these necessary installation and setup steps that we need to really learn programming, we face a small problem:

text/main/basics/gettingStarted/installingPyCharm/installingPyCharm.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Just having a programming language and the corresponding interpreter on your system is not enough.
55
Are you going to write programs in a simple text editor like a caveperson?
66
No, of course not, you need an \pgls{IDE}, a program which allows you to do multiple of the necessary tasks involved in the software development process under one convenient user interface.
7-
For this course, I recommend using \pycharm, whose community edition is freely available.
7+
For this book, I recommend using \pycharm, whose community edition is freely available.
88
The installation guide for \pycharm\ can be found at \url{https://www.jetbrains.com/help/pycharm/installation-guide.html}.%
99
%
1010
\hinput{installingPyCharmWindows}{installingPyCharmWindows}%

text/main/basics/gettingStarted/installingPython/installingPython.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\label{sec:installingPython}%
33
In order to learn and use \python, we first need to install it.
44
There are two major versions of \python\ out there: \python~\softwareStyle{2} and \python~\softwareStyle{3}.
5-
This course focuses entirely on \python~\softwareStyle{3}.
5+
This book focuses entirely on \python~\softwareStyle{3}.
66
We assume that you have installed \pythonWithVersion\ or newer.
77
We here provide some brief setup instructions.
88
More help can be found at the following resources:%

text/main/introduction/introduction.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\hsection{Introduction}%
33
%
44
\hinput{programming}{programming}%
5-
\hinput{python}{python}%
5+
\hinput{whyPython}{whyPython}%
66
%
77
\endhsection\endhsection%
88
%

text/main/introduction/programming/programming.tex

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\hsection{Programming and Software Development}%
1+
\hsection{Why Programming \emph{and} Software Engineering Tools?}%
22
A big part of our life consists of performing tasks, chores, and other work.
33
Often, we do not enjoy performing chores and tasks and other work.
44
Naturally, we want to delegate them.
@@ -11,7 +11,7 @@
1111
\inQuotes{Wash my hair, then cut it down to 1cm on the top, trim the sides, then color it green.}
1212

1313
In either cases, you provided the other person with a clear and unambiguous sequence of instructions in a language they can understand.
14-
In this course, you will learn to do the same --- with computers.
14+
In this book, you will learn to do the same --- with computers.
1515
%
1616
\begin{definition}[Computer Program]%
1717
A \emph{computer program} is an unambiguous sequence of computational instructions for a computer to achieve a specific goal.%
@@ -36,22 +36,18 @@
3636
The activity of pure programming listed in \cref{def:programming} is only one part of software development.
3737
Imagine the following scenario:
3838

39-
A person, say your future boss, comes to you and says:
40-
\inQuotes{Write a program that solves this task here.}
41-
Then you write the program and give her the text file.
42-
Everybody is happy, the problem is solved.
39+
In this book we discuss how to translate some kind of specification into \python\ code.
40+
Let's say that later in your job, you want to develop a program that can be used to solve a specific task.
41+
So, well, you write the program.
42+
You learned how to do that with this book.
43+
So you now have the file with the program code.
44+
The problem is solved.
4345

44-
Sounds kind of unrealistically, right?
45-
You get a task and just write the program that solves it.
46-
Is it that easy?
47-
Well, OK, you can reasonably expect that you learn how to do that in this course.
48-
This course is focussed on the \python~3 programming language~\cite{H2023ABGTP3P,LH2015DSAAWP}.
49-
So you expect to learn how to translate some kind of specification into \python\ code.
50-
Fine.
51-
52-
But how does your boss know that the program you give her will do the job?
53-
And that it will do so reliably?
54-
What sort of confidence can she have into the assumption that you won't be making any errors?
46+
Is that easy?
47+
On one hand, you may wonder whether you made any mistake.
48+
We are people, we all make mistakes.
49+
The more complex the task we tackle, the more (program code) we write, the more likely it is that we make some small error somewhere.
50+
So probably you want to \emph{test} your program, i.e., check if it really computes the things that it should compute it the way you intended it to compute these things.
5551

5652
And what if your program is not just a single-use, stand-alone kind of program?
5753
What if it is part of some sort of software ecosystem?
@@ -70,20 +66,22 @@
7066

7167
All of these things need to be considered when we learn how to program.
7268
Because you do not just \inQuotes{program,} you develop software.
69+
7370
In typical courses, such aspects are ignored.
7471
In a typical course, you learn how to write a small program that solves a certain task.
7572
The task is usually simple, so the teachers are able to read your code even if you have ugliest style imaginable.
7673
Also, nobody is ever going to look at or use the programs you write as your homework again.
77-
So none of the above really matters.
74+
In such a pristine scenario, none of the above really matters.
7875
But in reality, things are not always simple.
7976

8077
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.
8178
And you, our dear students, can expect us to teach you how to develop software properly.
8279
And we will try to do that.
8380
We will teach you how to write clean, well-documented, and properly tested programs.
8481
Right from the start.
85-
Such that all of your code will be reusable, readable, clear, clean, and beautiful.
82+
Such that all of your code will be reusable, readable, clear, clean, and \emph{beautiful}.
8683

87-
As a result, this will be a course which is very practice centered.%
84+
As a result, this will be a course which is very practice centered.
85+
We will learn programming the \emph{right} way.%
8886
\endhsection%
8987
%

text/main/introduction/python/python.tex

Lines changed: 0 additions & 22 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)