Nick Ang profile picture

Nick Ang

My 2021 Annual Review

An Annual Review is a personal note that is designed to spark self-reflection about the year that just went by. The goal is to take stock of the year, appreciate the little things, digest the learnings, and apply them in the years to come.

This is my second year writing an Annual Review in this format. You can find my reviews from yesteryears here: 2017, 2018, 2019, 2020.

In the review, I ask myself three questions:

  1. What went well this year?
  2. What did not go so well this year?
  3. What did I learn this year?

I go into each of these in the sections below. Let’s go!

1. What went well this year?

New life. We successfully grew a baby in Charlane’s womb and then raised her through her first three months of human existence. Her safe delivery was easily one of our biggest achievements this year. Her presence makes me smile, a lot.

Independence abroad. By handling the delivery and post-partum confinement on our own, we proved to ourselves that we can independently take care of ourselves and live happily abroad on our own away from the comforts of family and familiarity.

Clarity of home. We travelled back to Singapore for a visit despite covid restrictions and spent three weeks in quarantine and three weeks out roaming the city we grew up in. This trip helped me realise that I’m much happier now living in Germany than in Singapore. (This is true at least for now.)

Personal Knowledge Management. I used Obsidian almost every single day and have gradually built up confidence in using the software and my processes with it (they’re described in two posts 1 and 2). This has helped me become more focused and productive.

Growing as a leader. I was presented the opportunity to become a Team Lead at Smartly.io from the start of the year and I took it. In a few months, I had seven direct reports, which still sounds crazy. I’ve learned many things about leading people and managing a team’s output. I’ve grown as a leader and mentor this year.

Consistency. I continued to discover who I am as I published a blog post every single week this year. This habit has helped me reflect on my life at least once every week, which has given me clarity throughout the year about where I am at and where I am headed. I’m also more confident now in executing projects that call for a consistent schedule. I can confidently say that I’m a consistent guy.

Found a sustainable solution to re-live memories. In October, after Charlotte turned a month old, I started to publish one Instagram post every single day (@nickangtc) to encapsulate our experiences each day into a daily log. I’ve done it for close to three months now and have found a way to do it in less than 30 minutes each day and I intend to keep doing it throughout 2022. This matters to me because I have a bad memory, among other things.

A rekindled passion in software development. I worked hard and found a new job, which I’ll be starting in February 2022! I will be building software every day again and this time I feel a strong motivation to approach software development as a craft to master. A nice bonus is that as a developer I’m going to be paid more. I also enjoyed studying software system design & architecture and practising implementing algorithms and data structures when I was preparing for interviews. I love knowing that I enjoy studying something.

Climbing again. I have restarted my once-a-week climbing routine. I love climbing and this is a nicely paced break introducing exercise back into my life. I’m already in better shape after three sessions. I also enjoy the company of climbers, which is a nice bonus.

2. What did not go so well this year?

Not reading books. I didn’t read as many books as I’d hoped. The quantity wouldn’t bother me much if I had consciously picked only a handful of books to read throughout the year, but I didn’t. I took a much more sporadic approach to what I read this year, which seems like poor design.

Finding and sustainably engaging my community. I still don’t understand how online communities function despite having spent a lot of time on Twitter, Instagram, Discord, and Slack with people. I’m not sure if it’s the case that I don’t understand how communities function or that I just haven’t found my people yet. It’s frustrating because I know there are many interesting people in this world with whom I share interests but will probably never accidentally encounter in real life. I’ll have to continue to learn where to find my people and sustain a largely online relationship with them.

3. What did I learn this year?

I love being a dad. I mean I love everything that comes with it! The responsibility and the corresponding satisfaction, the bigger heart, the meaningful suffering. I also learned that I’ve changed since I became a dad. I now want to spend all the time afforded to me outside of work to be with Charlotte and watch her grow alongside my partner-in-life Charlane, trying foods, visiting places, dreaming and executing side projects, and so on. As far as the new me is concerned, this is a perfect life.

Away. I learned that I want to stay abroad for at least a few more years.

