glucn's blog
I build things with code, and I write about it here.
Learn how to optimize images in Next.js using the powerful `next/image` component. Improve your web performance with automatic optimization, responsive images, lazy loading, and support for external URLs. Discover best practices and tips for efficient image handling in your Next.js applications.
More Stories
Choosing The Right Cloud: A Deep Dive Into China's Cloud Providers
Navigating the cloud landscape in China's vast market, this post compares major providers like Alibaba Cloud and AWS, focusing on market share, compliance, and developer experience. This post offers insights to make an informed choice for anyone considering cloud services in China.
How To Embed YouTube Video In Next.js Website
This post explores embedding YouTube videos in Next.js websites, comparing the basic iframe method and the approach of using @next/third-parties, highlighting benefits and performance optimization considerations.
Mastering Key Management in DNSSEC
Unlock DNSSEC security: Best practices for key management, secure storage, and automated DNS operations to safeguard against cyber threats and enhance internet safety.
How To Integrate ChatGPT With Apple HomeKit
Integrating ChatGPT with Apple HomeKit using iOS Shortcuts for smart home device control with natural language commands, step-by-step guide provided.
How To Add Google AdSense To Hugo + PaperMod Website
Guide to integrating Google AdSense in a Hugo + PaperMod theme website.
DNSSEC Explained
DNSSEC enhances DNS security by ensuring responses are from authenticated origins, though it doesn't encrypt traffic or solve "last-mile" security issues.
How To Tune Hyperparameters with Optuna
Using Optuna for faster, more efficient hyperparameter tuning in machine learning projects, achieving top 9% in a Kaggle House Price Competition.
How To Create AWS RDS MySQL Instance Master Password With CloudFormation
Securely creating an AWS RDS MySQL instance master password using CloudFormation and Secrets Manager for enhanced security.
How To Implement “finally” block in AWS Step Functions
Implementing a "finally" block in AWS Step Functions using Catch with States.ALL for cleanup tasks, despite no explicit feature.
How To Mock DNS Server in Java
Exploring dnsjava's retry logic by creating a mock DNS server in Java, highlighting the importance of testing third-party libraries to fully understand its behaviour.
Golang: The time complexity of append()
The amortized cost of Go's append() function is O(1), but the worst-case scenario is O(N), with efficiency depending on slice size and memory allocation.
Golang: An interface holding a nil value is not nil
An interface in Go with a nil value isn't nil unless both its type and value are nil.
Lessons Learned From Refactoring Legacy Code
Refactoring legacy code involves understanding and testing beforehand, separate refactoring from other changes, considering fallbacks, and ensuring good test coverage.
How To Race Functions In Golang
This post discusses racing two functions querying data from Google Cloud Spanner and Elastic, using Golang's concurrency features, in order to enhance performance and reliability.
How To Query Data In Array Of Nested Structures
This post explains querying data within nested structures in databases like Elasticsearch, Google BigQuery, and Google Cloud SQL.
How To Mock An Interface In Golang
The post discusses solutions for mocking an interface in unit tests in Golang (Go programming language).
How To Use Javascript Library In Typescript Angular Project
The post describes how to integrate a JavaScript library into a TypeScript Angular project.
How To Decode HTTP Response In Golang
By walking through an example of changing JSON field type, this post discusses how to make such breaking change safely, and how to decode HTTP response in Golang (Go Programming Language).
Eventual Consistency In Google Cloud Datastore
Addressed Google Cloud Datastore's eventual consistency challenge by creating a mapping table, ensuring data integrity.