Better Code, Better Science

Software Engineering for Reproducible Science in the Age of AI

Author

Russell A. Poldrack

Welcome

Welcome to the web edition of Better Code, Better Science.

Making science more reproducible and transparent is key to improving public trust in science. Because science is increasingly a computational enterprise, improving the quality of scientific research code is essential to making science more reproducible. Increasingly, this code is being written with the help of AI assistants, which can increase productivity but introduces the potential for errors. This book will provide a thorough guide to using AI-assisted coding techniques to generate scientific code that is readable and robust and that can provide reproducible answers to scientific questions.

The book is licensed according to the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 Generic (CC BY-NC-ND 4.0) License. Please see the terms of that license for more details. Code snippets are licensed under the MIT License. The full code is available at https://github.com/BetterCodeBetterScience/.

Acknowledgements

I’d like to acknowledge the following individuals for their helpful comments/suggestions/pull requests on the book: Giorgio Arcara, Steffen Bollman, Joshua Buckholtz, Kilian Cavalotti, Satchel Grant, Yaroslav Halchenko, Chris Markiewicz, Jeanette Mumford, and John Ousterhout.

AI usage statement

All narrative text in this book was human-generated. Generative AI tools were used for research and technical review.

Code presented in this book was generated via human-AI collaboration, using a combination of chatbots, IDE autosuggestion, and agentic coding tools.