Hi there 👋, @whoami

  • My name is Derek, I am a software engineer at Goldman Sachs, living in Singapore as a permanent resident 🇸🇬

  • My current project specialises in a Raft-based, API-driven distributed scheduling platform for batch workflows (think of Apache Airflow) that takes care of around 30 million firmwide job executions daily

  • Previously, I worked on the backend infrastructure of Pangle, the global Ad Network of TikTok which aims to make App monetization easy and accessible to all developers globally

  • 👉 More about me

New Python Features 3.10 - 3.14

Starting from Python 3.10 (released Oct 2021) to Python 3.14 (released last month), there are quite a few new features added to the language that made it more intuitive to use. I want to put a summary here to remind myself and always try to make full use of the modern Pythonic idioms. Starting with the one I’m most excited about: Max heap! (3.14) For a long time, Python only natively supports min heap. Users are sort of forced to play the trick to negate the value whenever we find max heap is needed for the problem. This is very error-prone in that it’s super easy to forget about the ‘-’ sign on the way in or out. ...

November 2, 2025 Â· 4 min

Design Patterns in Python

As a super flexible language, Python is blazing fast to build working prototypes and get the steam going. At the same time, it can also end up becoming a messy codebase and a pain to read later if being careless in the coding style. Therefore, I would always prefer to look out for idiomatic patterns to keep the Python code maintainable and easy to work with (both for me and others). ...

September 23, 2025 Â· 5 min

Productivity Boost in Git

From time to time, I try to review if I have made use of the tooling at hand in an effective way. Based on my experience with Git over the years, I want to put down some of my most frequently used utilities here. Making changes I started using specialised git switch command for branch operations: # switch to a new local branch git switch -c <branch-name> # switch to an existing local branch git switch <branch-name> # switch to the last branch I was at git switch - # switch to remote branch: # it auto-creates the local branch of the same name if not exist and tracks the given remote branch; all in one! git switch <remote-branch-name> The only time I still use git checkout is for file restoration: ...

July 20, 2025 Â· 3 min

Bits and pieces of HTTP in Go

The benefit of being a young programming language is that its design will incorporate the latest software engineering needs from the ground up. Concepts like multi-thread processing, building RESTful API become the first class citizens in Go. In fact, this is part of the motivation in designing Golang, as one of the authors commented about older programming languages in the keynote talk Go at Google: Language Design in the Service of Software Engineering ...

March 9, 2024 Â· 8 min

A peek into Go Generics

Since version 1.18, Go has finally introduced the support for generics, together with any as a type alias of interface{} It gives more flexibility for user to create a general collection for similar data structures. Previously we have no choice but to write up the same struct for each data type we want to support. The syntax can look a bit strange if you are already used to the old-school Go code. Or maybe it’s just because I haven’t used it often enough. ...

February 16, 2024 Â· 4 min

Data Structure in Go - Part 2

It is true that Go is designed with a minimalistic touch. It does not have a rich set of collections or in-built data structures like Java, where you can just import java.util.PriorityQueue or java.util.Stack and start using them. However, besides the basic map and slice, Go does come with a builtin container package that we should at least be aware and make use of it to implement things like Stack, Queue, PriorityQueue and Deque. ...

December 17, 2023 Â· 4 min

Data Structure in Go - Part 1

Alias type Data structures start with the fundamental data types in Go: Numbers, String, Boolean, Array, Struct, Slice, Pointer Besides the basic ones in Go, there are alias types that just provide more meaningful names for existing data types. It’s good to be aware of them so as not to get confused when you happen to see them. Alias type Underlying type Why? rune int32 represent a Unicode character byte uint8 represent one byte (8 bits) of data int int32 / int64 adjusted for the system (32 bit / 64 bit) We can also define custom alias type: ...

December 5, 2023 Â· 3 min

Common Go channel uses

Go is known for its native support for concurrency. You can easily spin up a concurrent execution (i.e. goroutine) using keyword go. It is similar to OS thread but managed by Go runtime scheduler instead of OS kernel. The underlying implementation actually employs an M:N model to multiplex M goroutines onto N threads. With the great power of concurrency comes with the responsibility to handle synchronisation in the right manner. ...

December 1, 2023 Â· 3 min

Built-in functions in Go

The builtins are functions in Golang that you can call directly without having to import any package; they just come with the programming language itself. The full list resides in the builtin standard library: https://pkg.go.dev/builtin Many of the builtin functions are widely used, so it’s important to know them by heart. The motivation for this post comes from the fact that Go 1.21.0 has introduced multiple new handy builtins (which doesn’t happen frequently). ...

November 29, 2023 Â· 5 min

YouTube channels I like for learning French

In my third year at university, I got the chance to experience the French part of Switzerland for a semester through an exchange program at Ecole Polytechnique Federale de Lausanne (EPFL). I thought knowing a bit of the language would definitely boost my experience there, so I decided to take a French module at my home university. Well, I ended up loving it. There are a few channels that really helped me out with daily conversations. ...

June 30, 2023 Â· 1 min