For my second project, I wanted to get closer to my original goal - to learn a new language every week. Therefore, this week, I took a look at a language I’ve heard a lot of good and bad about: Go.

Go at first looked like javascript and python had a baby with C. The fact that Go is a compiled language–a rarity these days–intrigued me. I had never really used one extensively before for a project and this felt like the perfect excuse to try.

After a week, I can say that Go has its quirks. In fact, I wrote a whole blog post about them.

So, what did I write?

Every day, I push code with git at least 50 times. Usually, I run something like git push origin master, a full 22 characters. There had to be a more efficient way to push code. Am I lazy? Maybe. But, efficiency matters. I tried some fancy shell aliases, and while they were ok they never really worked quite right for my needs. I figured this would be a perfect opportunity to write a solution.

Enter PH.

PH is an app that makes git push easier. Remember git push origin master? Instead, do ph om. A full 18 characters shorter. Need to do something a little more complex, like git pull origin branch -v? Simple, just do ph lobv. Enough with my convoluted examples, here’s it in action:

PH in action

How can you use it?

Installation instructions are in the README.

How did I do?

I was able to gain nearly 80% test coverage, but the only thing keeping me from 100% was that I couldn’t find a mocking library for Go that worked for me and was intuitive.

Go gets a lot of things right. Pointers are done sensibly. Types are easy to understand when reading the code and have helped reduce errors as I work. Therefore, will I be using Go everyday from now on? Yes and no. Once Go has an official package manager and has matured as a platform, then I can see myself really getting into it.