Author Archives: Sam Zhao

How I measure work/life balance

Here's my one-question check to see if I've achieved work/life balance:

Can I do my dishes in peace without feeling a sense of urgency burning in the back of my mind?

If I can mindlessly (and slowly) do my dishes with no rush, no worries, and no 1000 miles/hr thought train going on in my brain, then I've achieved work/life balance.

Another thing to note: work/life balance can be temporary. This depends on the person; some people (like me) tend to work in ultra-productive bursts vs. others tend to work steadily over a long period of time.

How to sell a book from a twitter thread

How to sell a book from a twitter thread

Mindlessly browsing twitter feed when this bomb was dropped on me:

You can click on the embedded tweet to read the full thread.

Following the thread, I soon realized that the author is promoting her new book.


Forget about having a full-on website with a fancy landing page and 10 content marketing focused blog posts before you can launch your product.

April subtly sold me on getting her book by casually tweeting.

Now let's analyze how this magic works.

First tweet she starts with a story with an intriguing result: explosive growth and eventual company acquisition because of (re)positioning.

She then emphasizes the underlying theme of these tweets at the end: "the power of positioning."

Second tweet, she continues with her life story, again ending with a mouth-watering result: big growth and company acquisition in the billions.

Notice how April doesn't start out by saying something vague like "ever since I entered the workforce, many companies have seen explosive growth and eventually acquired."

It wouldn't have packed much power in the statements and thus wouldn't establish much credibility or trust.

Instead, she went into details (e.g. "personal database to an embeddable database") about a few companies she worked at that succeeded by repositioning. But not too much detail to not fit in a tweet or lose readers' interest.

Now that April has got her foot in the door with the two specific examples, she has established her credibility enough to move on.

In the third tweet, she lumps the many other companies that have seen success because of repositioning to further prove her point.

But this time, she does it while establishing her authority: 16 products, 7 different startups, being an executive. Two birds one stone.

OK, enough background and context setting, it's time to get into the main point: the book.

In the previous tweets, April talks about the attractive benefits of positioning.

In this fourth tweet, she starts addressing one of the pain points surrounding positioning and essentially describing the reason why she had to write this book: there is a lack of education on how to do positioning.

Fifth tweet, April continues to uncover the pain point while emphasizing on the importance of positioning, e.g. it's the beginning of everything and it defines a lot of aspects of the business.

Now April goes into more detail about how the existing solutions fail to solve the problem that is a lack of positioning education.

Notice her vivid descriptions of current solutions: "laughably vague" that relies on "voodoo+intuition". Surely you can't build a business on vagueness and voodoo and intuition, right???

In a word, she's agitating and challenging the status quo and getting the readers to really feel the pain.

More pain! Confusion!!? Do you feel it in your guts now???

"Positioning can be easy!" It's only just a few blanks to fill. Once you answer them, you'll be fine!

...or so you think.

Positioning can't be as easy as filling in the blanks!

There are more missing pieces that are missing that you didn't even know existed, such as the order in which you work through it (again, lack of education).

This is again agitating the pain even more.

When you really feel the pain in your guts or stomach or other body parts, you are more likely to seek solution and take action.

If you are not getting emotional about an issue, it's relatively hard to get you to hear more about it, let alone acting on it.

Here April says "fear not! Humanity is not doomed, yet."

Even though it's been painful up til now, but fix is around the corner.

And she's not just selling an idea that she came up with during shower (it could be); it's actually proven by herself and other startups founders — even the skeptical ones ("I'm looking at you, skeptical reader").

It's a proven and refined process, so don't worry.

Did April spark an idea in your head to ask her for positioning help?


But... [scarcity] she's too busy to help everyone. And you can expect her to charge a premium if you can get her to help you one-on-one.

By the way, this is great demand building and anchoring. April has built up enough credibility and authority for you to believe that

  1. She won't be cheap
  2. But you will get a lot of value from her

But she's only one person... can't help everyone...

Wait, there's hope.

She wrote the process down, and she's kind enough to let everyone have it!

And that was the perfect setup for the SALE:

Whew, that was a lot to go through, but April impresses me with every tweet in the thread. I have so much to learn from her!

The cool thing is that before this tweet, I had no idea who she is.

Now, without her explicitly telling me, I got the following impression of her:

  1. She's a successful executive
  2. She can help companies gain clarity and succeed
  3. She adds a great amount of value and probably charges a great amount as well

Overall, she's a person I can trust if I ever find myself stuck in a growth bottleneck and/or unclear about my company's positioning.

And that is how you sell a book from a twitter thread.

TIL: microcaching

Source: The Benefits of Microcaching with NGINX

What: Microcaching is a technique that caches dynamic content for a very short period of time (as little as 1 second).

So what? Dynamic data, such as content coming from a CMS (Content Management System) or direct from a database, doesn't need to be queried/fetched/calculated every time someone requests for it.

Isn't that a benefit of caching in general? Yes, but longer-term caching techniques (e.g. cache that expires after a few days or weeks) may require sophisticated cache invalidation at the right time.

Who cares? If you have content that changes frequently (e.g. news site, marketing site, forum), have many concurrent users (active users online at the same time), and you don't want to pay your hosting provider hundreds of dollars a month for a supposedly simple and straightforward site, then microcaching has its own set of benefits that long-term caches don't offer.

What benefits? Microcaching, especially with very short period of time, like 1 second, allows your site to be up to date without relying on any cache invalidation mechanisms. Of course, caching in general helps you reduce CPU usage (e.g. no unnecessary re-calculation of the same results), lower response time (i.e. no need to wait for re-calc), and handle more requests (5 with no cache to 3300 requests per second with optimized microcaching).

OK, I'm sold. How do I implement it?

The source article is from NGINX's blog, so the implementation will be using NGINX.

Just in case you are not familiar with NGINX: it's a very popular open source load balancer, web server and reverse proxy (according to their website).

In the hypothetical example, requests are handled directly by an Apache server running Wordpress. We need to have NGINX handle the traffic and act as the content cache.

So, first step is to set up a reverse proxy so NGINX proxies the client requests to the Apache server:

