Animated visualization of quicksort¹

Quicksort is a sorting method that uses a divide-and-conquer algorithm. The basic idea is to pick an element as a pivot. Put another smaller member than the pivot to its left side, and put another larger member than the pivot to its right side. After this process, we can make sure that the pivot is in the correct position. There are many different versions of quicksort that pick pivot in different ways².

  1. Always pick the first element as a pivot
  2. Always pick the last element as a pivot
  3. Pick a random element as a pivot
  4. Pick median as a pivot


The swan is often referenced in literature as an example of a “graceful” animal.

The purpose of a graceful shutdown is to make a go application stop receiving new requests while completing the ongoing request before finally going to shutdown. That usually happens when rolling update pods. The old pods will terminate after new pods are ready.

Usually, the pod will terminate after receiving the OS interrupt signal. To achieve graceful shutdown, we can create a context with a cancel callback and a built-in shutdown method provided by http.Server interface. …

Habib Fikri

Asgardian software engineer

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