-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentation.tex
342 lines (288 loc) · 10.2 KB
/
presentation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
\documentclass{beamer}
\usefonttheme[onlymath]{serif}
%\usepackage{blindtext}
%\input{julia_font}
\input{latex/julia_listings}
\usepackage{listings}
\lstdefinelanguage{JuliaLocal}{
language = Julia, % inherit Julia lang. to add keywords
morekeywords = [3]{@code_llvm, @benchmark}, % define more functions
morekeywords = [2]{ClockTime}, % define more types and modules
}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage[export]{adjustbox}
\usetheme{Execushares}
\usefonttheme[onlymath]{serif}
\title{Extensible Software for Research}
%\subtitle{principles and an example in julia}
\author{Aaron Peikert}
\date{Maximilian Ernst}
\setcounter{showSlideNumbers}{1}
\usepackage{svg}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes}
\usetikzlibrary{fit}
\usetikzlibrary{backgrounds}
% logo
\logo{
\includegraphics[width=.2\textwidth]{figures/logo_blue.pdf}
}
\newcommand{\nologo}{\setbeamertemplate{logo}{}} % command to set the logo to nothing
\definecolor{mypurple}{RGB}{149, 88, 178}
\newcommand{\monob}[1]{\mbox{\texttt{\textcolor{mypurple}{#1}}}}
\newenvironment{wideitemize}{
\itemize\addtolength{\itemsep}{15pt}\addtolength{\topsep}{10pt}}{\enditemize}
\newcommand{\A}{\mathbf{A}}
\newcommand{\I}{\mathbf{I}}
\newcommand{\F}{\mathbf{F}}
\newcommand{\OmegaM}{\mathbf{\Omega}}
\newcommand{\SigmaM}{\mathbf{\Sigma}}
\DeclareMathOperator{\prox}{prox}
\DeclareMathOperator*{\argmin}{arg\,min}
\begin{document}
\setcounter{showProgressBar}{0}
\setcounter{showSlideNumbers}{0}
\frame{\titlepage}
\setcounter{framenumber}{0}
\setcounter{showProgressBar}{1}
\setcounter{showSlideNumbers}{1}
\begin{frame}
\frametitle{Contents}
\vspace{1cm}
\begin{wideitemize}
\item Principles of Extensible Research Software
\end{wideitemize}
\vspace{1cm}
\begin{wideitemize}
\item Application: StructuralEquationModels.jl
\end{wideitemize}
\end{frame}
%\begin{frame}
% \frametitle{Who writes research software?}
% \begin{wideitemize}
% \item research software engineers
% \item research software developer
% \item applied user
% \end{wideitemize}
%\end{frame}
\begin{frame}
\frametitle{A day in the life of \ldots}
a statistical methods researcher\\
\vspace{0.8cm}
\begin{wideitemize}
\item<2-> work with a specific type of model
\begin{itemize}
\item<2-> regression, structural equation models, deep learning, \ldots
\end{itemize}
\item<3-> have an idea
\item<4-> test it
\item<5-> make it available to applied researchers
\end{wideitemize}
\end{frame}
\begin{frame}
\frametitle{We need to write Software}
\begin{wideitemize}
\item to test $\to$ prototype
\item to make it available $\to$ distribute
\end{wideitemize}
\vspace{0.5cm}
\pause
What's the fastest way to get there?
\vspace{0.5cm}
\pause
We are already working with existing software.
\vspace{0.5cm}
\pause
\textbf{It would be nice if we could extend existing software!}
\end{frame}
\begin{frame}
\frametitle{But \ldots}
\begin{wideitemize}
\item<2-> \textbf{understand} 1000s of lines of code
\item<3-> make \textbf{changes}, possibly breaking stuff
\item<4-> get maintainers to \textbf{adopt} our changes
\end{wideitemize}
\vspace{1cm}
\only<5>{\textbf{These hurdles are often too high!}}
\end{frame}
\begin{frame}
\frametitle{A \only<1-2>{day}\only<3>{year} in the life of \ldots}
\vspace{0.8cm}
\begin{wideitemize}
\item<2-> to test: minimal reimplementation
\begin{itemize}
\item waste of time
\item not well tested
\item hard to reproduce
\item slow
\end{itemize}
\item<3-> to deploy: put code on github
\begin{itemize}
\item bad user interface, no documentation
\item missing features
\item incompatible to existing software
\end{itemize}
\end{wideitemize}
\end{frame}
\begin{frame}
\frametitle{My Experience}
\vspace{1cm}
\begin{wideitemize}
\item from R $\to$ \raisebox{-.07\height}{\includegraphics[width=0.08\textwidth, valign=m]{figures/julia_logo.pdf}}
\end{wideitemize}
\end{frame}
\begin{frame}
\frametitle{Culture}
\vspace{0.8cm}
\begin{wideitemize}
\item care about extensibility
\item developer documentation
\item assume their code is read
\end{wideitemize}
\end{frame}
\begin{frame}
\frametitle{An Example}
Let's make a thought experiment...
\vspace{0.8cm}
\begin{wideitemize}
\item encyclopedia
\begin{itemize}
\item add an entry
\item some syntactical requirements\\
{\small 300-400 words, alphabetical, \ldots}
\end{itemize}
\item book
\begin{itemize}
\item a draft already exists
\item add something everywhere it is applicable
\end{itemize}
\end{wideitemize}
\end{frame}
\begin{frame}
\frametitle{An Example}\vspace{0.5cm}
\includegraphics[width=0.5\textwidth]{figures/lorem_ipsum_red.pdf}%
\includegraphics[width=0.5\textwidth]{figures/lorem_ipsum_green.pdf}
\end{frame}
\begin{frame}
\frametitle{Software Design}
\only<1>{Not all research articles can be encyclopedias, but maybe all research software can be...}
\pause
You need to be able to add new features...
\vspace{0.8cm}
\begin{wideitemize}
\item without \textbf{understanding} existing code
\item without \textbf{changing} existing code
\item syntactical requirements need to be \textbf{clear} and \textbf{easy communicable}!
\end{wideitemize}
\end{frame}
\begin{frame}
\frametitle{The Benefits}
\vspace{0.5cm}
\begin{wideitemize}
\item Applied Researchers
\begin{itemize}
\item user interface
\item better documentation
\item faster availability of new features
\item less bugs
\item higher performance
\end{itemize}
\item Statistical Researchers
\begin{itemize}
\item no re-implementation $\to$ less time-consuming
\item more users
\item no software engineering skills needed
\end{itemize}
\item Maintainers
\begin{itemize}
\item changes are easier to integrate
\end{itemize}
\end{wideitemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%% Aaron %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[c]
\centering \Huge Less Abstract
\end{frame}
\begin{frame}{A few days in a methods researchers life}
\begin{wideitemize}
\item Do you have any ideas why this does not converge?
\item Staring puzzled at the theory (should work?!).
\item Staring very puzzled at the implementation in C++.
\item Rinse and repeat for a couple of days and researchers.
\end{wideitemize}
\end{frame}
\begin{frame}{An hour in our life}
\begin{wideitemize}
\item Look at the formula: $ridge(x, \lambda{}) = \lambda{}\sum^p_{j=1}x^2$
\item Implement in Julia: \monob{ridge(x, λ) = λ ∗ sum(x.\^{}2)}
\item add 30 lines of API (formal requirements)
\item Enjoy.
\end{wideitemize}
\end{frame}
\begin{frame}{Two hours in our life}
\begin{wideitemize}
\item Simulation in Juila works (converges as it should)
\item<2> Original simulation takes weeks on a dedicated workstation.
\item<2> Original simulation freezes our cluster due to poor parallelization.
\item<2> Simulation in Julia takes 2 hours on my laptop.
\end{wideitemize}
\end{frame}
\begin{frame}{Why?}
\begin{wideitemize}
\item Some investments in extensibility
\item division of labor: \begin{itemize}
\item optimizing linear algebra is done by Intel
\item numerical optimization is done by dedicated experts
\item differentiation is automated
\end{itemize}
\item modern infrastructure
\end{wideitemize}
\end{frame}
\begin{frame}{But why?}
\centering \huge convenience
\end{frame}
\begin{frame}{How to improve convenience?}
\begin{enumerate}
\item Extensible Software
\item Documentation
\item User Interface
\end{enumerate}
\end{frame}
\begin{frame}[c]{The leverage of extensible software}
\centering
\includegraphics[width=.8\textwidth]{figures/users.pdf}
\end{frame}
\begin{frame}[c]{Time is limited}
\centering
\includegraphics[width=.8\textwidth]{figures/difficulty.pdf}
\end{frame}
\begin{frame}{Documentation}
\begin{wideitemize}
\item Documentation for users
\item Documentation for contributors/developers
\item<2-> Documentation is not always called documentation (e.g. papers/talks/blog posts)
\item<3> Code itself is the best developer documentation
\end{wideitemize}
\end{frame}
\begin{frame}{User Interface}
\begin{wideitemize}
\item Frictionless
\item Connected to prior knowledge
\end{wideitemize}
\end{frame}
\begin{frame}[c]
\centering{
\huge
\only<1>{More Concrete}
\only<2>{
\href{https://structuralequationmodels.github.io/StructuralEquationModels.jl/dev/}{
\textcolor[rgb]{0.796,0.235,0.2}{Structural}\textcolor[rgb]{0.22,0.596,0.149}{Equation}\textcolor[rgb]{0.584,0.345,0.698}{Models}\textcolor[rgb]{0.251,0.388,0.847}{.jl}
}
}
}
\end{frame}
\end{document}