At the time of writing, I'm on day 68 of my longest GitHub streak yet. It's been the most productive 2 months ever, and I intend to keep the streak going for as long as possible. My secret weapon? The concept of the GitHub streak itself.
Many people have blogged about this before, and for good reason. I'm convinced that the "Seinfeld Streak" is one of the most powerful techniques you can utilize to increase your productivity and develop good habits.
Whatever you do, do not break the chain. It may seem like kind of a silly idea on the surface, but in practice, I've found it to be incredibly motivating. GitHub is already keeping track of my streak, so my goal is just to keep that number increasing every day. If I miss a day, my streak will go back down to 0 and I'll lose all of my progress. That knowledge is all the motivation I need to push code every day and maintain my streak.
The nice thing is that the rules for what counts as a contribution are fairly liberal. Essentially, any commit you make to the default/master branch of a repo will count towards your streak. Creating an issue or a pull request also counts. I think this is a nice balance between requiring quality activity (not just, say, writing some bad code in an experimental fork which you will later delete) and not being so demanding as to be intimidating. The result, should you choose to become a GitHub streaker, is a low-stress habit that keeps you programming and thinking about programming, and maybe will even get you to finish some projects you didn't think you had time for.
Like any good habit, working on open source projects is something we often don't feel like we have time for. But in reality, we have plenty of free time -- it's just that we often end up spending it vegging out in front of the TV, or spending inordinate amounts of time doing nothing in particular on the internet. I've found that all it really takes to be successful in following these habits is having a self-imposed requirement to do them.
The most surprising thing about my experience so far as a GitHub streaker is that I've actually found myself becoming more of a morning person. Whereas before, my tendency would be to sleep in until an hour or so before I need to be at work, maintaining a streak of GitHub activity has made me realize the value of the morning hours before work. You may have heard that the creative mind works best first thing in the morning -- I've found this to be true. Sometimes an obvious solution to a problem will just come to me, seemingly out of nowhere, if I work on it right after waking up. The result of being awake earlier is that I get more things done in the morning, giving me more free time in the afternoon and evening.
Additionally, having all of your code "out in the open" on GitHub can serve to motivate you to write code that is clearer and easier for other people to read and understand. I think this is the essence of being a good programmer.
When you have more time in your day dedicated to writing code, you may find yourself branching out and making contributions to others' repos. That's one of the beautiful things about GitHub, and it's sadly neglected when all you have time for (or so you think) is working on your own projects. You'll find that being an open source contributor really doesn't take as much time and effort as you might think. If you're ever using someone else's library and you find yourself thinking, "this library is great, but I wish it had feature X," and you start coding a work-around in your project to implement feature X on top of said library, stop and consider whether it might make more sense to actually contribute feature X to the library. If you think about it, it really doesn't take much more time than writing the feature into your project, so you may as well go ahead and fork the library and make a pull request!
Open source software developers are constantly making cool new things, creating new tools that other developers can leverage to speed up development on their own projects and libraries, and the cycle continues. In this way, OSS developers can empower and inspire each other to be productive and Get Shit Done™.
As I mentioned, creating a new issue on a project counts toward your GitHub activity for the day. This can be an easy way to get your activity in for the day if you're crunched for time. Maybe you're working on a new feature, but it still needs some work and the tests aren't quite passing yet. If you don't think you'll have time to finish it that day, you can do the next best thing, which is to spec it out in the form of a GitHub issue. This may seem like a cop-out to some, but it can actually be very helpful. As you write out your ideas for this feature, you might have a revelation, get some new ideas, or at least come up with a solid game plan for implementing the feature.
It has obvious benefits for collaboration on a project, in that it allows collaborators to articulate their thoughts on specific issues and discuss the direction of the project. But I've even found it useful for projects that I'm working on by myself. GitHub issues often serve as a way for me to hold onto thoughts about how to fix bugs or ideas for features I eventually want to implement. If I didn't have some method of documenting this information for my own later use, I would probably lose track of at least some of it by the time I end up working on the project again, which could be days, weeks or months later in some cases.
The more you browse other people's GitHub repos, the more examples you'll find of novel things to put on GitHub. For the purpose of maintaining your streak, making repos for things works in your favor, even if they're for things you wouldn't have otherwise thought deserved a repo.
There are endless ways to customize certain pieces of software.
Are you working your way through a programming book? Learning a new language? Learning to do a new thing, like building a web app in Clojure? Make a repo to document your progress! You'll probably end up paying more attention to the code you write, and you may even inspire other people to learn what you're learning.
If you're ever looking for new projects, a good standby is to take a library that interests you, but lacks support in a given language, and write your own language-specific library. As an example, one of the projects I'm working on involves interacting with mpd with Clojure. A quick google search showed me there was a Java library for this called javampd, and someone had started writing a library for more idiomatic use of mpd in Clojure by wrapping javampd, but it needed some fleshing out. So, it turned into a perfect opportunity for me to contribute to OSS.
Speaking of Clojure, Boot has been all the rage lately. Boot's concept of tasks opens up an exciting new world of possibilities to give you more control over your development workflow. There is already a wealth of useful community-contributed Boot tasks, but there is always room for more, and this is of course a great opportunity to be an open source contributor. If there is anything you can think of that you do all the time when developing software, that can be automated, and that there isn't already a Boot task for, well, maybe you should try your hand at writing one!
Hopefully I've convinced you of the benefits of letting your GitHub streak motivate you to write code every day. Have fun, branch out, and remember - whatever you do, don't break the chain!
Dave is a Software Engineer at Kevel, where he uses Clojure and ClojureScript to build UIs, APIs, and backend services. He is also the creator of the Alda music composition programming language.