On Motivation & GitHub
Never underestimate the importance of momentum.
I came down with a severe headcold this past weekend. On the one hand that's good timing; I couldn't have afforded to be as thoroughly out of commission as I was during the cohort, so if I had to get sick this winter, that was the time.
On the other hand, though, it took the wind right out of my sails. Launch Academy is really good about instilling a diligent mentality in all of us. 'Always be coding' is an oft-repeated mantra. And it's easy to understand why: we learn a lot, in a very short period of time. If you don't keep using it, don't continuously reinforce it, it's only too easy for it to slip away.
There's more to it than that, at least for me. I have become a big fan of the so-called Seinfeld Strategy (as advocated by Charlie McDonnell, among others.) It's a fairly simple idea, not at all new, and it can be summarized thusly: don't break the chain.
Do something you want to do. Do it every day. And take note of it. The more days in a row that you do it, the easier it will become -- and the more compelled you'll feel to keep it rolling, and not break the chain. Momentum, as I mentioned at the top of the page.
At least one git commit a day seemed like a reasonable bare minimum to me. An easy chain to start, and an important one to keep me always coding. And hey, would you look at that: if you push those commits to GitHub, it will keep track of the chain for you.
... Or so I thought.
Turns out, GitHub only counts commits towards your streak if they are pushed to master (or whatever your default branch happens to be.)
I ran into this exception head-first while working on my current project. I had all of the basic functionality up and going; the next piece I wanted to do was a fairly major undertaking.
So, in keeping with my standard workflow, I checked out a feature branch and got to work. And at the end of the day, the feature wasn't done yet. So I didn't merge it; just pushed it, as it was on its own feature branch, to GitHub, and figured that I had logged my commit for the day.
Except I hadn't. If you look at my GitHub profile right now, my line of green isn't exactly unbroken. Just the opposite. And all because I hadn't been pushing to master.
So what's a budding coder to do? Change my workflow? Seems drastic. Ignore GitHub's nicely built-in feature and track the chain on my own? Impossible (the ignoring part, anyway. My compulsive brain won't let me.) Take this as a sign that the feature is too big, and I should break it down into smaller pieces to develop? ... Possibly.
I haven't settled yet. But I know something today that I didn't know yesterday. And that's another important chain I'm keeping in mind.
UPDATE: Apparently, if you subsequently merge the feature branch to master, and push the merged master up to GitHub, the commits get counted on the days they were made. So the chain is broken until it isn't, retroactively. Weird.













