Good coding-practices-for-scientists-jan-2014

Preview:

DESCRIPTION

Motivating why scientists need to think about coding quality. A small introduction to test driven development as a way to enhance code quality in scientific projects.

Citation preview

Siv Midtun Hollup

”I know exactly what code I need to write”

”Coding is easy.”

”I’ll just add another function instead of changing the existing one.”

”Don’t fix it if it ain’t broken.”

Correct results

Efficient code

Extendable code

Results as fast as possible

As little code as possible

”A scientists’ nightmare: Software problems leads to five

retractions” G. Miller, Science (2014)

”Deriving chemosensitivity from cell lines: Forensic bioinformatics and reproducible research in high-throughput biology”

KA Baggerly et al, Annals of Applied Statistics (2009)

”Scientific software development is not an oxymoron”

”Publishing scientific software matters”

”Best practices for scientific computing”G. Wilson et al, PLOS Biology (2014)

SM Baxter et al, PLOS Computational Biology (2006)

C. Pradal et al, Journal of Computational Science (2013)

To rewrite existing source code in order to improve its readability, reusability or structure without affecting its meaning or behaviour

”Testing takes too much time.”

”It’s too hard to test.”

”I can’t possibly test everything.”

”Test-Driven Development: An Empirical Evaluation of Agile Practice” Lech Madeyski

Correct results

Efficient code

Extendable code

Results as fast as possible

As little code as possible

Clean Code, Robert C. Martin (Uncle Bob)

Test Driven Development, Kent Beck

Refactoring, Martin Fowler

Working effectively with legacy code, Michael Feathers

Introcing TDD and why it’s a good idea, Evan Dorn http://www.youtube.com/watch?v=HhwElTL-mdI

Estimation and deception, Linda Rising http://chariotsolutions.com/podcast/ete-2010-session-9-linda-rising-deception-and-estimation/

TDD in action (Roy Osherove) http://www.youtube.com/watch?v=xX9hfPkA800

Practice coding and get feedback: http://www.exercism.io/

Online courses (subscription): http://www.pluralsight.com/

Recommended