3 ms·
I started a few months ago a personal home finance manager which includes other nice things - in Flutter (!!!). Then I decided to switch to Python and Qt becaus
by mk89 4y ago
I started a few months ago a personal home finance manager which includes other nice things - in Flutter (!!!). Then I decided to switch to Python and Qt because Flutter for desktop is still not a thing, and finally to c++ and qt6, because on my Mac a simple app took a lot of time to boot (> 5 seconds) and an idle window, not hello world, was using 70MB of ram. Blame it on pyinstaller or whatever other reason, well, it's then that I decided that for my own hobby project without (paid) deadlines I don't have to follow trends like Electron or easier alternatives like PySide just to "deliver something". I want to provide a low-memory low-cpu usage alternative and possibly something I can also install on mobile as well.
I always wanted to learn C++ and never got the chance to use it for work, so I started reading the most significant books and resources suggested by [0], including learning how modern projects do things - on this, Jason Turner's template comes handy.
In the beginning it was tough, and at times it still is, however I am getting more and more familiar with the way things are done.
At first I chose Meson for "simplicity" but it took me a while to realise that Cmake is actually pretty easy as well, so I switched to Cmake and started using Conan.
My project setup is slowly converging to [1] - I couldn't just use it without having any knowledge about c++.
I am happy that someone packaged a lot of good and modern practices in such a repo. (I know they are good because the approach is quite common with other languages/technologies too).
There is way more to learn than with other languages, but it's interesting. Plus, i watched one or two videos from the creator of the language, and I like his philosophy of "freedom", which I believe is one of the main issues nowadays with c++, as most developers just want a prepackaged set of tools and APIs to develop and deliver fast, without thinking too much - c++ clearly doesn't get along with this type of developer.
The project consists of:
- C++20 with Clang
- clang-format
- clang-tidy
- project_options with dev mode and other sanitizers on
- Cmake/ninja
- Conan
- lots of nice things provided by the
- catch2
- qt6
- TOML for internal configuration
- Sqlite3 for DB
- github/actions for CI/CD
I still haven't use Valgrind, still an amateur afterall:)
[0]: https://github.com/rigtorp/awesome-modern-cpp https://github.com/rigtorp/awesome-modern-cpp
[1]: https://github.com/cpp-best-practices/gui_starter_template https://github.com/cpp-best-practices/gui_starter_template