I juggle a bunch of projects, both in Artsy and in the Open Source community. If you don't work with me directly, you'd be mistaken for believing that I was an organized person. I'm pretty far from that, and don't really plan on changing that.
However, I work with other people and very strongly believe that programming is mostly a social problem once you're good enough at writing code. It'd be hypocritical of me to not improve the people process side, so I try to automate processes that makes me a better team-mate.
Danger is a tool I co-created with a friend (Felix Krause), and it's namesake, Gem "Danger" McShane. It came out of frustration that we couldn't easily hold ourselves accountable to better team processes. Requiring a code-reviewer to also remember details like "Add a CHANGELOG Entry" isn't much to ask, but it is "Yet Another Thing To Remember" for both the submitter and reviewer.
It's turning into a really important part of our code-review, and the ideas it generates once we had it in place make it fun to add new rules. It means we can fail fast, and not have to think about process so much. Danger will tell us if we've missed something.
I expect to write a more serious post on Danger once it's more fleshed out. For now though, the README covers what it does well.
In every big team I operate in, other people care about keeping the repo clean of merged branches. I totally respect their opinion, but it's so low on things I care about that I just don't register the "Delete Branch" button on a GitHub pull request. I'd rather be finding a good response GIF.
So I created a Safari Extension that handles automatically deleting branches on specific repos for me. It's not a biggie, it's not fancy, it's under a hundred lines of code - but it automates something that annoyed others about my behavior. That counts for something.
I write reasonable commit messages, they're not amazing, they're not terrible. They're just, alright. I wanted to start trying to hold everyone accountable for doing better, so I advocated for copying the person with the best commit style on our team.
Their style is to have commits in a format like
[Context] Thing I did. - it is much better that
Thing I did.. So I looked into how I could automate this, because I would very quickly forget to do this. Here's what I did:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Or if you're a fish user like me, this gist.
I created two shell functions, one that makes a branch that includes a context type. So for example, say I'm working on artwork notifications, I'd start a new branch with
$ branch artwork_notifications Notifications. This saves the context as
Notifications on the git branch metadata. Then everytime I want to commit my changes, I use
$ commit This is the thing I changed. - and it will be prefixed with
[Notifications]. It makes it easier for someone looking through the history to have an idea about the context, and makes me feel like I'm improving my process without remembering the context.
I also applied some standard make commands in our projects so that I can prefix my branches with my name.
1 2 3 4 5 6 7 8 9 10 11
This works by some funky shell work to pull out your current branch into
LOCAL_BRANCH, then to do the same thing but prefixed with your login name for
BRANCH. Then the make commands handle pushing to the server. This means that everyone in the team can provide have logically named branches without having to have their local repo filled with
This is a work in progress, as the mobile team grows, we need to add more process when it's appropriate. This doesn't mean that we have to sacrifice speed, and we can continue thinking about the problem at hand rather than devoting energy to process.
It's a time trade-off that has worked out well for me so far, and I'd love to know other people's hacks for having useful process, but automating it so that it's not considered overhead.