Recent experience of programming

· Read in about 1 min · (128 Words)

During the past three months, I’ve wrote two tools (SeqKit and csvtk) and extended few packages (bio and util), all in Go language.

Here are some experience I’ve got.

Code organiztion

src           # source code
docs          # documents
tests         # tests
benchmarks    # benchmark results
examples      # examples

LICENSE
README.md

Version control

  • Use git.
  • Create a repository on Github.

Documents

  • Write annotation for all public variables and functions. Use lint tools to check this.
  • Duild a project website (mkdocs/hugo) and host it on github.io.

Tests

Very important!

  • Unit Test.
    • Cover all functions, especially the frenquently used packages.
    • Use test tool of the programming language.
  • Function Test.
    • Use automated tools, e.g. ssshtest - Stupid Simple (ba)Sh Testing - A functional software testing framwork

Automation

  • Packing release files.
  • Automated testing.