server {
    listen external-ip:80;  # External IP address

    location / {
        proxy_pass http://wordpress-upstreams;

upstream wordpress-upstreams {
    server localhost:80;

I took the snippet out of the original article and remove all unnecessary (but good to have) setup for microcaching.

Next we turn on short-term caching:

Snippet directly copied from original article

proxy_cache_path /tmp/cache keys_zone=cache:10m levels=1:2 inactive=600s max_size=100m;

server {
    proxy_cache cache;
    proxy_cache_valid 200 1s;
    # ...

At this point, we are already able to dramatically increase the requests-per-second our server can handle and process. Going from 5 requests per second to 600, according to the original article!

And we don't need to manually invalidate cache as we update our CMS or other content source because the cache will expire anyway after a second.


There is a small problem...

Even though we drastically increase the requests per second, the CPU usage is still 100% and processing time varies a lot.

This is because as the short-term 1-second cache expires, new incoming requests will be cache miss and will go directly through to the original source (Apache) again, until the next short-cache takes effect.

It's the gap of time between the cache being expired and refreshed.

So NGINX provides a fix for us: serve up stale (old) cache until cache gets refreshed.

This is simple to enable. Just replace the snippet before with this:

server {
    proxy_cache cache;
    proxy_cache_valid 200 1s;
    proxy_cache_lock on;
    proxy_cache_use_stale updating;
    # ...

I reordered some stuff in this snippet from original article and corrected a typo (proxy_cache cache instead of proxy_cache one. It refers to the name of the zone).

And there you have it! Potentially 3300 requests per second with optimized microcaching.

3300, as the original article explains, is a theoretical number in an environment that doesn't have network limitations. The more realistic number is around 2200, given the network transfer rate is around 1Gbps.

Bad code creates fear; fear creates over-engineering

By now you've probably seen some bad code.

Code that looks like wild grass growing out of an abandoned highway.

You've probably also expressed hatred and disgust towards the code either loudly in front of everyone or privately when no one's looking.

You say to yourself, "I'm going to end this once and for all so that nobody on this team, including myself, will ever write code this bad again."

So you wait for that opportunity to refactor, rewrite, or rebuild from the ground up.

Because when that opportunity comes, things will start to change for the better for good. You will set things straight and do things right the first time around.

That opportunity arrives. Your blood start pumping, an excitement and drive you haven't felt in a long time.

You know exactly what the first thing to do is, and the second, and the third, and the fifteenth; you feel like your fingers are not typing fast enough to keep up with all these cool ideas you have in your brain:

  • I'm gonna add a linter so everyone will be the same page in terms of coding styles
  • I'll put in a git hook to format all the code anyway so that standard styleguide is enforced
  • Why don't I also throw in an automated script to generate folder and file structures so people can't screw it up to begin with
  • Oh and we need TypeScript because it prevents people from writing implicit and confusing APIs
  • Let's not forget Redux because it forces everything we write to be functional
  • It goes without saying that from now on we'll start writing tests, so I will have that set up perfectly as well

As you work on this single-source-of-truth-for-our-team-projects base project, you announce to everyone that help and savior is about to be here to eliminate future bad code forever.

Then this one-week project turns into a two-weeker...

Then you get pulled into more urgent and high priority tasks, so the two-weeker goes into the backlog...

But you haven't given up. In week 4, you finally picked it back up and finished it!

The best part is, everyone's on board with the standards, patterns, best practices and coercions (read automatic scripts) you've included.

The manager gave you a go ahead as well!

From then on, you've proven that you are the chosen one, the savior of bad code, and the visionary who prevents future bad code.

You are secretly appreciated by juniors on the team because they are learning a lot.

You get praises from other experienced devs on the team while they whisper to each others' ears, "I hate this new project template".

3 months go by.

People have accepted and adopted your amazing base project structure that you promised and over-delivered on.

There's only one problem: people's velocity dropped.

The majority of the sprints turned into turning off or bypassing the features you included as part of this bad-code-killer-project-starter-template-kit.

This project-starter-template-kit has officially become an over-engineered and hard to maintain pile of dread.

"Shit," you say to yourself, "where did it all go wrong?"

"I meant to improve the developer-experience, but I end up losing everyone's sanity."


Sometimes the code can be so bad that it creates fear in you:

  • fear that you will have to deal with bad code again
  • fear that your reputation goes down the drain because of someone else's bad decisions
  • fear that you yourself would end up writing bad code like this because of pressure, and you know others will hate you just like how you hate bad code writers

So you set out to prove that you stand against bad code.

You will use your skills to end it once and for all.

This fear has gotten to you — deep as well.

It causes you to lose your cool because you are so irritated and frustrated by it.

It causes you to exaggerate how big a problem it is and bring a tank to a sword fight (swords can hurt real good).

Bad code creates fear, and fear creates over-engineering.

The values junior devs add to the team

Someone asked me about some valuable contributions I've seen from junior developers.

At first I was almost drawing a blank as I couldn’t think of any notable contributions by a junior.

See, that's where I was overthinking this: valuable !== notable.

So no, I haven't seen juniors create revolutionary things in the first week of joining the company, but taking 3 more seconds to think about what values they add got me some answers:

1. They contributed like how we contributed

They put in the work, working through the backlog and tasks assigned to them.

This was why I was drawing a blank: they just do work like the rest of us, nothing special there.

But the fact that there’s nothing special IS why this is special!

From the junior’s perspective, they are a burden to the team.

But from our perspective, they are just one of us who are new to the team and need some help ramping up. Sure, we have more experience with the project and therefore can make better decisions, but we typically don’t treat them specially.

2. They help uncover holes in the system

The drawback of working fast is leaving a trail of bugs and technical debt with zero documentation behind.

When a junior comes on board, their questions can help us realize the holes in our systems as well as the documentations for them.

Because they are junior, we get the opportunity to force ourselves to explain things in simpler language with easier to understand concepts — the key to good documentation.

3. They help boost team morale

Remember the part where I reminded you that more senior devs on the team are also humans?

When a respectful junior joins the team and ask the more experienced teammates questions, the person being asked instantly gain more self-confidence, authority and overall good feelings.

They are only human (once again!) and could be struggling with imposter syndrome as well!

You asking them, and them being able to help you find answers is validation that they are good enough.

The way I see it, this question is about validation.

Often times, we humans need more than someone just telling us about something — we need them to show us.

There's nothing wrong with that.

I do think it's also important to remind ourselves that change comes from within.

No matter what method I use to convince you that you are valuable, you can still choose to reject that idea.

This is why a lot of my posts are often centred around mindset changes.

Changing one's mindset can greatly help create bigger change, even though it's still up to the person to open up to that change (coming from within).

How to not feel like a value sink as a junior developer

After writing my surprisingly well-received reddit post on value, people have been messaging me privately about their concerns with demonstrating value as a junior dev on a team of experienced devs.

Most notably, this message jumped out to me as it really speaks to junior devs' frustration and pains in their work:

I’m a front end new grad with about 6 months in industry and I struggled (and to some degree still struggle with) feeling like I’m a value sink for my team or that I’m not learning fast enough to be a good return on investment. As a senior developer what are some valuable contributions you’ve seen from junior developers?

Boy oh boy, that sounds painful, doesn't it?

Yet, we've all felt that one way or another before:

Feeling worthless because you have the least experience on the entire team;

Feeling frustrated because you seem to get stuck on the stupidest little problems;

Feeling ashamed because you think you should've known these things already;

Feeling guilty because asking others for help is a huge waste of their time and energy;

Feeling overwhelmed because the more you learn the more you know you need to learn;

Feeling like a value sink instead of a value adder.

How about when you want to fit in with the rest of your team, but you are confused by their inside jokes and use of advanced technical jargons — yeah, that feeling stings you like a mofo.

My official title now is Senior Front-end Engineer, but don't let that fool you, I know full well that putting aside the ego-boost, these feelings that "I'm not good enough" are still there.

What can I say? Imposter syndrome is a b-.

That said, I'm not as affected by these feelings as I was when I first started out. The main difference is that I know how to respond to these feelings now and how to not let them hinder me as I improve myself and grow.

Get away from me, imposter syndrome!

The first thing to understand is this: everyone can be valuable to others through their own way.

If you are struggling to find a job now, it may be that your potential employers failed to see the value in you; it could be that you haven't found the best way to present your values to others; it could also be that you haven't found what others need so you don't know how you can be valuable just yet.

If you have a job now, no matter how "low" your position is, you are definitely valuable. Employers don't pay you for you skills — they pay you for the value you provide for them.

With that out of the way, let's talk about how junior devs specifically can be valuable.

Unique values of a junior dev

It may not be easy to spot on the surface, but junior devs have their own special way of adding value to a company.

Let's break the issue down and tackle them one by one.

1. Lack of technical skills

You are new to the industry, hence the "junior" in your title, so it's understandable that others who have been in the industry for years are better than you technically.

It's important to note that there are people who are better at what they do than even the most senior person on your team. In other words, if you compare yourself with people better than you, you will never be good enough.

But, you don't have to be, do you? You can still compare with those who are better than you technically, but let them be your inspiration and guiding post that motivate you to become more like them.

And what to do with your lacking technical skills? Practice, practice and practice.

I wrote about this through sharing my embarrassing experience learning the one-handed shuffle.

I also wrote about the best way I found to practice.

2. Lack of self-worth

From my personal experience and anecdotes I hear, a lot of times companies hire juniors and treat them as juniors.

By that I mean sometimes the more boring and mindless work nobody wants to do is assigned to juniors. ¯\_(ツ)_/¯

From a less cynical perspective, it's not the company's fault to do that, but they often do need to find better ways to utilize skills juniors have and uncover their potentials.

In more cynical scenarios, people (managers, seniors, co-workers) could literally assign you impossible tasks so when things go south, you can take the blame for them.

Again, how you respond to this affects your mentality; if you treat it as a challenge that helps you grow, you can feel more excited and motivated to work through it. And hey, they expected you to not find solutions easily, so if you don't, then no harm to anybody.

Those people who you look up to got good at what they do by going through the same phase you are going through now. Problem is people tend to forget what it was like and what they went through to achieve their level of competence, so they appear less considerate.

3. Being a time and resource drain (a.k.a. value sink)

This one's interesting.

I think a junior dev should be able to bother a more senior person as much as he/she wants. If you don't ask questions, your teammates won't know that you are stuck, confused and having problems.

Of course, being respectful and considerate when doing so helps tremendously.

If you start the question with "would you be available later to help me with something quick?", then they have the choice of saying "sure" or "sorry, I'm busy with something right now, but I can help you afterwards." Either way, you have successfully signalled to them that you need help.

And after they help you, you have another chance of showing your gratitude and you being considerate by saying something like "thanks so much! I don't want to take any more of your time, so I will figure out the rest myself."

Heck, this is not How to Talk to More Senior Devs 101; this is simply how to be a good co-worker in general.

And this is your gentle reminder that they are human, too!

So unless they are real assholes, people generally don't have a problem with you asking a lot of questions — it's just a form of communication with your team.

In other news, humans like to feel good about themselves if you let them. So if you are being humble, asking questions and showing respect, others may even love helping you (or loving being recognized for their expertise).

And there you have it!

Feeling like a value sink is demoralizing, so I really hope this post can help some of you out there to overcome some of mental obstacles and burdens and start feeling happier in your job.

How to write code without having to Google things

Ever wonder how professional programmers/developers are able to “spit out” code and commands instantly on demand?

How do they memorize all of that information?

Is there a secret to their wizard-like abilities?

As it turns out, there is!

A lot of professional developers have learned the secret to learning things quickly and memorizing things for a long time. And that secret is…

*drum rolls*

Do the same things over and over again to the point of puking :)

You must be really disappointed right now that I’ve reveal the secret after hyping it up initially.

But, of course, there is more to it, and I honestly did not lie about how effective it is.

You see, many people, myself included, learned web development through following countless number of tutorials. More often than not though, the act of following tutorials is mostly just blindly following instructions.

Whether or not you were able to successfully recreate what the tutorial is teaching you about, be it an one-page static website, a simple React app, or an API for bookmarking things, you will not remember anything you have just done.

Tell me if either of these scenarios sounds familiar to you:

  1. You followed a tutorial and successfully coded something that resembles the tutorial’s demo. You feel a sense of relief, but you don’t know WTF just happened because you almost just copy-pasted the code (shut up, typing out the same code isn’t much different than copy-pasta).
  2. OR, you followed a tutorial and failed to achieve the expected end result. Either you encountered some uncaught errors or you were missing the same stylesheets as the demo, you will be stuck debugging the problem on your own which was never mentioned in the tutorial. Guess what, you are left wondering, again, WTF just happened.

This is exactly why you shouldn’t strive to follow as many tutorials as you can find, but instead focus on a few tutorials that you do over and over again. Here’s what’s gonna happen:

1st Pass

You are clueless what the tutorial author is talking about, but you follow it regardless. In the end, best case scenario, you didn’t encounter any errors and you got what you were promised. Now you have a complete thing that you have no idea how to recreate or apply to any of your other things if you were to do it without guidance.

2nd Pass

Because you have done the tutorial once, you are familiar with some of the steps. This is where your brain piece things together instead of blindly following instructions.

While going through the same steps again, you start discovering some typos or mistakes you made in the first pass, or you may try changing tiny things here and there just to see what happens.

A very crude example: the tutorial tells you to put color: blue; in your stylesheet. You sort of guessed (assuming you are completely new to CSS) that this line is going to change the color of some text, and you saw that some text on the page has blue color from the first pass.

This time around, you feel a little more adventurous and decide to tweak some small things that are unlikely to cause errors, so you change it to say color: red;. Now that you can see the difference visually, you understand that this particular text block will be affected by this particular rule which changes the color of the text.

3rd Pass

You are getting a bit bored because you have already gone through the entire process, not once, but twice!

But this is when something weird and magical happens: while that boredom is starting to sip in, a sense of confidence is also kicking in!

You realized that now you know what to type without having to read the original tutorial text word by word. A clear step-by-step process is also starting to take form in your head as if the tutorial steps are gradually being imprinted onto your brain.

4th Pass

Now you are feeling REALLY adventurous; you start changing less trivial things.

Instead of fiddling with colors and font sizes, you start changing functions and reordering them just to see what happens as a result of every one of your changes.

You may also start getting some big red and scary errors, but you don’t panic because you know exactly what you changed to cause that and it’s only a ctrl/cmd + z away to bring it back to a working state.

5th Pass

The tutorial content has become part of your knowledge base that you can retrieve at will. What’s really beautiful about this is that the explorations you had in the previous passes, such as the color changes and function restructuring and what not, these enable you to achieve a higher level understanding of the content.

Your brain can finally make sense of everything. Not only that, you can now synthesize, adapt, and apply to new problems using the knowledge you just put in.

Again, the point is not to avoid Googling things all together. It's to gain mastery and confidence through meaningful practice.

Experienced developers accumulate their knowledge overtime. Most of them don’t do this repetitive process of following tutorials deliberately because they take a slightly different and longer approach.

They accumulate the knowledge by simply working on similar projects over and over again. Potato potato.

What you will find after many passes is that the next time you start building your own thing, whether it’s to set up a new project structure, initialize a git repo, or create some boilerplate framework code — you know, all that pro stuff — the commands, knowledge, and everything becomes muscle memory and come to you automatically when you need it!

Have I convinced you that doing the same thing repeatedly is not only NOT BORING, but it actually gives you a better understanding of the things you learned from tutorials?

This is the secret that allows you to learn things quickly, memorize things for a long time, and know how to adapt and apply newly acquired knowledge in your own projects without guidance.

What’s also great is that this ultimately gives you more confidence, which turns into motivation to keep you going in the journey of getting your dream job or creating your dream website/app!

Now stop reading and go dig up those tutorials you “finished” and start redoing them until you can recreate those without looking :)

Using ES2017 async/await feature to work around rate limited APIs

This article was originally published on Medium..

Rate limits are a curse to API consumers and a blessing to API developers. Some APIs even have different limits for different endpoints.

Of course, if we are just calling one endpoint multiple times, we can simply debounce or throttle the call. However, it can get tricky when we are triggering multiple calls to different endpoints after calling one endpoint.

Plus, debounce is so 2013; we are in 2018 2019 already.

So today, I’d like to present a declarative way of working around rate limits as API consumers.

Hopefully, this makes consuming rate limited APIs easier while at the same time keeping API developers and DevOps people happy.

What is async/await

Let’s take a look at how async/await works first.

For those of you who already know this, close this tab please and stop looking at my embarrassing explanation below.

Put simply, async/await allows us burnt out and fatigued JavaScript developers to write asynchronous code (remember callbacks and Promises?) in a synchronous way.

Here’s a code snippet to illustrate it more clearly:

As you can see, Promises already help reduce some levels of nesting.

But async/await takes it to a whole new level.

I’ll give you a moment to appreciate this amazing technological advancement.

Now, we can do some cool things with this, such as putting a delay before API calls in a declarative way, like this:

Please do try this at home.

Using async/await in a loop

Hopefully you are super stoked about async/await now. You might even be thinking about using it in a for-loop!


Take a guess what the following snippet does:

If your guess is that each index will be logged out with a 1 second delay in between, then bwah bwah you are wrong. Go ahead, try it in the devtools console and you'll see.

Properly using async/await in a loop

To use the async/await delay helper in a loop, we will need to use another new ECMAScript feature (ES2015 to be exact) to make it work: the for..ofloop.

Here’s an example:

The index of each list item will now be logged out with a one-second delay between each other.

Applying to rate limited API calls

Now that we have figured out how to use async/await in a loop, we can apply this to work around rate limited calls.

I have written a delayed map helper to make it even easier:

And here’s an example usage of the helper:

Additional information

I hope by now you are convinced that async/await can help you write declarative, readable and maintainable code.

There are also other benefits I haven’t touched on in this article, such as the ability to catch errors with the more primitive try..catch block instead of relying on the one provided with the Promise API (which actually is also becoming a primitive).

Note that using ES2015 and ES2017 features does require transpilation steps (e.g. with BabelJS) for them to work in browsers that don't support them out of the box (works in most modern browsers though).

And honestly, debounce and throttle are most likely sufficient for most use cases.

The meaning of life and the cure to inaction

Previously I wrote about how I discovered the purpose of life.

In this post, I'd like to share how that revelation helped me cure my procrastination and inaction.

A lot of times I would have ideas for things I want to build, write about, and share with the world.

But usually I tend to run into one of these problems:

  • getting stuck at the idea phase
  • having trouble finishing what I set out to create
  • not publishing or releasing the things I create

I've read countless tips and advice on how to stop procrastination, overthinking and perfectionism.

And you can just tell from the frequency of my posts on this blog that none of those worked very well 😅.

Now, when surface tips and tricks fail to fix a problem, it usually suggests that there is a deeper, more subconscious root cause.

What changed for me fundamentally, was that I adopted a different mindset and broke free from my limiting beliefs.

I used to believe that my procrastination and inaction were caused by me having high standards.

My excuse (or belief at the time) was that I needed to give people the best experience when they are using the things I create or reading my articles. That's why it always took me longer to plan things out and execute on them.

As it turns out, I was lying to myself.

My inaction was caused by my own ego and desire to always be impressive.

The quality of the finished products that I release needed to be impressive not because I have high standards, but because I needed to show that I am impressive.

While there is nothing wrong with having a desire to impress people (debatable), I needed to get my ego checked (might I suggest reading Ego Is The Enemy).

On the other hand, I set out to bring value to others with the things I create. And procrastination is getting me to run the opposite way.

After realizing the purpose of life (tl;dr: it's to help others), and remembering from what my mentors (Amy Hoy and Alex Hillman) taught me years ago, I seem to have found the cure to procrastination and inaction:

Just fucking do it.

But it's not that simple, is it?

Everyone knows that the opposite of inaction is taking action.

But what really gets us to take action is having the right mindsets and positive beliefs.

If we understood the purpose of life and focus on sharing and helping others, then our ego and self-image aren't that important anymore.

So that's what I did to kickstart the momentum to take more actions:

I started uploading videos straight from my phone camera, with no room decoration, no post editing, just a blank wall on my channel.

I published articles with no header image to "spice things up", no cool visuals, not even a newsletter signup form.

Sometimes, when I want to share some learnings to more people, I'd even abandon beautifully formatting the post on my blog, and instead publish it as a forum post.

If it helps others gain new perspective, perform better in their work, and even just feel better, the timeliness and value it creates greatly exceeds the impressive wow factor and my supposed "high standard" and everything I deemed to be necessary in the past.

So what's the cure to recap? It's this:

Just fucking do it because helping others is more fulfilling and rewarding than trying to perfect your crap in order to protect your self-image and ego.

Another benefit of putting stuff out there instead of worrying and having them rot inside is this:

Mr. Step Aument here gave me a shout out in his latest blog post — this would have never happened if my ego got the best of me!

P.S. go read Step's blog. He's a much better writer than me and can explain ideas much more concisely.

Who are we living for?

Do you ever wonder who or what you are living for?

You are not suicidal or anything, but sometimes you can't help but wonder, "what's the point to all this?"

I've yet to find an answer to that, and occasionally I would ask myself that question again.

This happens especially frequently after someone important in your life has passed, and all of a sudden, you lost yourself as well.

Goals, purpose, and ambitions that used to be part of you are sucked out instantly.

That feeling sucks, though never enough to make me suicidal.

Really, I just wanted to know, what is the purpose of life? That's it.

Thankfully, British comedian Ricky Gervais created a new Netflix show, After Life, where he gave a pretty good answer to the question.

According to the show (or Ricky Gervais), life is about helping others. Specifically,'s not just all about you, is it?... We're not just here for us, we're here for others... All we've got is each other. We've gotta help each other struggle through till we die, and then we're done.

Exactly! If we only look at ourselves and what life means to us, we would soon arrive at the conclusion that life is worthless to us.

But when we shift the attention to others, focus on bettering ourselves in order to help others, we'll end up having a purpose for ourselves as well.

When we shift our attention away from ourselves and onto others, life takes on new meanings; and when we help others, we become more valuable.

When we make others happy, we will feel happy as well.

With this revelation, I feel like I have acquire a superpower: I no longer care about how others think about me and the things I create as much as I do before.

I just focus on helpings others by sharing as many things I've learned as possible.

No longer do I spend hours editing out stutters and minor mistakes from my posts or audio/video recordings only end up not publishing them all together.

How I'm presented is not nearly as important as getting the message out there in order to help as many people as possible, so you can say that my perfectionism has been mostly cured because I have found the purpose of life.

How to instantly have more confidence during interviews

🎧 Audio version available. Get it here!

Being an introvert, I used to have anxiety about interviews.

You know the drill, you try to mentally prepare yourself by running through a bunch of simulated scenarios and rehearsing over and over and over again in your head.

But when you're actually there, sitting at the reception waiting for the HR person to come out and greet you, all these negative emotions, thoughts and self-doubt start surfacing again.

You ask yourself:

  • What if they asked me questions I didn't prepare for?
  • What if I stuttered or blanked out?
  • What if they questioned my lack of degree / knowledge about a specific framework or language / work experience.

What do you do in this situation?

Just have more confidence???

You see, everyone says that — your family or friends — “encouraging” you by telling you to have more confidence.

But nobody ever tells you HOW.

How do you have more confidence?

How do you suppress all that self-doubt and bring out the best side?

How do you charismatically work the room like a salesman from The Wolf of Wall Street?

How do you feel confident when you're sure that all the other candidates are better than you both in technical proficiency and social skills?

When was the last time someone told you “just have more confidence” and you responded “oh, thanks for reminding me. I almost forgot” unsarcastically?

For me, and probably most of you reading this, the answer’s “never”.

So what can you do about it? Just let yourself be unconfident and self-doubting?

Of course not, but in order to have any meaningful change, you must first understand why you're having this problem.

Facts, or are they?

Very often, I see people tell themselves confidence comes from years of experience and thousands of hours of practice.

That's why beginners and juniors are less confident than a senior person, obviously.

But that's simply not true. These “facts” are just things you use to justify your lack of confidence. It’s an excuse for you to not change and actually be more confident.

If the lack of confidence and the presence of self-doubt is because of lack of experience or skills, then why does imposter syndrome still exist, even for people who have decades of experience and are basically masters of their craft?

This is because people keep feeding themselves limiting beliefs and thinking these beliefs are facts.

Do you know for certain that other candidates interviewing for the same job is better than you in every way?

Do you know for certain that you will bomb the interview?

Do you know for certain if this company is even right for you?

Even if you answer “yes” to all these questions, do you know for certain that you won't pass the interview?

The truth is, you don't actually know the answer to any of these questions. You just chose to stick to your limiting beliefs because it just feels safer.

But why?

The logic is if you reject yourself early on, you'll be mentally prepared when others reject you.

There are studies that show rejection basically feels like physical pain to your brain. So of course, your body's defence mechanism just kicks in automatically.

But that logic hardly holds up, does it?

Deep down, you still feel hurt when rejected.

You still keep on strengthening your own limiting beliefs that you're not good enough, and you're not prepared for rejections.

You're not prepared to have enough confidence to present yourself while during an interview!

How to actually change

Based on my experience, and seeing how others behave, the only way to change yourself and be confident is to first understand and recognize your limiting beliefs.

Once that’s out of the way, you can break free from your limiting beliefs and gain more confidence through a series of positive mindset shifts.

Think of it like this:

If every other candidate is better than you in every way, then why weren't you automatically rejected?

After all you were asked to come in and do an interview with the HR person.

You must have done something right!

Don’t worry about rejections at this stage because there's a lot of reasons for rejection, both subjective and objective. And usually what it comes down to is having a mismatch between your skill set and then company's needs.

Simple as that.

It has nothing to do with your personal traits, or you as a person. That is, unless you did something majorly wrong, such as kicking the office dog on your way out which I’m not sure why you would do such a horrible thing.

A company usually would not reject you simply because you're not good enough or anything like that.

If you already gotten the interview, that means the HR manager or the project lead or whoever is hiring for this role sees something in you that will bring value to the company.

Otherwise, there's absolutely no reason to waste your or their time talking to you.

Again, why bother setting up the interview? It’s because you've done something right.

Now, that is a fact.

You at least got an interview!

Now think of it from the other side: if both you and the other candidates are selected to be interviewed for the same role, do they really have an advantage over you?

Yes it’s possible they could be more technically proficient, have better social skills, worked at companies that everyone has heard of, or have 3 diplomas and 1 PhD or whatever.

But the fact that they're not automatically selected over you should already give you a confidence boost.

They supposedly have all these advantages over you, yet they still have to compete with you for the same job.

And that is your edge and their detriment.

You probably haven't worked at any of the Fortune 1000 companies. You didn't teach yourself programming since 8 years old. And you probably don't have a shiny resume that has recruiters lining up to speak to you. But you are selected to be interviewed among those who do have all those things.

How's that for a confidence boost?

Compounding growth

With a simple mindset shift, you can turn your disadvantages into your greatest weapon!

And when you stack up these positive mindset shifts, you will start to become more confident from the bottom of your heart.

No more pretending! No more trying to be someone who you're not.

Instead, you'll be more calm and collected when you're in similar situations. You have less self-doubt and be overall more positive.

And that's it. This one of the ways I discovered to instantly becoming more confident in everything I do.

Once you break free from limiting beliefs and have super positive mindset shifts, you will be unstoppable!

Now, I don't know how to end this. So I hope this is interesting and helpful to you in your job searching journey.

As always, if there's anything you’d like me to cover, or share, just hit me up.

I'll see you next time on “Sam talks about random subjects remotely related to computers or ‘computering’ as he calls it.”

The most important thing to understand in job searching: value

Reddit submission here.

Today I’d like to talk about what I think is the most important thing to understand in job searching: value.

I hope this could be helpful to some of you who are currently struggling to land your dream job, or finding a job at all.

I personally learned this the hard way so I like to share some of my learnings.

In order to understand value on a deeper level, you need to understand that everyone can create value.

Everyone is valuable

This may seem a cliché to a lot of you, but everyone is valuable.

Obviously, everyone could create something, and that's why people even have jobs to begin with, duh.

But a lot of times, when people are in the job application process, or during an interview, they completely forget that they could add a lot of value to the company they're trying to get into.

A lot of people would lack the confidence to believe that simply because they are beginners.

I’m here to tell (and hopefully show) you everyone is valuable to someone.

You have to remember that you’re here to bring value to a company; you're NOT begging for a job or anyone’s sympathy. You are here to create value, solve a problem, generate new ideas and help grow the business.

My point is, employees are paid for a reason:

if the employee adds value to the company, the company gives the employee values in return (e.g. money/salary).

There’s no need to feel insecure or insignificant about yourself when dealing with larger entities of people, be it the BigN, or your dream company.

Now, this is not to say that having value to add guarantees you a job at your dream company because another thing you need to understand is fit.

I don’t want to go on a huge tangent and talk about fit, but the basic understanding should be that sometimes the values you bring to the table may not be what the company is looking for at the time.

It’s just luck sometimes: this particular department in this company is looking for a particular skillset for this particular project at this particular time.

So don’t be too hard on yourself when you get rejected.

And definitely don’t shy away from following up a couple of months after rejection.

Most of the time though, you can still get your dream job if you understood how to align values.

Value alignment.

For the majority of my career, I had been a freelancer.

In the beginning, I was just being, you know, a typical freelancer.

I was doing web development and design and a little bit of Internet Marketing, but it was mostly spec work.

People would come to me and give me detailed requirements, both technical and design.

And they would ask me to code it out, be it a website or a web app, or a mobile app.

I was doing what a good developers/designers would: follow industry standards and best practices.

I cared about things like code maintainability, separate of concerns, responsive design, etc. And on the design front, I was keen on simple and minimalistic designs that create great contrast and hierarchy.

I was also advocating all of those things to my clients to educate them about the technical side of things.

Believe it or not, I was actually very proud of myself for being a freelancer who doesn't just do the work, take money and be gone, but instead be the one to help clients understand what goes into the work.

It all worked out fine until one day, one of my clients said to me

Dude, I appreciate you telling me all about the technical stuff. It sounds cool, though it sometimes sounds foreign to me. But honestly, I don't give a shit.
I care about getting more customers and having steady cashflow much more than responsive design or whatever.
And now, I just want a goddamned website.

And he was right.

In that moment, I felt both embarrassed and relieved because I finally figured out what I was missing:

I was too caught up in what I valued and completely neglected my clients’ values.

It’s true that I could just bring up some UX research on how the boring “technical stuff” can help drive revenue, I chose to be humble and embrace the mindset change.

Information about responsive design or functional programming or whatever may be interesting to the clients, but most of the time, they would much rather talk in terms of customer acquisition and revenue.

So from then on, I’ve learned the importance of value alignment.

I learned to think in my clients’ shoes and figure out how to use my skill set, based on what I value, to help my clients achieve their goals.

Of course, I didn’t stop trying to create beautiful designs and maintainable code.

But once I was able to align our values, I ended up creating more value for my clients and increase my own self-worth in the process.

A healthy side effect of this is I also started getting better clients and charged more.

Applying this to job searching or interviewing, I was able to align what I had to offer with what the company needed based on my research.

I was more valuable when I focused on how I could add value to the company and help them achieve goals than when I was only thinking about my own values.

At this point, you might be wondering:

What happens if I don’t any unique set of skills to differentiate myself from others?

As I mentioned before, everyone can create value, even beginners (especially beginners sometimes).

Being able to align values will make you more valuable and stand out amongst crowd given that:

  1. You understand the big picture: values and alignment;
  2. You can adapt/align your skill set to the company’s need specifically: good fit.

By understanding value and communicating how your values align, you can more or less make it a no-brainer decision to hire you!

Making it a no-brainer

Building on top of that, you can dramatically improve your portfolio or resume if you could clearly convey the values you provide and how they align with the company’s value to stand out even before interviews.

After all, the interviewer’s job is to fish out what value you bring to the table and whether or not it can help the company achieve goals.

This could take in the forms of a case study or a hand-picked mini-portfolio made specifically for the company you are applying for.

What this does is it takes out a lot of the doubts that the interviewer may have about you and drastically speed up the hiring process because all the answers are presented to them without them needing to think.

Annnd that’s it for now. I do hope this information is valuable to you all and help make your job searching journey easier!

In the future I may write about how to apply this mindset to practical actions in order to stand out and increase your perceived value. So stay tuned and subscribed to the newsletter 😉.

If there's anything else you would like me to cover regarding job searching, interviewing, portfolio building, or anything else in life, just hit me up!

10X your programming job application effectiveness

man wearing white top using MacBook
Photo by Tim Gouw / Unsplash

This one's for you who have submitted so many job applications that you feel physically sick of looking at your own cover letter.

You keep telling yourself,

Submitting my resume to as many companies as I can will increase my chances of getting hired because it is simply a "numbers game."

Every day you try to convince yourself that this will only go on for a couple more weeks max, according to other people's experiences shared online.

But after a few months, instead of getting brag-worthy job offers, you get one (or all) of these:

  • crickets
  • recruiters ghosting you
  • embarrassing or straight up humiliating interviews
  • "we'll give you a call [and never do]"
  • "sorry, position already filled" and other excuses
  • more crickets

Your patience starts wearing thin.

You start questioning your choice to get into programming.

Worse, you start doubting yourself:

"Am I not good enough?"
"Am I just not cut out for this?"

You are inches away from ending up with a completely shattered self-confidence and self-worth.

Your strategy is not working

If the above sounds like you — and you are absolutely sick and tired of feeling like nobody wants you, then hopefully you recognize that your current job application strategy is not working and it's time for a change.

B-but I have already tried other things like personalizing my cover letter to the companies — that didn't work either!

In theory, personalizing your cover letter does sound like a winning strategy that helps you stand out among those who simply blanket-spam their resumes to job sites as if electricity costs nothing. So what is wrong there?

Let's be real for a second: if a company has an open position that is at all decent, you should expect at least 5 other applicants competing for it.

In this day and age, most company's information is readily available from a few clicks away.

Personalizing cover letters is hardly a job-seeking secret now.

While mentioning the company's product line and expressing your admiration for the company's contribution to the society does make you sound slightly less like a robotic asshole, it really doesn't demonstrate that you have put in any efforts.

Overall, it's not a great experience for you or the person on the receiving end.

Applying for programming jobs should be fun!

The programming field (and most tech jobs) is highly creative. A large part of it comprises of creative problem-solving. The process of figuring out the solution is usually fun and rewarding.

So what if applying for programming jobs is the same way?

The good news is, it absolutely is!

Imagine feeling excited when you apply for jobs!

Imagine having confidence that your application will get the employer's attention.

Imagine getting a job offer not because your resume looks slightly better than other applicants', but because "you are exactly the perfect candidate we are looking for."

That's what happened to me.

After being ghosted by many recruiters, failing many interviews, and getting many "we'll get back to you [never]", I decided, "fuck it, I'm finding another way."

Well, over the years, I have found a few ways to get employers' attention and demonstrate my skills before I even get to talk with them.

One of my colleagues who interviewed me told me straight up:

Your submission was different than everybody else's, and you stood out immediately; hiring you was a no-brainer.

Naturally, I was flattered!

But this is all due to a few mindset changes I've had.

No secret mind-control tricks, and definitely no AI machine learning algorithms that figures out what buzzwords will impress interviewers the most (don't get any ideas)!

Sure, I approach job-seeking differently than most people I know, but in order to get your dream job, mindset changes will help you much more than tactics.

Here are the 3 main mindset changes I had undergone that helped me get interviews and job offers I wouldn't even dream of getting before.

1. Getting value right

Understanding value is the crucial first step.

Regardless of your skill level, whenever you provide value to someone, you will get value in return.

In our case, the value we get in return are usually in the form of pay cheques.

This is the so-called value exchange.

The problem job-seekers have, especially those new to the industry, is they lack the experience and confidence to justify to potential employers that they can provide enough value that warrants the amount of salary (monetary value) offered or more.

In other words, many junior and intern developers subconsciously think employers hire them out of pity, otherwise "which company in their right mind would hire a newbie straight out of college/coding bootcamp?". As such, most are not confident about their newly-acquired skills (perhaps this earlier post can help).

This is why a lot of times, simply demonstrating that you are passionate and willing to learn is not enough.

What you need to understand is:

You are there to trade your skillset with their money.

There is no reason to think about companies or interviewers as the high king.

You are simply equals doing a value exchange.

And of course, the same applies in reverse: be humble; don't be full of yourself simply because you possess abilities to provide value.

Once you understand this, the next step is to demonstrate that you are valuable.

2. Show, don't tell

You might have heard of the saying "show, don't tell."

It's a powerful way to quickly and directly get your point across to others.

In the case of applying for a programming job, you absolutely have the upper hand.

As I mentioned before, programming is one of the highly creative field. This is your opportunity to shine.

Instead of saying you are "a quick learner; team player; passionate about programming and design," you get to show all that in a demo project — how fun is that!

The best part is, your demo project can be scoped to a specific company you are applying for! How's that for personalization?

Imagine when the recruiter asks you "could you send me a few portfolio pieces?" and your response is

I'm glad you asked! I actually built a complete demo project that solves a problem I think your company would be facing at this stage.


What's better than a resume, a portfolio and a case study combined?

A portfolio piece that's built just for the company that acts as an extremely customized case study.

It doesn't even need to be a huge full-blown project. Just something to demonstrate your organization skills, technical proficiency, as well as adaptability all in one!

Once you realize the value you can provide, then demonstrate it with a company-specific demo project, the recruiter or hiring manager would have been so impressed by you that they would want to rush to the next steps of the interviewing process!

Why? Because no one else puts in this much effort. Many other applicants probably didn't even bother personalizing their cover letters.

So you must be all set, right?

Not so fast...

Turns out there could still be several other reasons a company would reject an applicant, namely the "fit" that everybody in the industry seems to be talking about.

3. What is "fit" anyway?

Way too often, candidates get rejected not because of their performance, but because of the so-called "fit", or lack thereof.

Many people think it's simply an excuse companies use to reject people because it's such a vague term.

In some cases, that might be true, but in many others "fit" can be a legitimate dealbreaker.

In fact, the interviewing process is not about trying to qualify yourself to be worthy enough to work for the company; it is instead about finding out whether you and the company are a good fit.

In my experience, "fit" can mean any number of the following:

Job requirement match. The company needs help in completing a project that requires in depth knowledge in a certain language or framework. This usually means the project has a tight deadline and that there is no time to train an individual to be ramp up to it. Therefore, companies usually hire an intermediate to senior level person who is easily adaptable or maybe even have done something similar before.

Many junior people get stuck on this: they think being a beginner means they are worthless to a company. Therefore, during interview, they feel like they are begging. They basically are relying on the interviewer’s generosity and sympathy (this is not a healthy mindset as explained above).

People get too caught up on these hard requirements such as seniority, location, etc.

Team personality match. Are their team members playful? Are they all die-hard Star Wars fans? Or are they completely foreign to pop cultures? Personality match can sometimes play a big part in the hiring decision, too. But don’t worry if you are shy or introverted, just strive to be a generally good human being, you should be find on this point.

Be a team player, talk about how you help other team mates in previous projects or any work whatsoever and why. Talk about being humble, and how you handle advice from other members with grace (instead of treating advice as attacks on ego and self-esteem). Show that you understand the power of a team is greater than that of an individual. Show that even if you are introverted, you get along with most people because you are considerate. The keyword here is again "show." Use examples, and don’t just say "I’m very considerate."

Belief. "I believe in helping other succeed", "I believe software should be easy to use and at the same time functional." These are all beliefs you may have. When you have different beliefs than the company, it may turn out to be a big problem for you and the company later down the road. Whether your beliefs align with the company's is a matter of choice. You may decide that some of your beliefs are not as important as others. Whatever is the case, know that misaligned beliefs can cause major problems later on.

Try to extract as much information as you can from in-depth research about the company. Sometimes companies literally spell out their beliefs for you in their mission statements, while other times you need to read between the lines and see the big picture in order to find out.

To re-emphasize, finding the right fit is not the sole job of the hiring party. You yourself is also responsible in making sure the company is a good fit for you!

There you have it, the secret to 10x your job application effectiveness!

Hopefully this article can help you reduce the stress associated with job applications and start approaching it as a more fun and rewarding process.

Confidence comes from practice, not preparation

Recently I got into card tricks.

No, I don’t want to be a magician. And trust me this has everything to do with confidence.

I find that playing with cards help me focus. In a way, it’s like a fidget toy; like a fidget spinner, except it’s actually cool. 😉

It looks super cool as well! Check out this video on one-handed shuffle:

If you haven’t got any experience in card handling (or as they call it, card flourishes), this might seem difficult, intimating, or downright impossible!

At least that’s how I felt 2 days ago.

Hell, I have difficulties shuffling with both of my hands, let alone one!

Anyway, I decided to give it a go.

Unsurprisingly, I couldn't do it, not even once. I spent a good 20 minutes of watching tutorials and trying to do it until my hands were sore.

I felt overwhelmed, intimidated, and honestly a tiny bit inadequate.

Somehow the conclusion my brain drew from that was that I must be missing some key pieces of the puzzle; maybe the tutorials were teaching me the bad methods or methods not suitable for my hand size or shape.

Looking back I was delusional, a little bit, or like a lot.

So for the next hour, I searched for more tutorials and guides on one-handed shuffles. I thought watching more tutorials and finding out the perfect method is key to my success in becoming an impressive one-hand shuffler. But if I still didn’t succeed, soon enough I will lose all the confidence in achieving this and never try again in a long time.

More time passed by, I still couldn’t do it. I failed to find what key information or secret I missed that kept me from success.

It's super frustrating as you can see haha.

At this point, only 2 hours later, it was clear to me that there isn’t a silver bullet, and maybe I just needed to practice more. Of course, my confidence level was staying low, but I tried to not let it affect me as much.

So over the 3 hours after that realization, I'd just kept on doing the same motions over and over again while watching other unrelated videos or thinking about other things.

Each time I failed, I had to actively fight against the negative feelings inching to chip away at my self-confidence and self-worth.

5 hours later, this was my result:

Yay! I had done it! It's not perfect, but I was satisfied.

And it only took my one entire afternoon to learn this skill that's useless to me.

How anti-climatic...

Well, guess what, success is boring.

Success in life, no matter how big or small, usually involves doing or practicing something many times repetitively.

It's not like in the movies where 3 montages later I could go from a total newbie to a master of the trade.

And the lesson I learned from this is that success, and ultimately confidence and self-worth, come from practice.

It doesn't matter how much time I spent preparing, learning about the science behind card shuffling, watching tutorials on how other people do it, or visualizing what success looks like. If I didn't practice and persistently keep on practicing, I would not have achieve any result at all.

So the moral of the story is: learn the one-handed card shuffle, it's fun. Don't be intimidated by seemingly hard things and don't get yourself stuck in the preparation phase.

Just do it, and keep doing it.

Life as a state machine

Credit: Myself

Had an idea this morning that I could try "programming" my life as a state machine or a giant "if-statement."

When we program an app, we try to anticipate edge-cases and malicious behaviours of our users.

Using that as an analogy, the "user" is myself, and the programmer is... also myself. Except the programmer is the person I want to become — productive, charismatic, determined, decisive, etc. And the user is the person that I sometimes become when I lack the motivation, self-control, and am I dealing with unexpected events and requests.

We can then create a trigger mechanism that we try to "brainwash" or "program" ourselves into adopting.

For example:

if (am_in_productive_mode && girlfriend_called_to_go_see_movie) {

Once these trigger-response mechanisms get documented and slowly adapted and turned into habits, we will start to gain control over our lives. We can also continuously improve ourselves by adding new response mechanisms and modifying/improving existing ones — just like how we do with building software products.

Anyway, just a quick idea for now. More details can be expanded later on if I decide to come back to expand on this idea.