- 1 July 25th, 2021: Project setup
- 2 July 26th, 2021: Fighting Jekyll
- 3 July 27th, 2021: Configuring Jekyll
- 4 July 29th, 2021: Copy Pasta
- 5 July 30th, 2021: POC for Behave
- 6 July 31st, 20201: Define the first milestone
This is the start of my dev diary blog post series, where I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites at the GitHub pages of the project. Many of the subheadings link to the commits in question.
July 25th, 2021: Project setup
Today’s work was mostly preparation for the actual start of the project – or restart, I should say.
Add initial project structure
I copied a bunch of configuration files from my docker4c_test project, which is in turn based on Jason Turner’s cpp_starter_project. I trimmed a few things from the CMake files, e.g. I won’t be using GUI stuff for now, and went through clang-format line by line to adapt it to my style.
I removed all the code and replaced the main program with a simple hello world application. Unit tests are gone, too, all that remains is the catch_main library.
There will be some more setup to be done in the next couple of days, e.g. adding libraries, setting up the behave testing framework, etc. I’ll not set those up right now, but when I need them for the first time.
Setting up the Documentation (no commit)
The one thing I need right now is Jekyll, as I want to have the dev diary and additional documents served on GitHub pages in addition to publishing them on the blog. I spent way too much time trying to get a local preview of the pages. It seems I have overlooked something in the docs or something changed recently – none of the GitHub pages themes can be found.
July 26th, 2021: Fighting Jekyll
I installed Jekyll yet again, fought a few things I overlooked before, but it still won’t work. I’ll leave it as it is for now and open an issue on one of the theme pages as I followed their documentation to the letter. I’ll still have to figure out how to structure the GitHub page, so it might take some time until there’s more than an empty page. It’s a bit frustrating.
July 27th, 2021: Configuring Jekyll
Somehow I still get lured back into setting up the documentation.
Configure Jekyll and add about page
The Jekyll page is now configured to use the Minima theme again, so I can at least preview it locally. On GitHub it still looks bad (no styles, no images), but it’s more than an empty page. The links to the diary posts don’t work yet. There’s still work to do, but frankly, I wanted to do something else than building the docs this week.
I also edited the about page to tell readers what the project is about. The page will also be published on the blog.
July 29th, 2021: Copy Pasta
Take over Jekyll structure from example project
I gave up configuring and breaking things on my own for now and basically took over the structure of a Jekyll starter project on GitHub. Ready to start actual work on the project.
July 30th, 2021: POC for Behave
Just to check that behave works as intended before I dive into writing the first actual feature files for Fix.
Add POC for behave
To test that behave with pexpect is suitable for testing Fix in a BDD manner, I wrote this tiny feature and the necessary step definitions. Those 3 lines document the current full functionality of Fix as it is nothing but a hello world example.
The important part here was to see that the executable can be started and its output and return code captured. The path to the executable is hard-coded to the CMake build directory generated by CLion for now. At a later point, there will probably be an install step in CMake and/or a parametrization of the BDD tests with the directory where it can find the executable.
The logic of starting Fix and where it is located will probably be put into a proper class at a later point. As it is now, there is not enough functionality to make that necessary, so refactoring to that direction would be premature at this point. (And I want to get started with the actual project soon)
July 31st, 20201: Define the first milestone
Today, I defined the first milestone for Fix and started work on the CLI application.
Document first milestone
In the new milestone document, I set a goal of what I want to implement first.
That first milestone may not seem too ambitious, but I’d rather have many small goals than a few big ones: I found that reaching multiple smaller achievements keeps me more motivated over time.
This small goal includes a bunch of hidden things. I’ll have to set up libraries, the basic structure of central classes for the CLI application, the data storage, etc.
In the end, the milestone should be enough to start “dogfooding“: With the ability to create and close issues, I can put down individual steps for the next milestone in Fix itself. It sure will be awkward with that little functionality, but that way I can see what bothers me most and set my next goals accordingly.
Add feature file for basic CLI behavior
The first feature file for actual behavior I want, yay! Before I go into the implementation of actual Fix behavior regarding issues, I want to make sure that the CLI application fails gracefully when it gets bad input.
The step definitions for the feature exist, although I can not guarantee that they are bug-free yet, as all the tests fail early and never reach the later steps. They will be fixed later on.