Re: "Ideal" design and workflow for VCS
Posted: Wed Jun 12, 2019 8:10 am
Reexamining these rules is proving to be interesting! I'm actually very good at working on one issue at a time, except... except what?Solar wrote:Happens for me as well. The trick is to discipline yourself and...
a) Work on one issue at a time only. Don't let the scope creep, and start by thinking about "what will this look like as a change set, and what would be the comment?".
b) As soon as you resolved that issue, commit. Do not continue to add other tidbits to the same change set. You've reached a point of stability; snapshot it, like you would in a game.
As long as you follow those two rules, it doesn't matter if "work in progress" sits in your working directory for a while. (At least, not until someone else touches the same pieces of code and you have to start merging changes.)
What prevents me from looking at what I previously did before resuming work? The fact that ideas come to mind when I'm away from the computer. Can I mentally save them for later or throw them away? Not really, many are major clarifications of concept or development of intermediate goals. I imagine you have much less of this if you're working to standards or a preexisting design, or if you just select goals from things you already understand. I have very little code at this stage, it's mostly prose and bullet points. I have code for a text editor which is helping show up what's good and bad in the design, but other than that it's all slowly crystalizing ideas. They are crystalizing, there is improvement and greater detail over time. Sometimes I forget something important and write down a lot of infeasible plans which have to be reverted, so history would be useful.
So... is there any reason I can't commit my prose? Coming up with a commit message could be painful: I've just worked very hard to distil my ideas, and now I have to condense them again? A vague commit message may be better than none: I could produce accurate commit messages when I can, vague when I can't.
Now, when do I commit? I do reach points where I'm satsfied, I could commit then. It's harder if I hit a fatigue wall, walk away, and then come back 3 days or 3 weeks later thinking about a whole different topic which I want to write down before I get confused. I can't pick over my old changes. What if I discipline myself to commit when I get up in the morning? Well, some days I'll be too fatigued. On some of those fatigued days I'm going to try to pick over my changes "to produce a good commit" without the ability to think clearly, which will make things far worse than if I wasn't committing. If it's auto-committed or versioned or dumped during the night, that can't happen.
To summarize:
- I've already got the discipline to work on one thing at a time
- With my health, manually committing carries a significant potential for disaster
Now I've finished this, I remember I worked all this out before. I suppose it's good to reexamine one's convictions every once in a while. I often come to stronger conclusions after a challenge. On that note, I'm off to reexamine some of my actual religious convictions.