==========================
== Zhuo Hong Wei's Blog ==
==========================
Any and everything

2024 in Review

This is a long overdue but short post.

2024 was yet another year of hikes.

March

doi-inthanon

We were led by a friendly local teenager on a trail in Doi Inthanon, Chiang Mai. It was only March, but the heat was unbearable.

May

ma-onn-shan

I found myself on a trail in Hong Kong on a wet and foggy day.

ma-onn-shan

But the hike up was all worthwhile.

August

schynige-platte

This one is all about putting more life into my years. Schynige Platte.

Read more...

2023 in Review

What I did

  • Took my first trip to Perth. Last visited Brisbane, Australia in 2006 (17 years go!). Joined a tour to Pinnacles desert to watch the sunset and the stars.

    pinnacles-desert

  • Took a last minute trip to Kota Kinabalu. Joined a group hike up Maragang Hill.

    maragang-hill

  • Started a new role in July. Learning more about AWS and using terraform to provision infrastructure. Having 75% fun and 25% pain authoring Gitlab CI/CD pipelines.

    Read more...

Overdue Reflection

Reflecting on my three plus years at Indeed, I think my greatest takeaway would be learning about test driven development (TDD).

Prior to my last role, I treated writing tests as separate from the implementation code I had to write to deliver software. I failed interviews with take-home assignments because my submission didn’t have “proper” tests. I also fared badly in pair programming interviews because I didn’t know what to say when asked “what should we test next?” Up till that point, I’d worked on entire codebases with zero to few feel-good tests (in hindsight more like integration or e2e tests), often added as an afterthought. Test driving implementation felt foreign.

Read more...

2022 in Review

It felt like yesterday when I last wrote 2021 in Review. I cannot believe that this is the last day of 2022.

A lot happened this year.

  1. I moved to a new house 🏡
  2. I’m now a Staff Software Engineer! Still growing into my new role.
  3. I joined a language exchange programme.
  4. I hiked two mountains in 2 consecutive months this year. Mount Hallasan, Jeju, South Korea in November. Mount Rinjani, Lombok, Indonesia in December. Mount Rinjani is the first active volcano 🌋 where I hiked and camped out in tent overnight.

I’m glad to have read a few books this year.

Read more...

Solving Type Challenge

I’ve been trying to solve some type challenges to understand typescript better.

I had a lot of fun with a few easy and medium challenges which involve implementing types.

One of which I really enjoyed implementing is IndexOf<T, U>.

Basically it behaves like a regular indexOf function, except we are dealing with types, not literal values

type A = IndexOf<[1, 2, 3], 2>; // A is 1
type B = IndexOf<[2, 6, 3, 7, 9, 3, 8, 10], 3>; // B is 2
type C = IndexOf<[0, 0, 0], 2>; // C is -1 

I started with this:

Read more...

Thoughts on Graphql

GraphQL has been around for a long time, but I’ve only recently encountered it at work. Before I pen my thoughts, I want to clarify that I only have limited experience working with GraphQL.

What I like about GraphQL

Imagine that we have a query that returns a list of friends, each of which is a Person entity with many fields.

To me the most useful thing about GraphQL is to be able to customize the response (aka Payload) by specifying which fields you want, like so:

Read more...

2021 in Review

My first post on this blog is titled “2020 in Review” and I wrote it about 1 year ago. A year has passed, and here’s “2021 in Review”. Some highlights of 2021:

  1. Learnt the basics of terraform.
  2. Spent a few weekends writing small lisp programs for fun.
  3. Researched the process for buying resale HDB flats. During which, I was inspired to write a command line utility for pulling past HDB resale prices for houses which matched the block and storey range of a listed property.
  4. Still keeping up with learning to speak Korean.
  5. More inclined walks
  6. Another entire year of working from home

The Books That Remained

Recently I have been going through my nth decluttering process. Part of that includes giving, selling or throwing away books that I no longer read. And I realized that some of these books have stood the test of time and continues to “spark joy”. After multiple rounds of decluttering, they are still on my shelves. So I decided to write a post about them and why they are worth reading and re-reading.

Read more...

Getting Terraform Certified

The more I work with Terraform, the more I like the idea of IaC and how Terraform is provider agnostic. So much so that I decided to get certified. I thought that would force me to fill the voids in the basics of Terraform. After some weeks of study coupled with hands on usage at work, I passed the certification exam this morning! Although the exam consisted mostly of multiple choice questions, it was not all straight forward rote memorization. I learnt some nuances and cleared up some misconceptions that I had.

Read more...

Terraform Mental Model

Having learnt more about terraform, coupled with some hands-on at work, I have expanded my mental model of terraform.

Drawing it out on paper,

Terraform mental model

We can use count = [some number] to create multiple instances of each resource. If we ever need to identify each instance of a resource, we can make use of a contextual variable called count.index for the index of current instance.

In the diagram above, I have also illustrated a module. Terraform modules are used to organize and reuse logical units of terraform code. Each module can then can its own set of inputs (e.g. variables.tf), outputs (e.g. outputs.tf) and body (main.tf). These collectively describe a single resource or set of related resources (e.g., a docker container with a certain image and volume mount). The body (main.tf) of a module can also contain other modules. So we can see that modules provide us a layering and reuse mechanism for structuring a complex infrastructure.

Read more...
1 of 3 Next Page