JavaScript/TypeScript How to implement efficient Least Recently Used cache (LRU) in TypeScript This post is the output of this book. If you want to check all the code, go to my repository. What is cache? Cache is a ... 2024.02.28 JavaScript/TypeScript
Golang Golang Check variable order in Struct if you must reduce memory usage A recent computer has enough resources and thus we might not have the opportunity to reduce memory usage. However, it's ... 2024.02.26 Golang
Golang Golang Dynamic access to a property in a struct I needed dynamic access to all properties in a struct in unit tests. In my case, the struct has only boolean properties.... 2024.02.16 Golang
Golang Golang Is Compiling Regex In Loop Really Expensive? A regex is a useful feature to check whether a string contains a special format. If we have many formats, we might want ... 2024.02.05 Golang
Dart and Flutter Dart: Trie Data Structure: The Key to Fast and Effective Search Structure Trie (same pronunciation as "try") is a tree-like data structure. It has the following looks. Let's assume tha... 2024.01.15 Dart and Flutter
Python Python Check performance by using timeit We should somehow check the performance if we want to compare some implementations to know a faster one. It can be done ... 2024.01.08 Python
Golang Golang Implement Debounce logic in different ways There are multiple ways to implement Debounce Logic in Golang. I want to compare the differences and check which one is ... 2023.12.27 Golang
Golang Golang How to implement Debounce and how to use time.Timer properly timer.Timer is simple but it's not as straightforward to use it as it looks. What can we do with time.Timer? There are t... 2023.12.13 Golang
Golang Golang Which way is the best to declare array/slice Have you ever considered the best way to declare an array/slice in Golang? Golang offers several ways to declare it. It'... 2023.12.11 Golang
Python Python How to add custom fields to logging formatter logging module is a useful module for logging. The log format somehow needs to be defined to make it more readable. The ... 2023.11.22 Python