Photo by Nick Chong on Unsplash

Introduction

As I see dozens of cryptocurrencies’ price up and down 24/7, I always wondered what kind of genius made them because I know the fact that the mathematics behind the blockchain technology is intimidatingly complex.

Coins VS Tokens

Let me make the terms clear first. Sometimes people use the terms “coins” and “tokens” interchangeably. As far as I know, there is no legal definition between them. However, usually coins refer to cryptocurrencies that have its own blockchain such as “Bitcoin” or “Ethereum” whereas tokens refer to cryptocurrencies on other coin’s blockchain such as Tether or BitTorrent. …


This blog is about how to check if a string value in “yyyymmdd” format is valid date. The TypeScript code below is the function that I have created.

validateDateYYYYMMDD

The function returns true only if the date exists on the calendar.

If you are reading this blog, you probably know that new Date(2021, 2, 29) returns 2021–3–1, not throwing an error or returning false even though 2021–2–29 does not exist on the calendar.

I made this function returns false when the date overflows the month. I tried to check the 5th and 6th characters such as “02” in the example…


This is a node project module I have created and managed. It is a collection of trivial functions I often use in multiple projects. This blog is documentation of the module explaining how to use each function inside this module and why I made them.

I made this module in order to prevent myself from coding the same functions in different projects over and over. Accordingly, the functions here are all for general purposes.

I know that I could simply use great modules created by other great programmers such as lodash. But I strongly believe the statement “if you do…


Photo by Roman Synkevych on Unsplash

As you handle more than one project, you may encounter situations where you have to code trivial functions repeatedly across the projects.

As a sincere DRYer (Don’t Repeat Yourself), in order to avoid it, I package the frequently-used-functions using the npm(also known as Node Package Manager). Then, all I have to do is to install the package and use it without repeating myself in every other project.

In this blog, I will share how I package the functions for reusing them in various other projects. The package is written in typescript and compiled & distributed with the extension of .d.ts…


Why do we need custom hooks?

The answer is we don’t and we do. It depends. If you want to make your code more concise and neat, adopting custom hook may help you.

There are so many new concepts and techniques emerging in the software world. Sometimes, I sometimes ignore and avoid them on purpose.

Custom hook was one of them, but not any more to me.

I used React for a year and now I got to understand what custom hooks do and why they are useful.

First of all, take a look at what the official document says.

Building your own Hooks lets you…


Photo by Christian Wiediger on Unsplash

This post is about how to initiate Electron desktop application on top of React. Building desktop application with Electron is pretty good in that your React and JavaScript skills can be reused.

Even though demand for desktop applications decreases due to handy mobile and web applications, some applications still need to run on desktop. In my case, I decided to develop my own torrent client called “ts-torrent”.

I will not explain what React.js and Electron.js are because it may waste valuable time of most readers. If you are not familiar with them, just google them.

In this post, I would…


This blog is my coding log to leave message to myself in the future and those who may be wasting time for the same challenge I just resolved a minute ago.

The Challenge:

  1. I have a PDF file in my AWS S3 Bucket.
  2. I successfully fetch a presigned url for the PDF file.
  3. My goal is to load the PDF file in my web application, using only html tags such as <iframe src = "https://xxxxx"/> or <embed src=“https://xxxxx"/> without 3rd-party modules such as PDF.js.
  4. It works seamlessly on Firefox (version 83), but it does not work on Chrome(version 87), showing…

Photo by Timo Wielink on Unsplash

In this post, I would like to share my research on Map, a newly introduced JavaScript collection type in ES6. Recently, I am considering refactoring my JavaScript code in the hope of improving optimization level of my web application. Replacing old objects with Map could be one way of achieving the goal.

It is inevitable to discuss Map without comparing Object because they are very similar like brothers and sisters in that both hold key-pairs in their collection. In most cases, they can be used interchangeably.

However, if you are serious about optimizing your application and maintaining your codes as…


Photo by Curtis MacNewton on Unsplash

As a CPA, I use Excel a lot at work. And sometimes I use it with node.js programming language for some automation. when using it with the programming language, one thing that bugged me is to handle dates in Excel.

If you are familiar with Excel like me, you may already know that a date in Excel is in fact a number. For example, a date like 2015–3–25 in a cell is originally a number 42,088 and translated or calculated into a text such as ‘2015–3–25", “March, 25, 2015", “2015/03/25", or “3/25/2015". Why?

It is obvious why Excel is designed…


Photo by Ferenc Almasi on Unsplash

React is a great framework. It is now dominating the front-end world. Hooks make React even greater. Hooks like useState, useEffect and useRef are helping us build a SPA faster and its codes to be shorter. There is one more thing that even make React "greaterer". It is custom hooks.

Did you know that you can create your own hooks by combining built-in hooks? When I first heard of the concept of making my own hooks, I could not grasp the concept of them

The best way for me to understand the concept of custom hooks was to learn by…

Steve Kim

A Certified Public Accountant / Hobbyist-but-serious programmer specializing Python, ReactJs, Blockchain / anarchist / Libertarian / Would-be digital nomad

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