한국어 | English | 日本語
Senior Web Application Developer (8.8+ years)
Tech & Dev
engineering
Focusing on web frontend and backend development
The Difference Between Throttling and Debouncing
Throttling and debouncing are solutions to prevent performance issues caused by excessive function calls, such as a browser suffering memory strain from hundreds or thousands of calls when a user scrolls a webpage with a mouse scroll event. To prevent performance degradation due to numerous calls, simply reduce the number of calls. Throttling controls the interval between calls, while debouncing groups multiple calls into a smaller number of calls.
CORS - A Complementary Policy to SOP for Cross-Origin AJAX Calls
When I first delved into web development, CORS was one of the initial challenges I encountered. CORS itself isn't an issue but a protocol that informs developers when a request doesn't adhere to its rules. It's a fundamental security component for web browsers. While linking external images for a blog doesn't pose a security risk, retrieving dynamic resources from external sources via AJAX calls like POST or PUT can alter server state, creating security vulnerabilities. Therefore, calls that modify server state (including client state changes via cookie headers) must be rigorously verified to ensure they are genuinely intended by the developer. Otherwise, malicious script injection into a blog could trigger unwanted AJAX calls to manipulate server resources on an external domain.
JavaScript Runtime Environments: Chrome 'Browser' vs. Node.js 'Server'
Both Chrome browser and Node.js utilize the renowned V8 JavaScript engine. Both, built upon a JavaScript engine, are referred to as JavaScript Runtime Environments. Simply put, they are environments where JavaScript code executes. So, what sets them apart? The Chrome browser environment provides all features a user needs in a browser, such as DOM manipulation related to rendering, external resource calls like AXIOS, and image processing, all via Web APIs. The Node.js server environment, on the other hand, provides an event queue, event loop (single-threaded), and worker thread configuration to handle numerous requests.
Spring Security: SecurityContextHolder's Thread Sharing Strategies
I encountered a peculiar bug where Spring Security session information intermittently vanished within a `parallelStream` introduced for parallel processing. Like 'Schrödinger's Cat,' the results varied with each refresh. This post delves into the cause of this phenomenon and explores the three strategies SecurityContextHolder uses to share session data in a multi-threaded environment.
Wrapper Class Caching: The `==` Operator Issue with Integer Objects
When comparing `Integer` objects in Java using the `==` operator, why do some values return 'true' while others return 'false'? Behind this seemingly simple mistake lies JVM's 'Wrapper Class Caching' mechanism, designed to maximize memory efficiency. This article delves into Java's memory management strategy through an intermittent bug encountered in a real-world project.
토스트 예시 메세지