Often when I’m developing if I need to do something I’ve never done before, I’ll create a quick program to test it out. I don’t want to write up a unit test because I’m not even certain if what I’ve done will compile. It’s what I call a scratch pad test. Just something to get me started figuring the problem out. To accomdate this in platformio I usually have a separate “scratch” environment with a single cpp file that I will rewrite with whatever new thing I’m trying. I’m wondering if that’s the best practice, or if there’s something that will work better for this use case.
If I’m in a situation like this, I create a folder for “Wonderings” and create separate mini-projects within there for anything I’m trying out to see if I can make it work. Then I have a whole lot of examples for when I need to do it again and I’ve forgotten what I did last time!
I used to do this at work as well. Anything I’m unaware of, or new to, I would do a couple of quick experiments, gets things working and then document them for future use by me and my colleagues. I used to set up Dokuwiki systems for my colleagues if the company didn’t already have such a thing. Sometimes even when they did as the “official” one was too arduous to use – some of the commercial ones are dire examples of how not to use collaboration! No names though!
There’s no real “best practice” just what works best for you, but my one piece of advice is, document whatever you find. In a notebook, in a Wiki, on a Blog, somewhere. You have no idea how useful it can be. (And in the future, when you have gathered copious notes, you could even get a book out of it!)
HTH
Cheers,
Norm.