Passion. Creativity. Courage. Technology.

The official phogo journal

Extending reflect.StructTag in Golang

Presently, Golang has limited support of reflection comparing to the mainstream languages like C# and JAVA. It’s not intended to match or beat that languages. In practice, we are using StructTag to add some metadata for the defined struct fields. Such an example is json package, where you can customize the field marshaling. In example below, we customize the json representation of User struct fields: type User struct { ID string `json:"id"` Name string `json:"name"` CreatedAt time. read more

Chicago Classical School vs London Mockist School

In the practice of modern TDD two main schools of thoughts among TDD gurus have emerged. Let’s start by comparing the differing characteristics of each practice and present the key proponents of each approach. As a first oversimplification, we can broadly describe “classical TDD” as “bottom-up” and “london mockist” as top-down, as the name suggests mockist school relies on mock objects (actually doubles but who cares?) to test interactions on the unit level. read more