Image for post
Image for post
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 “Playing Agile” (more or less like Werewolf), if you are interested, feel free to contact me. …


Image for post
Image for post
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 into my head: could I write a “DevOps Manifesto” in a similar way? That is, use paired terms to summarise the value DevOps promote. …


Image for post
Image for post
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.

In the article, we will use a context to illustrate error handling in Go: A Robot Pizza Shop! …


Image for post
Image for post
When was the last time you taken 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 := map[string]bool{"go": true}
b := map[string]bool{"go": true}
fmt.Println(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 in the…


Image for post
Image for post
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 the first for loop between line#12 to #15, it prints different value each iteration, but the pointer is always the same! …


Image for post
Image for post
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. To conquer this in an efficient way, I decide to write tests and involved experienced colleagues to review those tests so that the business logic in the service will be crystal clear to me. …


Image for post
Image for post
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 takes a single argument k , return the sum from natural number k to 1. …


Image for post
Image for post
Clouds of a cloudy day, Bad Soden am Taunus, Germany

This is an article I write for Rting.cloud, which aims to provide ratings, reviews and recommendations for cloud solutions.

This is an article from the Serverless IaC in AWS series:

  • [0]: Introduction
  • [1]: Serverless the Framework ← you are here
  • [2]: AWS SAM and CloudFormation
  • [3]: Terraform

In this series, we want to make a comparison of different serverless IaC solutions: AWS SAM, Serverless the framework and Terrafrom. To make it more intuitive, we will use them to achieve a same task: deploy a serverless todo application in AWS. …


Image for post
Image for post
Clouds after a rainy day, Bad Soden am Taunus, Germany

This is an article I write for Rting.cloud, which aims to provide ratings, reviews and recommendations for cloud solutions.

This is an article from our “Serverless Infrastructure as Code in AWS” series:

  • [0]: Introduction ← you are here
  • [1]: Serverless the Framework
  • [2]: AWS SAM and CloudFormation
  • [3]: Terraform

In this series, we want to make a comparison of different serverless Infrastructure as Code solutions: AWS SAM, Serverless the framework and Terrafrom. To make it more intuitive, we will use them to conduct a same task: deploy a serverless todo application in AWS. …

About

Yinchi ''Wexort'' Luo

IT Architect, 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