I struggle with the same naming and versioning challenge when doing coding puzzles like Advent of Code. On the one hand I’m slowly improving and optimising my solution by trying different approaches, and doing the usual regular commits on a single file. And on the other hand, it seems like with respect to the context of being code puzzles and exploring ideas, it’s useful to keep all the versions around named like you’ve done here.
I’d love to have a clean way to manage these two layers of versioning together!
I used to struggle in the same way with kaggle competitions. Whole parts of my pipeline would change, but wanted/needed to preserve each pipeline independently for ad hoc experimentation. I used parallel dirs in the git repo.
…
In a git repo is physically painful to see
The ideas is to see the progression as the code is optimized away for readability toward performance.
You’d prefer the files to be named meaningfully? Or you’d prefer to use “git diff” to see changes and have a single copy?
The risk is a new version has a good idea, but is slower. It should not be the canonical version, just a stepping stone.
Yes. Let git do it’s job.
I think you made the right call. Especially if the intent is to show it to other people.
These guys are pedantic. No way in hell are you going to convince me to go and do git dif in an article/educational post lol.
I struggle with the same naming and versioning challenge when doing coding puzzles like Advent of Code. On the one hand I’m slowly improving and optimising my solution by trying different approaches, and doing the usual regular commits on a single file. And on the other hand, it seems like with respect to the context of being code puzzles and exploring ideas, it’s useful to keep all the versions around named like you’ve done here.
I’d love to have a clean way to manage these two layers of versioning together!
Good point.
I used to struggle in the same way with kaggle competitions. Whole parts of my pipeline would change, but wanted/needed to preserve each pipeline independently for ad hoc experimentation. I used parallel dirs in the git repo.
Branches are the answer.
Agreed. My git fu was weak in 2010.