Leadership. I learned through action and feedback that I’m a decent leader of people.

Things will expand and contract again and again. I learned that almost everything in life works in a contract-expand cycle. This is a useful way to see the world because it puts chaos into perspective and makes it bearable, even understandable.

For example, I used Obsidian for note-taking and wrote a lot of notes for a while (expand), and at some point, I went back to delete and merge notes (contract). Or, take the example of moving apartments. I’d construct boxes and throw stuff all around the house (expand) before being able to pack them neatly into boxes (contract) and before finally taking things out of the boxes to put around the new apartment again (expand).

I enjoy working remotely. I learned that remote work is a model that works very well for me. I like spontaneous interactions with people but what I like even more is not being interrupted when I’m working. Not being interrupted means I can do more with less time, giving myself time back to spend with my family, reading, writing, or doing side projects. Remote work with a sprinkling of once or twice yearly in-person meetups with the team sounds like the perfect model of the future of work to me!

I’m decent at programming. I learned that I’m not bad at building software and that because of that I like building software. One more data point to the hypothesis that we tend to like what we are good at.

Regularity and consistency beat a pursuit of quality any day. The sun goes up, the sun goes down. I can also get my head around that. I learned to enjoy prioritising regularity over quality. Shawn Wang echoes a similar thought.


Write quicker tests with console.assert and blocks

Apparently {} can be interpreted by the JavaScript engine as a block and not an object. That’s the first learning.

The second learning is that the built-in console object has an assert method that you can use for super simple and quick testing. The method signature is console.assert(boolean_expression, message_if_fail).

Combine these two learnings and you have neat way to write quick and dirty tests in the same file as your implementation!

(I faced issues pushing to github for deployment due to the size of the embedded video, so I removed it. You can still view it here: https://www.instagram.com/p/CX17n8LIDbG/)

Here’s the code block from the video with some annotations:

/**
 * ⚡️ ⚡️ ⚡️
 * How to do quick & dirty testing
 * with console.assert & blocks
 * ⚡️ ⚡️ ⚡️
 */

class Cache {
  // implementation
}

// test 1
{
  const cache = new Cache({maxSize: 10})
  cache.add('key1', 'value1')
  console.assert(cache.get('key1') === 'value1', 'Key value pair gets stored correctly')
}

// test 2
// note that it initialises another variable called cache without an exception
// because they are contained in their own block scopes.
{
  const cache = new Cache({maxSize: 3})
  // do...
  // test console.assert(cache)
}


What the duck is Duck Typing?

Boiled down to a sentence: it’s the choice of invoking a method based on whether something has the method, rather than based on whether something is of a certain type.

Use duck typing when you care more about what something can do instead of what something is.

For example, if you have a variable of unknown type, and you wish to take that value and concatenate it into a string, you might call the .join() method that comes with that variable type (e.g. Array). Now, instead of checking that it’s an array, you’d just check if the variable has the array method in its prototype chain (javascript lingo), and if it does, just call it.

I think duck typing relies a lot on trust. Trust that programmers name things well. If anything has been implemented with a method called .join(), then it better do something join-y, like combining an array into a single string. If it doesn’t, then kaboom, something will break!

what is duck typing?


How URL shorteners generate 3 trillion unique URLs with just 7 characters

How do URL shorteners support 3.5 trillion unique URLs with just 7 characters?

Turns out, it’s by expanding the way we count, from 0-10 to 0-62!

(Correction: I said 9 characters in the video, but 0-9 has 10 characters. The big numbers must be mushing my brain.)

the solution is to count in base62

I referred to this article to learn about this.


Counting up in Binary

This is one of those things that is very easy to forget when unused. But I find that it’s something worth revisiting now and again because it’s so fundamental to how computers work.

If you don’t know binary as an application developer, it wouldn’t have a big impact on your ability to do your day to day work. But it may make you feel a little uncertain about what how the underlying files that hold your code are really represented by your computer. A big deal? No. Nice to know? Yes!

How to count up in binary