Format the Code (Good Style)
Programming computers to do cool science is a major advantage for modern scientists. But, developing research programs that are transparent, collaborative and reproducible is a major advantage for science. All data scientists can contribute to this goal by writing their code in easily readable, well described, and well commented scripts.
This script, which evaluates tree composition in a Michigan swamp, doesn’t follow good style. It works, but it’s difficult to understand exactly what it is doing.
- Download the script.
- Take a minute to understand what is going on.
- Modify the code so that it still does the same thing, but is easier to read because it has better style.