This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentation.Rmd
716 lines (429 loc) · 10.1 KB
/
presentation.Rmd
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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
---
title: "so, you want to go open science?"
author: Antoine Masson, Vittoria Rezzonico
date: December 4th 2018
output:
revealjs::revealjs_presentation:
transition: none
theme: simple
center: true
slide_level: 1
controlsBackArrows: 'hidden'
progress: false
self_contained: false
reveal_plugins: ["notes"]
---
<style>
.reveal section img { background:none; border:none; box-shadow:none; }
</style>
# who are you?
# who are we?
# SCITAS
# the Library
# why us?
# so, you want to go open science?
# Welcome!
---
![Receiving end](phd031214s.png "test")
# Thomas
---
<pre><code>thomas@macbook:~♥ gfortran fe-code.f90
thomas@macbook:~♥ ./a.out
-511217312.
thomas@macbook:~♥ ./a.out
320487776.
</code></pre>
---
# Oops
# What Thomas did not do
---
<pre><code>thomas@macbook:~♥ gfortran -fbounds-check fe-code.f90
thomas@macbook:~♥ ./a.out
At line 9 of file fe-code.f90
Fortran runtime error: Index '0' of dimension 1 of array 'a' below
lower bound of 1
Error termination. Backtrace:
#0 0x7fb554834d4a
#1 0x7fb554835825
#2 0x7fb554835bca
#3 0x561f9eb609cb
#4 0x561f9eb60ac4
#5 0x7fb553d402e0
#6 0x561f9eb607f9
#7 0xffffffffffffffff
</code></pre>
---
## Quiz
What is wrong with the code?
- no versioning
- it's not GPL
- insufficient debugging
- insufficient testing
---
## Quiz
What can go wrong with the science?
---
## Quiz
What can we suggest to Thomas?
---
---
Consider the paper like an advertisement for your work.
Scholarship is in code and data.
---
# Goal number 1
```{r mean, echo=FALSE, warning=FALSE, fig.height=6,fig.width=8}
data1 <- read.csv("mean_median.csv")
library(ggplot2)
library(reshape2)
m=apply(data1,2,FUN=median)
median_=data.frame(variable=names(m), value=m, row.names = NULL)
m=apply(data1,2,FUN=mean)
mean_=data.frame(variable=names(m), value=m, row.names = NULL)
data <- melt(data1,measure.vars=c(1,2,3,4))
p<-ggplot(data,aes(x=variable, y=value))+geom_point(alpha=0.05, color='blue') + geom_point(data=mean_, color='white', size=4) + geom_point(data=mean_, color='black', size=3) + xlab('') + ylab('age') + theme_grey(base_size = 24)
p
```
---
# Goal number 1
```{r median, echo=FALSE, warning=FALSE, fig.height=6,fig.width=8}
p<-ggplot(data,aes(x=variable, y=value))+geom_point(alpha=0.05, color='blue') + geom_point(data=mean_, color='white', size=4) + geom_point(data=mean_, color='black', size=3) + geom_point(data=median_, color='white', size=4) + geom_point(data=median_, color='red', size=3) + xlab('') + ylab('age') + theme_grey(base_size = 24)
p
```
# Goal number 2
## build on the shoulder of giants
# Goal number 3
## be the giant
---
![alt text](phd032614s.png "Logo Title Text 1")
---
# Don'ts
---
```{c, uglycode, eval='false'}
if(!q){
v=0;
e(a,c){
v+=l?o[-f+a]:0;
v+=z?o[a*f-1]:0;
}
*i+=z&&l?v/2:v;
}
R(i+d,1,i,1,c,c,10);
R(o,f,i+d,c,1,c,10+g);
```
---
```{c, uglycode-indent, eval='false'}
if(!q){
v=0;
e(a,c){
v+=l?o[-f+a]:0;
v+=z?o[a*f-1]:0;
}
*i+=z&&l?v/2:v;
}
R(i+d,1,i,1,c,c,10);
R(o,f,i+d,c,1,c,10+g);
```
---
```{c, uglycode-indent-comment, eval='false'}
/* Messy code follows */
if(!q){
v=0;
e(a,c){
v+=l?o[-f+a]:0;
v+=z?o[a*f-1]:0;
}
*i+=z&&l?v/2:v;
}
R(i+d,1,i,1,c,c,10);
R(o,f,i+d,c,1,c,10+g);
```
---
```{c, uglycode-indent-comment2, eval='false'}
/* Messy code follows */
if(!q){
v=0;
e(a,c){
v+=l?o[-f+a]:0;
v+=z?o[a*f-1]:0;
}
/* VR: trust me, I know what I am doing */
*i+=z&&l?v/2:v;
}
R(i+d,1,i,1,c,c,10);
R(o,f,i+d,c,1,c,10+g);
```
---
```{c, uglycode-indent-comment3, eval='false'}
/* Messy code follows */
if(!q){
v=0;
e(a,c){
v+=l?o[-f+a]:0;
v+=z?o[a*f-1]:0;
}
/* VR: trust me, I know what I am doing */
/* WS -- Don't trust me I have no idea what she was doing */
*i+=z&&l?v/2:v;
}
R(i+d,1,i,1,c,c,10);
R(o,f,i+d,c,1,c,10+g);
```
---
# Messy code
---
# Useless comments
---
```{fortran, wrongcode, eval='false'}
integer :: i, a(10), b, c
do i=1,size(a)
a(i) = 1
end do
d=0
do i=0,size(a)+1
d = d+a(i)
end do
```
---
# Errors
---
<pre><code>thomas@macbook:~♥ rm -rf ~/
</code></pre>
---
# code/software loss
---
![alt text](andrew_wakefield.jpg "Logo Title Text 1")
---
![alt text](chartoftheday_12973_europe_sees_a_400percent_increase_in_measles_cases_in_2017_n.jpg "Logo Title Text 1")
---
# irreversible mistakes
---
![alt text](lonely-coder.jpeg "Logo Title Text 1")
---
# isolated code/software
---
![alt text](dont-ignore-me-it-hurts.jpg "Logo Title Text 1")
---
# ignored contribution as a developer
---
![alt text](code-reuse.jpg "Logo Title Text 1")
---
# code reinvention or duplication of experimental runs over and over
---
# Let's be positive
---
# And do things well
---
# File management
<div class="fragment" data-fragment-index="1">
### efficient
</div>
<div class="fragment" data-fragment-index="2">
### time saving
</div>
---
# Documentation
<div class="fragment" data-fragment-index="1">
### reusable
</div>
<div class="fragment" data-fragment-index="2">
### by yourself, your colleagues, the world
</div>
# Versioning
<div class="fragment" data-fragment-index="1">
### safe
</div>
<div class="fragment" data-fragment-index="2">
### reliable
</div>
<div class="fragment" data-fragment-index="3">
### citable
</div>
# Reappropriation
# Collaboration
# Acknowledgement
# Build your code portfolio
---
---
# Open Science
---
## umbrella term
---
## movement
---
## sharing results and methodologies<br>at all stages
---
# open access to publications
# open research data
# open source software
# open collaboration
# open peer review
---
# Why?
---
# Because we're nice people
---
# Public money, public data
---
# Requirement<br>from the funding agencies
---
![alt text](vetterli_bn.jpg "Logo Title Text 1")
---
# Open Science is good for you
---
# Visibility
<div class="fragment" data-fragment-index="1">
## larger impact
</div>
# Scrutiny
<div class="fragment" data-fragment-index="1">
## better quality
</div>
# Reuse
<div class="fragment" data-fragment-index="1">
## higher efficacy
</div>
# Public access
<div class="fragment" data-fragment-index="1">
## fair opportunity
</div>
---
# Science is supposed to be Open!
---
# Open Source
<div class="fragment" data-fragment-index="1">
something you can modify and share
</div>
<div class="fragment" data-fragment-index="2">
publicly accessible design
</div>
<div class="fragment" data-fragment-index="3">
software with source code that anyone can
</div>
<span class="fragment" data-fragment-index="4">inspect</span><span class="fragment" data-fragment-index="5">, modify</span><span class="fragment" data-fragment-index="6">, and enhance</span>
# Free software
# Logiciel libre
# Free as in freedom
# The four essential freedoms
---
## Freedom #0
<div class="fragment" data-fragment-index="1">
run the program as you wish, for any purpose<br><br>
</div>
---
## Freedom #1
<div class="fragment" data-fragment-index="1">
study how the program works,<br>and change it so it does your computing as you wish
</div>
---
## Comments to Freedom #1
<div class="fragment" data-fragment-index="1">
Need access to the source code
</div>
---
## Freedom #2
<div class="fragment" data-fragment-index="1">
redistribute copies so you can help others
</div>
---
## Freedom #3
<div class="fragment" data-fragment-index="1">
distribute copies of your modified versions to others
</div>
---
## Comments to Freedom #3
<div class="fragment" data-fragment-index="1">
the whole community can benefit from your changes
</div>
<div class="fragment" data-fragment-index="2">
need access to the source code
</div>
---
# Open Source? Free?
values
---
---
# Free and Open Source licenses
# Not including a license?
<div class="fragment" data-fragment-index="1">
doesn't mean your code is open
</div>
# A license must be provided
<div class="fragment" data-fragment-index="1">
to define what is allowed to do with your work
</div>
<div class="fragment" data-fragment-index="2">
### citation
</div>
<div class="fragment" data-fragment-index="3">
### usage
</div>
<div class="fragment" data-fragment-index="4">
### sharing
</div>
# A license must be provided
to protect your work
###
###
###
# Using external libraries
## check their licenses
# More on this later
---
# Open Format
goal: reuse the software and the generated data
# Dos
- use open file standard
- custom format? give the format used!
# Dos
- use open language, libraries
- other can install and use and contribute to your code
---
# Caveats
- some proprietary software do not allow distribution of the output files
- read the license agreement, or take advantage of the work done by VPSI
### https://support.epfl.ch/epfl?id=epfl_eula_conditions
---
# Confidentiality and publishing
can we publish everything?
---
# Confidentiality and publishing
- agreement of all the authors
- anonymize attached data (passwords!)
- licenses changes are HARD! talk to the EPFL TTO
- publish data and code once paper is out
---
# Summary
---
# Things are changing
---
# Before
## unfair dissemination<br>knowledge as object of trade<br><br>
# Before
## irreproducibility<br>sloppy science<br>bad press
# Before
## paper is out<br>science already old<br><br>
# Before
## scholarship beyond publication<br>is considered irrelevant<br><br>
# Before
![alt text](life_cycle-b4.png "Logo Title Text 1")
# Before
![alt text](life_cycle-b4spagus.png "Logo Title Text 1")
# After
## entire research process<br>transparent and accessible<br><br>
# After
## increase cooperation and efficiency<br>therefore impact<br><br>
# After
## change in the way<br>scholarly knowledge<br>is produced, evaluated and disseminated
# After
## ownership<br>back to<br>the scientific community
# After
## knowledge transfer from academia to society<br>is facilitated<br>more trust!
# After
![alt text](life_cycle.png "Logo Title Text 1")
# Go open!
---
# What's next
---
## Versioning and collaborative work
## Documentation and dissemination
## Afternoon workshop: practice with c4science and GitHub