General Coding

Method Development

Development:

  1. Implement unit testing for novel method codes.

  2. Write documentations! A usage example is always a plus.

  3. Keep data compilation scripts well-maintained, and log/store intermediate results.

Releasing:

  1. Provide a test dataset.

  2. Provide a setup requirement file, or conda/pip environment.

  3. An interactive demo in Google Colab is great, depending on the specific project.

Data Analysis

  1. Use jupyter notebook whenever and wherever you can.

  2. Clean up your Jupyter notebook! Consider using a Table of Contents.

  3. Provide processed data files as a downloadable Tarball, so that all Jupyter notebooks can run without raw data processing. Consider using Google drive and google-drive-downloader.

Python

  1. Use black to format your code for better Python code readability.

  2. Write unit-tests, and check code coverage by Coverage.py.

R

  1. Use R Vectorization whenever possible; avoid for-loops.

  2. Use tidyverse as a workhorse for data processing.

  3. Write functions to reuse code; be aware of R's global namespace pollution.

Last updated