That is one lengthy, specific title. Well, that is because what I am about to cover on this post might not work for you if you had some differences in your machine’s setup.

I always setup a new SSH alias when I join a new company. This allows me to easily use a different SSH key for that specific company without having to write a lengthy git command. Now, there are many tutorials on how to access private Go packages, but I only found one that covers the use of SSH alias. …


Let’s kickoff this post with this code snippet.

Function parameter overloaded

Both call to bodyMassIndex will not throw any warning on TypeScript, even though the second call has an overloaded parameter in the key name. One thing about TypeScript’s typing, it is not that strict.

For example, the contracts, or interface, in TypeScript can have optional properties. Moreover, its concrete implementation is allowed to have more properties in it than what the interface defines. Some may say it is the wrong way to do contracts, but for me at least it is better than no contract at all.

Back to the post.

I…


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.
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.

resizeToAvoidBottomInset

The…


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

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

Taufan

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