Shing Lyu

Disclaimer: The views expressed here are my own; they do not reflect the views of my current and past employers.

How to learn an AWS service quickly

In my day job, I have to consult customers on AWS services and design architectures on AWS. That means I have to have a basic understanding of almost every AWS service and be ready to dive deep into any of them on short notice. For that, I have a method for learning an AWS service in the most efficient way possible.

  1. Read the product page.
  2. Read the product FAQ.
  3. Read the concept section(s) of the documentation.
  4. Ask yourself key questions about this service.
  5. Watch YouTube videos.
  6. Follow a hands-on workshop.
  7. Dive deeper.

Let’s assume that you need to learn AWS Lambda quickly, here is how you would do it:

(continue reading...)

My Productivity System

my productivity system diagram (Right-click on the picture and select Open image in new tab to see the diagram in full size.)

After some recent discussion with a friend on note-taking methods, I decided to document my current productivity system for future reference. It is a combination of note-taking, time management, TODO list, project management, and writing combined. It has evolved over the years so I find it interesting to take a snapshot and look back a few years later.

(continue reading...)

Consistent Hashing and why it might not be the correct answer to your system design interview

I’ve conducted many system design interviews in the past. Whenever I brought up the topic of database sharding, the candidates almost always shout out “Yes, yes I know! Consistent hashing!”. If you probe them further, they will draw this classic ring diagram on the whiteboard.

Consistent Hashing Diagram WikiLinuz, CC BY-SA 4.0, via Wikimedia Commons

But if you have read Martin Kleppmann’s great book Designing Data-Intensive Applications, you might notice a sidenote:

…, this particular approach (Consistent hashing, as defined by Karger et al.) actually doesn’t work very well for databases, so it’s rarely used in practice (the documentation of some databases still refers to consistent hashing, but it is often inaccurate).

Then why is every system design interview study guide tell you otherwise? Let’s dive into this topic in this post.

(continue reading...)

Generating a notification sound in command-line

You want to play a notification sound in a Linux shell script, but don’t want to download any sound files (e.g. MP3, WAV, MIDI). Here is a script that generates the sound on-the-fly:

First install SoX, the Swiss Army knife of sound processing programs.

sudo apt-get install sox


play -n synth 0.3 pluck A3 vol -20dB repeat 2
(continue reading...)

How to import serde's custom derive macors properly?

TL;DR Follow the official documentation

(continue reading...)