A couple of years ago, Julia Strand was trying and failing to replicate a study she’d published. At the time, she was an assistant professor without tenure, and the original study had presented her most exciting finding to date. But when she and her co-authors tried to replicate it, they got the opposite results. Then one night, Julia discovered why. In her original code, she’d made a tiny but critical error, and now, with her reputation and job on the line, she was going to have to tell the world about it. Science is often said to be “self-correcting”—through peer...