Wasser (a German word means “water”) Photo by Jonathan Kemper on Unsplash

This is the second article of my practicing SRE series.

In the previous article SRE Onboarding, I discussed the concept of SRE and how SRE could help in the context of my current organisation. This article is a follow-up, a collection of tips I want to share after setting and fixing of our alerting system.

Motivation

Our current alerting system is based on Prometheus with Alertmanager. As I mentioned in the previous article SRE Onboarding, the alerting system was half-broken:

  • low readability: some alerts do not contain the information we need, whereas some alerts contain too much useless information
  • low quality

I am fascinated by reliable tools like this one! Photo by Michael Dziedzic on Unsplash

This an article of my practicing SRE series.

Motivation

Recently, I start to study Site Reliability Engineering (SRE) practice, since I have observed problems in my current organisation and I believe SRE could provide a solution.

I have read the SRE and SRW book from Google, mainly the sections of principles and how to get started. The goal is to summarise into a brief and informative presentation to introduce SRE to my team.

It consists of five parts: problems I observed, what is SRE, key concepts of SRE, how SRE could help and how to get started with SRE. To make…


Is this Doing Agile, Being Agile or Playing Agile? Photo by Wai Siew on Unsplash

Motivation

Recently I have accomplished a three months training of Agile Software Development. Throughout the training, I realised I had some misunderstandings about Agile as a programmer who just want to deliver beautiful intellectual masterpieces.

Therefore, in this article, I will try to clarify some parts of Agile that are relevant and meaningful to programmers (or any role Agile framework would categorised as team member). Hope this will let more people “Being Agile instead” of “Doing Agile”, which is used to describe the activity of doing window dressing without applying the core values.

BTW, I am designing a board game named…


Together. We Create! Photo by "My Life Through A Lens" on Unsplash

Motivation

Recently I have accomplished a training of Agile Software Development. One thing I really like is the Agile Manifesto. It use four short but powerful paired terms to express the value it promote concisely. Each paired term consists of a left value and a right value:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

That is, while there is value in the items on the right, we value the items on the left more.

Manifesto for Agile Software Development

An idea just popped…


An ordinary error. Photo by Sarah Kilian on Unsplash

Motivation

Recently I was working on refactoring and developing a long-running worker application written in Go. It will basically loop over a task list and do something. But I found out that the main process will panic and exit if one task encounter some unexpected failure. This is not acceptable because the tasks after the failed one would never get chance to be executed.

Trying to fix the problem, I realised that I don’t really know what error is and what options do I have for error handling. Therefore, I have spent quite sometime to investigate and summarise into this article.


When was the last time you took a quiz? Photo by Jason Sung on Unsplash

Here is a quiz of == (equal operator) in Go, if you pass all of them, you could skip this article. Otherwise, you may want to check the explanation below.

Quiz

Assume the statements of every quiz is inside of a separate function body. For brevity, I will skip the function signature.

// 1
a := []int{1, 2, 3}
b := []int{1, 2, 3}
fmt.Println(a == b)
// 2
a := [3]int{1, 2, 3}
b := [3]int{1, 2, 3}
fmt.Println(a == b)
// 3
a := [4]int{1, 2, 3}
b := [4]int{1, 2, 3}
fmt.Println(a == b)
// 4 a :=…


Motivation

A note for myself and for anyone who want to edit text more efficient.

Notation

Command ⌘ | Shift ⇧ | Option ⌥ | Control ⌃

Basic

  • Command-X: Cut the selected item and copy it to the Clipboard.
  • Command-C: Copy the selected item to the Clipboard.
  • Command-V: Paste the contents of the Clipboard into the current document or app.
  • Command-Z: Undo the previous command. You can then press
  • Shift-Command-Z: Redo, reversing the undo command.
  • Command-A: Select all lines.

I also want to point out CLI command pbcopy will copy the stdin to the Clipboard, whereas pbpaste will paste from the Clipboard, illustrated…


A (Mountain) Range (Highway) Loop. Photo by Dan Meyers on Unsplash

This is an article of my go deeper series.

Motivation

The other day, I tracked down a bug when I was trying to use for range loop over an array and get the pointer of the element in Go. The following is a simplified version:

This will yield the following output:

$ go run buggyLoop.go 
Dog with name <{Ghost}> and pointer: <0xc000010200>
Dog with name <{Bruno}> and pointer: <0xc000010200>
Dog with name <{Lucky}> and pointer: <0xc000010200>
dogPtr with name <Lucky> and pointer: <0xc000010200>
dogPtr with name <Lucky> and pointer: <0xc000010200>
dogPtr with name <Lucky> and pointer: <0xc000010200>

Notice that in…


I wish I could sleep like this, maybe even hibernate. But that’s too Java. Photo by Daniele Levis Pelusi on Unsplash

Motivation

Better than error-driven

Recently I joined a company as IT Architect. The project I am involved is to evolve, design and implement a service written in Go which will run 24*7. In the previous version, there is zero test coverage. I believe people back then just deploy it and manually interact with it to see if it smokes, as one of mine colleague described, “it is error-driven”. I don’t feel well with this.

Test-driven learning

As a new joiner, despite of clarifications from my excellent and enthusiastic colleagues, there are still some blurry parts in our domain model and design choices confuse me a lot…


Broccoli as an example of recursive pattern (it is hard to find a pic of “history”). Photo by Elena Mozhvilo on Unsplash

This is an article of my go deeper series.

Motivation

The other day, I was solving a leetcode question. I was using Python, but somehow, I can not pass the OA, although it ran pretty fine in “run code against your own input”.

Long story short: I decided to use Go to write the solution. While trying to write a helper function (a nested recursive function), I found some interesting things about functions in Go, which I think are worth sharing.

Write a nested recursive sum

To ignore the needless complex logic, I will use sum function in this article instead of the original one. It…

Yinchi ''Wexort'' Luo

Senior Software Engineer@Instana, Programming / Human Language Enthusiast. Located in Munich, Germany

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store