Around four years ago, a college student named Ryan Seys received a challenge from a friend. It was not your typical collegiate dare. Ryan’s friend instead suggested they both attempt to commit public code to GitHub for 30 days straight. The friend just made it a week, but Ryan hit the goal and then just kept going.
That’s the power of building positive work habits—you make a good habit, and it's easier to keep it going. A GitHub streak, as these are called, are named for streak of color you’ll see in your contribution graph on GitHub when you’ve committed code for a few days in a row. Though GitHub's feature to display your streak publicly was removed earlier this year, the graph is still there. You can still set your own resolution to code more–and then track it yourself.
As Ryan thought through his streak (shown above), he set some ground rules for himself. You can do the same, such as not coding on weekends, or whatever else will help you adopt this new habit in a healthy way.
Ryan’s streak ended at 177 days, learning the ins-and-outs of GitHub, landing a Mozilla intership, and crafting a lot of code in the process. A related Hacker News thread includes many longer streaks, along with discussions about streaks and what counts as a meaningful contribution. Some, as you’ll see below, have questioned whether streaks are useful at all.
For Ryan, and others who attempt streaks, “meaningful” and “useful” are unique to each person.
For many, something has to spark them to want to start a GitHub streak. Often it’s a challenge from a friend to code every day for a month, or the desire to prove they can do it. Even if the challenge comes externally, the motivation needs to come from within. It’s like the classic quote about climbing Mount Everest simply because "It was there."
For Erik Michaels-Ober, the habit came first, before he realized he'd been doing a GitHub streak. His streak was mentioned in the Hacker News thread above as one of the longest, more than 500 days of coding in a row at that point. But Erik first learned about his streak from a tool built by early GitHub employees.
When I chatted with Erik about his streak, he downplayed its external meaning:
“I’m a programmer. I like programming. It’s what I do. [Coding first thing] gave me energy. It was the thing I did to get my day going.”
Erik’s streak ended going several years, but it was an artifact of his daily routine—a routine he kept while camping in the woods, or on days he attended a funeral. A routine that created a streak over 1,000 days long.
For most reading this, committing code to GitHub is not yet part of your routine. Typically, if you seek to streak it’s because you want committing code to become a habit. Finish a 30 day streak, and many will want to keep going. By practicing your craft, you’ll naturally improve. Even seasoned programmers know they can get better at coding. There’s always something new to learn.
In fact, learning a new programming language is another common reason to code every day. Karan Goel’s 844 day streak started because he wanted to learn Python:
"I set a simple goal: I'll do at least one problem in Python every day for 30 days. Why this goal? Because it let me kill three birds with one stone - I learned how to solve problems, I learned Python, and I learned Git. Bam, bam, bam!"
In fact, you don’t have to look very hard for tutorials built around learning a particular language in a set amount of time. There’s no rule that those days have to be back-to-back, but that appears to be part of the fun.
Perhaps the most obvious reason to start a GitHub streak is to impress others. This was especially the case when GitHub promoted streaks on every profile. When one’s entire reason for continuing is extrinsic, that can lead to some negative side effects.
Gamification can motivate many people, whether or not they share the results with others. When tied to other advantages, such as pay raises or even public glory, gamification can go awry. It can invite cheating and other bad decisions.
Earlier this year, programmer Erik Romijn wrote about how the GitHub contribution graph, in particular, is harmful. Within two months, GitHub removed the streak feature, but kept the graph that details a user’s contributions. GitHub also allows users to include private contributions in the graph, which means streaks can now go beyond public repositories. However, the longest streak and current streak that used to display below the graph are gone.
Among Erik's—and others who share his viewpoint—concerns are burnout. GitHub streaks, as displayed with the now-defunct feature, counted every day, including weekends and holidays. In other words, if you took a day off, your streak ended. This is especially worrisome in open source, Erik said, because contributors care deeply, over-commit, and often write open source in addition to a full-time job:
"When I see someone with a 416 day streak, it means they haven’t taken a break for a single day in over a year. Although everyone can make their own choices, it makes me very worried about their well-being."
Additionally, as many have pointed out, GitHub streaks are easily spoofed. Since git, the application upon which GitHub is based, is a distributed system, it relies on timestamps within commits. Anybody can post-date or pre-date git commits, push them to GitHub, and the contributions graph will reflect the fake commit dates. Without examination, streams were essentially meaningless.
"Coding is my art. Dedicating time to it every day and collaborating with an ever-expanding community are the best things I’ve ever done to develop my skill and experience."
If your motives are purely personal, of course, you get to make the rules. You decide what counts for a contribution, which days are part of a streak, and when it’s “ok” to take a break. And that's when streaks are at their best.
Near the end of 2015, Jacob Blakely was freelancing and working on his own projects. He wanted to get hired full time, ideally remotely, so he made a commitment: He was going to make at least one commit every day until he landed that job.
You can see some of Jacob’s streak in his contribution graph. In fact, the visualization goes a long way to communicate a streak. Jacob joined Zapier as a full-time support engineer in May—and he’s working remotely, by the way. After accomplishing his goal, it took him a couple months to kick the streak habit.
Setting a stop date is one way to make your GitHub streak your own. You can also decide which days are part of the streak and which are not. For example, if you’re a full-time programmer, you may want to take weekends off. You can still see your weekday contributions by looking at the middle five rows of the contributions graph. Or, perhaps you’re just learning to code while working a different job. Your GitHub streak could be determined by contributions on the weekends (the top and bottom rows of the graph).
The point is that you get to decide what makes your streak a streak. For you, it could be X days per week, Y days per month, or whatever criteria you want. In the spirit of making your GitHub streak your own, you don’t even need to use GitHub to track it. Heck, you don’t even need to use GitHub if your goal is simply to code every day. All you need is a way to quantify your contributions, and keep track of them.
By now you‘ve decided to make a GitHub streak goal for yourself. Congrats!
If you’re aiming for a classic GitHub streak (counting all days), there’s an easy way to re-activate GitHub’s feature. Using a browser extension, you can make streak information appear on GitHub profiles. Of course, since it’s a browser extension, it’s local to your machine and won’t display your results to others. Also, since it processes the visual contribution graph, it only tabulates the last year of data.
Now that you’ve decided to commit to a GitHub streak, you need a way to remember on the days you’ve chosen to write code. Unsurprisingly, developers have already written code to solve this problem. You can send yourself an SMS or email yourself so you don’t forget to
For your own custom tracking and reminders, you could try rolling your own with Zapier.
Get new articles about API design, documentation, and success delivered to your inbox.