Logo Jim Chng
Jim Chng

  • About
  • Projects
  • Blog
    • Blog Menu Description
    • Archives

    • Series

      List of series.

    • Categories

      List of categories.

    • Tags

      List of tags.


/

  • Github RSS

  • Language
    • English

  • Font Size
  • Palette
  • Mode
Taming Hierarchical Data: Mastering SQL Recursive CTEs for Advanced Tag Management

Hierarchical data structures are everywhere in modern applications, from e-commerce categories to knowledge bases. This comprehensive guide demonstrates how SQL’s recursive Common Table Expressions (CTEs) elegantly solve the challenges of nested taxonomies without complex application code. Learn how to build a complete tag hierarchy system, navigate parent-child relationships efficiently, generate breadcrumb trails, prevent cyclic references, and implement powerful content filteringβ€”all with clean, maintainable SQL queries that scale with your data’s complexity.

Refining TypeScript's Opaque Types for Enhanced Type Safety

An exploration of opaque types in TypeScript and a refined implementation that provides stronger guarantees for handling sensitive information.

Supercharging Python Automation with Nox: Beyond Basic Usage

A deep dive into extending Nox’s capabilities with custom decorators and classes, turning it into a comprehensive automation solution that can replace Makefiles and shell scripts.

Previous Next

Taming Hierarchical Data: Mastering SQL Recursive CTEs for Advanced Tag Management

featuresqlblog.png
May 10, 202523 min read Databases Engineering SQL Databases Engineering SQLDatabase DesignHierarchical DataRecursive CTEsSQL

Discover how self-referencing tables and declarative SQL can replace repetitive application logic, reduce database round-trips, and deliver powerful features like subtree content filtering and dynamic breadcrumb navigation.

Read More

Refining TypeScript's Opaque Types for Enhanced Type Safety

feature-typescript-opaque-types.png
February 1, 20258 min read Engineering TypeScript Development Engineering TypeScriptAdvanced TypesSecurityType SafetyTypeScript

Learn how to improve TypeScript's opaque type pattern for better protection when working with encrypted strings and sensitive data.

Read More

Supercharging Python Automation With Nox: Beyond Basic Usage

featured-nox-blog-post.png
January 15, 20257 min read Engineering Python Development Engineering PythonAutomationDevOpsNoxPythonTesting

Learn how to extend Nox with custom decorators and classes to create a more flexible, powerful automation system for your Python projects.

Read More

Compile-Time Hex String Validation in Rust Using Const Evaluation

feature-rust-compile-time-hex-str-validate.png
January 12, 20258 min read Engineering Rust Development Engineering RustConst EvaluationMetaprogrammingRustType Safety

Learn how to leverage Rust's const evaluation features to validate hex strings at compile time, ensuring type safety and zero runtime overhead.

Read More

All Decorators - Systematically Decorating Python Class Methods

featured.webp
January 9, 202513 min read Engineering Python Development Engineering PythonDecoratorsMetaprogrammingPython

A deep dive into systematically decorating all methods of a Python class, exploring challenges and solutions using the Descriptor protocol.

Read More

Template Metaprogramming: A Tale of Two Languages (C++ and Rust)

feature-cpp-rust-median.png
March 16, 202417 min read Engineering Programming C++ Programming RustC++MetaprogrammingRustTemplatesType Systems

Exploring the fascinating world of template metaprogramming in both C++ and Rust through a practical example of calculating medians with type-dependent returns.

Read More

Mastering ManuallyDrop<T> - A Guide to Explicit Resource Management in Rust

feature-post-05feb2024iii.jpeg
February 3, 202411 min readManuallyDropNon-Affine TypesRustSubstructural Type System

Delve into the intricacies of Rust's memory model and learn how ManuallyDrop empowers developers to take control of resource lifetimes.

Read More

Non-Affine Types, ManuallyDrop and Invariant Lifetimes in Rust - Part One

