While looking through my box-of-hardware-bits for some stuff I need to put together my RISC-V build farm (a topic for another day), I found an NFC card reader from some time ago. O yeah, I remember wanting to do a little project with that at some point. No time like the present! But just getting to a first commit takes so much boilerplate.

Here’s my initial commit to the (local, private, it’ll be public Free Software for sure, but needs to be useful first) git repository:

nfc$ git status
        new file:   .clang-format
        new file:   .gersemirc
        new file:   .gitignore
        new file:   CMakeLists.txt
        new file:   LICENSES/BSD-2-Clause.txt
        new file:   LICENSES/CC0-1.0.txt
        new file:   README.md
        new file:   src/main.cpp

There’s basically four things there:

  • Documentation (what is this project)
  • Licenses (how to legally use this project)
  • Formatting (how to work on this project)
  • A tiny bit of code.

I can come up with a couple of things that could be in this boilerplate commit (and reasons why they are not):

  • CONTRIBUTING.md guidelines (this is something that Digital Ocean’s Hacktoberfest encourages, and I think it’s generally a good idea to make social norms explicit). Not added yet because it’s a private repository.
  • CI pipeline configuration. I don’t have CI pipelines at home, it’s still at the “runs on my machine” stage.
  • REUSE configuration for exceptions and binary files. This project is still all-text and every file is SPDX-annotated.

I’m sure there’s things I have missed, too. Drop me a note if you have a “well, duh, where’s the whatever” reaction to this list – do restrict it to things for C++ projects, though.

My takeaway here is that there’s a lot of stuff to arrange very early in a project that is totally unrelated to functionality – and I don’t know if application templates (like KDevelop has) would help much, because parts of this is pretty opinionated (formatting, licensing).