How to Prettify git diff Output with Diff So Fancy

I find it quite hard to make sense of the output from git diff. It is somewhat off-putting and ugly for me. diff-so-fancy is an open source project to solve this problem and help make your diff much less uglier. Installation There are a lot of ways to install it but I prefer to install all my tools with Brew. So run the following in your terminal: $~ brew install diff-so-fancy Configuration To use diff-so-fancy, you have to set it up globally.
Read more →

Viewing Diff Since Latest Git Pull

Read more →

On Writing Unit Tests

I would consider that I am a beginner at unit testing but these days, I started writing it much more frequently and I am quite proud of it. I noticed that it actually helps me to notice regression early on and as well as helps me to understand how the components work together. I also learned ‘the hard way’ how hard it is to start writing unit tests for an existing project that have 0 unit test.
Read more →

Go Examples and Benchmarks

I learned about Go examples and benchmarks today. They are parts of Go default package testing. Examples Go Examples are executed just like tests They are compiled and optionally executed as part of unit tests It resides in the package *_test.go files Structure func ExampleRepeat() { repeated := Repeated("x", 5) fmt.Println(repeated) // output: xxxxx } Rules Function name must be prefix with Example It must have // output: result How to Use to run the test with example, use: go test -v Sample Execution $ go test -v === RUN TestRepeat — PASS: TestRepeat (0.
Read more →

On Jotting Down

Read more →

Setting Up $GOPATH

Read more →