In this blog, I would like to share how I publish my own react components to Node Package Manager or NPM. There are many ways to achieve the same goal. I tried many of them. But I think this is the easiest and quickest one I ever found.
First of all, for those who wonder why we should consider publishing the components, I would point out one major benefit of doing that.
It improves modularization and re-usability: You may have heard that it is always recommended to keep the components as small as possible. By keeping it small, the components…
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.
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.
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…
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…
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…
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.
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…
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…
A Certified Public Accountant / Hobbyist-but-serious programmer specializing Python, ReactJs, Blockchain / anarchist / Libertarian / Would-be digital nomad