Ever since learning about it, I have always thought that generic type is awesome. But now I know that it can be even more awesome!

With generic, a single type can be reused with a variety of other types. Think of Promise, it can resolve to just about anything. For example, in one case it would resolve a string, while another case expect it to resolve a boolean. As Promise type is a generic, we can assert the resolved value by passing the type into its generic, like so Promise<string> or Promise<boolean>.

Alright, enough of the basic. What if you…

I am pretty pissed right now as I just spent about one and a half hours hunting down the exact place a value was defined in a Vue 2 app I am maintaining. Needless to say, it was very unpleasant.

I was trying to refactor the code, extracting out a component from a page to be reusable. As I was moving the code around, the console logged an error:

[Vue warn]: Invalid prop: type check failed for prop "myProp". Expected String with value "undefined", got Undefined

The code shows the expected value seems to be coming from a computed value…

I am setting my goals for 2021, many of which are intentionally ambitious to ensure I work my ass off to achieve them.

  1. Be a better father and husband.
  2. Save an emergency fund with a 12-month runway.
  3. Save and invest regularly every month.
  4. Buy a house.
  5. Get an insurance for my family.
  6. Send money back home every month, to help the parents.
  7. Grow my net worth to be 5 times of today.
  8. Travel to 4 different places with my wife and son.
  9. Do 3 sets of 10 reps of push up, sit up, and squat every day.
  10. Run for 30…

Form is ubiquitous in apps. So there is a high chance that you will hit this problem in your first encounter with Flutter.

Say you were testing your pixel-perfect designed form on your test device. You hit the input field, the device’s keyboard was brought up and it covered some of your screen’s contents. You saw a little warning about bottom overflow. You checked your terminal and it printed:

Exception: RenderFlex overflowed by 250 pixels on the bottom.
Exception: RenderFlex overflowed by 250 pixels on the bottom.
RenderFlex overflow warning

Regardless of the warning, your UI seems to still work, kind of. You noticed that scrolling did not work. So, you googled the problem and found an answer on SO.



I was experimenting with a factory that build an instance of a class, which is passed as a parameter of the factory method. However, TypeScript kept throwing an error as I type the parameter with an interface.

Messenger interface
Messenger interface
Messenger interface

The error thrown was “Type ‘Messenger’ has no construct signatures”.


Is writing…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store