One of the real joys of coding is writing silly little things that remove a tiny task.

This one copies the name of the branch to your clipboard from the command line.

I popped it in my .zshrc as I use zsh

#.zshrc

alias copybranch="git branch | grep '^\*' | cut -d' ' -f2 | pbcopy"

No idea if I figured out that one-liner or just found it on StackOverflow but it brings me a little bit of joy every time I use it.

--

--

Having people of mixed experience can be a great learning experience for both more and less experienced developers.

The less experienced developer might get some guidance on different ways of approaching a problem and gained confidence from seeing someone much more experience also struggle.

The more experienced developer might gain insight from the question’s asked and get a glimpse outside of their own expert context.

But one thing will ruin this wonderful chance. That is the more experienced developer grabbing the keyboard.

Even if you have to just tell them every character to type this is preferable to you disempowering them by taking their tools away. They can’t even be trusted to type what you tell them to.

This is hard, but sit on your hands, or bring a fidget toy, just stay away from their keyboard!

--

--

When trying to reproduce flakiness I used to just manually run the test x times from the command line and count how many times it had failed and what the errors were.

Doing it in the code saved me a bunch of time.

# original
it "is tells us it happened" do
user = create(:user)
visit "/"
click_link "make it happen"

expect(page).to have_content "it happened"
end


# run it loads
context "when testing for flakiness" do
20.times do
it "is tells us it happened" do
user = create(:user)
visit "/"
click_link "make it happen"

expect(page).to have_content "it happened"
end
end
end

--

--