Learn from the pros - don't reinvent the wheel. ⢠Adapt a coding ... An experience report on teaching software development to bioinformaticians www.isb-sib.ch.
m
r
Li c
C om e de
Pe r
C om
rC
m
on
s
re at iv
ed
itt
m
tiv
e
un
re a
ed
rC de
tiv
e
un ed
Write Unit Tests
m
ns e
Po st e
.F
Use Version Control
itt
10
00
rs :U se
A course to teach software development skills....
re a
Po s
Pe rm
te
itt
Swiss Federal Institute of Technology Zurich, University of Lausanne, University of Zurich and Swiss Institute of Bioinformatics
C
rs
.F
10
:U
00
se
Patricia Palagi, Franz-Josef Elmer, Frédérique Lisacek, Chandrasekhar Ramakrishnan, Bernd Rinn, Marc Robinson-Rechavi, Hannes Schabauer, Milan Simonovic, Jakub Straszewski
rC
te
Po s
An experience report on teaching software development to bioinformaticians
en se
• Easily mark known-to-be-good / published versions for later use
• Run tests often so changes do not break what worked already
se
00
ed
U
itt m Pe r
ed
:U
00
se
rs
te
se :U
00
ce Li
10
s on
e. F
rs
Po s
ce ns
te
m
om
C
re
on
s
• Send us your code in a language that you use
10 00
at iv
Li
e
In result the structure of the course has changed.
Structure consisted of talks and exercises done by students in groups. All exercises were prepared by tutors and written in Python. However participants, who didn’t know Python couldn’t fully benefit from the course. That was a motivation to introduce support for multiple programming languages.
• During one session split into groups with one tutor and few students
00 .F 10 Li ce
on s m
re
Next Course
rC
m
itt
ed
at iv
e
un
C
de
...to cover their myriad needs.
om C
de
Location: Bern, Universität Bern
un
ns e
om
rC
m
on
s
re at iv
Li
e
ce
C
• Focus on following the best practices
21-23 October 2013
Pe r
re
at iv
e
http://edu.isb-sib.ch/course/view.php?id=139
itt ed
se
U s: er
ns e
m
om
rC
de
un
itt ed
rm
This time the talks and the demonstration day was followed by the day of code clinic session. For the code clinic we used the real-life code provided by the participants, which we improved in small groups consisting of a tutor and few students. We learned that the technical setup for Matlab needs extra attention.
... to be continued...
.F
• Work with the tutors on your code during code clinics
Pe se U s: te r
Po s
ns e
m om C iv e
at
re
rC
Pe
Po s
After the first version of a course, people left the feedback, that the prepared examples were too far off from their actual problems, and would prefer to learn how to apply the best practices directly on their own code.
The course (1st time)
The course (2nd time)
Sep 2012
Oct 2013
“I want to work on my own code”
As the result of the discussion during SIB days people agreed that there is a need to improve the quality of the code and software produced by the scientific community. The idea of 3-5 day course was proposed, which could be prepared by volunteers from SIB community, and cover topics of version control and general organisation of development process.
de un d itt e
rm
Nov 2011
:U
00
.F
on
s
10
Li
e
at iv
rC re
de
For this diverse and heterogenous audience, we structure the course...
The motivation for this course
Jan 2011
m
te
ce n
Po s
• Best done in concert with unit testing
.which came about as a request from the Swiss bioinformatics community.
History
itt
rs
F1
se .
• Be sure you dare to add a function when you need to
Pe r
s
on
m
C om
understand, fix, extend, port, speed up, refactor
• Keep your code in good "health state"
• Make it crystal clear what your program does
• Adapt a coding standards that prevents common types of defects • Code should be easy to:
un
0
Li
• Learn from the pros - don't reinvent the wheel
se
Refactoring
ce
Dos and Don’ts
Po s
ns e
m
.F
te rs :
s
on
• Collaborate on code
un
• Find bugs early before they can have impact on a publication result
10
Li
• Find when a bug has been introduced / fixed
de
Pe r
• Write tests to check your code works with given input
ce
• Version control systems allow to keep track of project history
om
C
un de rC
m Pe r se :U
rs
Best Practices in Programming
www.isb-sib.ch