feature-post-05feb2024ii.jpeg
February 3, 20248 min readInvariant LifetimesManuallyDropNon-Linear TypesRust

Part One: Exploring non-affine types and invariant lifetimes in Rust through writing the sosecrets-rs crate.

Read More

Custom Bitwidth Integers: A Case for Mojo

feature.webp
October 23, 20236 min readArtificial IntelligenceCustom BitwidthMojoPythonRust

Mojo's ability to interface directly with the Multi-Level Intermediate Representation opens up a whole new programming paradigm with custom bitwidth integers.

Read More

Crafting Pydantic-Compatible Custom Python Datatypes in Rust With PyO3

feature.webp
February 28, 20236 min read Engineering Rust Development Engineering RustPydanticPythonRust

Rust-implemented custom python datatype that is also pydantic-compatible.

Read More
Profile
Jim Chng
Jim Chng
Software Engineer. Python | Rust | TypeScript | C++ | Go.
Earth
AboutContact
Taxonomies
Engineering 7 Development 6 Rust 4 Python 2 C++ 1 Databases 1 Programming 1 SQL 1 TypeScript 1
Engineering 8 Rust 3 Python 2 Databases 1 Programming 1 SQL 1 TypeScript 1
Rust 7 Python 5 Metaprogramming 3 ManuallyDrop 2 Pydantic 2 Type Safety 2 Advanced Types 1 Artificial Intelligence 1 Automation 1 C++ 1 ALL 29
2025 5 2024 3 2023 2
Posts
  • featuresqlblog.png
    Taming Hierarchical Data: Mastering SQL Recursive CTEs for Advanced Tag Management
    May 10, 2025
  • feature-typescript-opaque-types.png
    Refining TypeScript's Opaque Types for Enhanced Type Safety
    February 1, 2025
  • featured-nox-blog-post.png
    Supercharging Python Automation With Nox: Beyond Basic Usage
    January 15, 2025
  • feature-rust-compile-time-hex-str-validate.png
    Compile-Time Hex String Validation in Rust Using Const Evaluation
    January 12, 2025
  • featured.webp
    All Decorators - Systematically Decorating Python Class Methods
    January 9, 2025
  • featuresqlblog.png
    Taming Hierarchical Data: Mastering SQL Recursive CTEs for Advanced Tag Management
    May 10, 2025
  • feature-typescript-opaque-types.png
    Refining TypeScript's Opaque Types for Enhanced Type Safety
    February 1, 2025
  • featured-nox-blog-post.png
    Supercharging Python Automation With Nox: Beyond Basic Usage
    January 15, 2025
  • feature-rust-compile-time-hex-str-validate.png
    Compile-Time Hex String Validation in Rust Using Const Evaluation
    January 12, 2025
  • featured.webp
    All Decorators - Systematically Decorating Python Class Methods
    January 9, 2025

Featured Posts

Featured Posts
  • Taming Hierarchical Data: Mastering SQL Recursive CTEs for Advanced Tag Management
  • Refining TypeScript's Opaque Types for Enhanced Type Safety
  • Supercharging Python Automation With Nox: Beyond Basic Usage
  • Compile-Time Hex String Validation in Rust Using Const Evaluation
  • All Decorators - Systematically Decorating Python Class Methods

Recent Posts

Recent Posts
  • Taming Hierarchical Data: Mastering SQL Recursive CTEs for Advanced Tag Management
  • Refining TypeScript's Opaque Types for Enhanced Type Safety
  • Supercharging Python Automation With Nox: Beyond Basic Usage
  • Compile-Time Hex String Validation in Rust Using Const Evaluation
  • All Decorators - Systematically Decorating Python Class Methods
Actions
Twitter Facebook

Go back Reload Copy URL

Move into the Future

Software Engineer | Python 🐍, Rust πŸ¦€, TypeScript, Mojo, Go

Copyright Β© 2016-2025 Jim Chng. All Rights Reserved.
Build with ❀️ from the Hugo and the HBS theme.