Code Mala Tang
Author

Code Mala Tang

Read source code together, write articles together, and enjoy spicy hot pot together.

451
Articles
0
Likes
1.4k
Views
0
Comments
Recent Articles

Latest from Code Mala Tang

100 recent articles max
Code Mala Tang
Code Mala Tang
Nov 5, 2025 · Backend Development

How to Build a Production-Ready Async LLM API with FastAPI

Learn how to design and deploy a high‑performance, production‑grade LLM API using FastAPI, covering async routing, type‑safe Pydantic models, streaming via SSE/WebSockets, middleware, caching, rate limiting, observability, retries, and cost‑control strategies for robust AI services.

AsyncFastAPILLM
0 likes · 12 min read
How to Build a Production-Ready Async LLM API with FastAPI
Code Mala Tang
Code Mala Tang
Nov 3, 2025 · Fundamentals

When to Use [] vs list() in Python: Performance, Readability, and Pitfalls

This article compares Python's literal [] and the list() constructor, examining their speed differences, readability implications, default‑argument pitfalls, object identity, and appropriate use cases such as creating empty lists, converting iterables, and avoiding mutable default parameters.

PerformancePythondefault-arguments
0 likes · 8 min read
When to Use [] vs list() in Python: Performance, Readability, and Pitfalls
Code Mala Tang
Code Mala Tang
Nov 2, 2025 · Backend Development

5 Essential Python CLI Tools to Supercharge API, Monitoring & Data Tasks

Discover five powerful Python command-line utilities—httpie for readable API calls, glances for real-time system monitoring, rich-cli for colorful output, howdoi for instant Stack Overflow answers, and csvkit for advanced CSV manipulation—each with installation steps and practical examples to streamline your development workflow.

AutomationCLIDevelopment
0 likes · 5 min read
5 Essential Python CLI Tools to Supercharge API, Monitoring & Data Tasks
Code Mala Tang
Code Mala Tang
Nov 2, 2025 · Fundamentals

Unlock Cleaner Code with Python’s Dataclasses: A Practical Guide

This article explains what Python dataclasses are, how they simplify data‑oriented class definitions, and demonstrates advanced features like custom field behavior, the __post_init__ method, and immutable (frozen) classes with clear code examples.

Code SimplificationImmutablePython
0 likes · 4 min read
Unlock Cleaner Code with Python’s Dataclasses: A Practical Guide
Code Mala Tang
Code Mala Tang
Nov 1, 2025 · Frontend Development

Unlock Conditional Styling with CSS if(): A Game‑Changer for Frontend Development

The new CSS if() function, now in Chrome 137, lets developers embed conditional logic directly in style sheets, eliminating JavaScript toggles, preprocessors, and complex media queries, and offering three powerful capabilities—style queries, media queries, and feature detection—along with real‑world examples, current browser support, and future extensions.

CSSConditional Stylingfrontend development
0 likes · 7 min read
Unlock Conditional Styling with CSS if(): A Game‑Changer for Frontend Development
Code Mala Tang
Code Mala Tang
Nov 1, 2025 · Fundamentals

How functools.partial Can Simplify Repeated Function Calls in Python

Using Python's functools.partial, you can pre‑fill common arguments to create concise, readable wrappers that eliminate repetitive parameter passing, improve safety, and streamline code in scenarios ranging from email utilities to Flask handlers and machine‑learning pipelines, while avoiding over‑use pitfalls.

Pythonbest practicescode-reuse
0 likes · 6 min read
How functools.partial Can Simplify Repeated Function Calls in Python
Code Mala Tang
Code Mala Tang
Nov 1, 2025 · Frontend Development

Unlock JavaScript’s Static Initialization Blocks: Boost Your Custom Elements

This article explains JavaScript static initialization blocks, shows how they simplify shared resources and custom element setup, provides practical code examples, discusses benefits, browser compatibility issues, and offers guidance on when and how to use them effectively.

JavaScriptWeb developmentcustom elements
0 likes · 6 min read
Unlock JavaScript’s Static Initialization Blocks: Boost Your Custom Elements
Code Mala Tang
Code Mala Tang
Oct 29, 2025 · Frontend Development

Implementing Robust Undo/Redo in Fabric.js Canvas Editors

This article explains how to add undo and redo functionality to a Fabric.js canvas editor by maintaining a history stack, provides full source code, discusses performance considerations, and compares alternative approaches such as the Command Pattern and object‑level diff snapshots.

CanvasFabric.jsJavaScript
0 likes · 8 min read
Implementing Robust Undo/Redo in Fabric.js Canvas Editors
Code Mala Tang
Code Mala Tang
Oct 28, 2025 · Artificial Intelligence

Unlocking AI Creativity with Just Eight Words: The Verbalized Sampling Breakthrough

A recent Stanford and West Virginia University study reveals that a simple eight‑word prompt technique, called Verbalized Sampling, can double the creative output of large language models without costly retraining, by exposing hidden diversity suppressed by conventional alignment methods.

AI creativityLLM sampling techniqueslarge language models
0 likes · 9 min read
Unlocking AI Creativity with Just Eight Words: The Verbalized Sampling Breakthrough
Code Mala Tang
Code Mala Tang
Oct 27, 2025 · Frontend Development

Master Fabric.js: Build Interactive Canvas with Zoom, Snap, and Guides

This article walks through setting up Fabric.js on a web page, creating a canvas, drawing rectangles, adding zoom and pan controls, implementing object snapping and alignment guides, and provides complete source code so readers can quickly build an interactive canvas application.

CanvasFabric.jsJavaScript
0 likes · 21 min read
Master Fabric.js: Build Interactive Canvas with Zoom, Snap, and Guides