Guance Learn

Observability questions

Focused answers for definitions, architecture choices, troubleshooting, pricing, and evaluation.

Python programming and application logging
Explainer

Check whether a Python string contains a substring

Use in for substring checks, find or index for positions, and casefold for caseless matching. Avoid confusing a zero position with a failed search.

Python programming and application logging
Explainer

Check for an empty or whitespace-only string in Python

Distinguish empty strings, whitespace, and None in Python, and choose an input check that matches the types your application accepts.

Python programming and application logging
Explainer

Check whether a Python string represents a number

Choose integer, floating-point, or digit validation in Python. Handle signs, Unicode digits, NaN, infinity, and conversion errors explicitly.

Illustration of Git branches and version history
Technical guide

Check out a remote Git branch

Fetch a remote branch and create a local tracking branch, resolve ambiguous remote names, or inspect the commit in detached HEAD.

Illustration of server operations and request logs
Explainer

Clear or bypass an Nginx cache safely

Distinguish proxy and FastCGI caches from browser caches, understand bypass versus purge, and avoid a burst of origin traffic.

Illustration of Git branches and version history
Technical guide

Clone a Git repository into a specific folder

Pass a destination directory to git clone, clone into an empty current folder, or connect an existing folder to a remote after preserving local files.

Python programming and application logging
Explainer

Add color to Python logging output

Use colorlog or a custom logging formatter for terminal colors, while keeping redirected output and file logs free of ANSI escape sequences.

Python programming and application logging
Explainer

Concatenate lists in Python

Choose list addition, unpacking, extend, or itertools.chain based on whether you need a new list, in-place changes, or lazy iteration.

Illustration of Git branches and version history
Technical guide

Ignore local files in Git without changing the shared .gitignore

Use the repository exclude file or a global ignore file for personal untracked files. Understand why skip-worktree does not reliably ignore tracked edits.

Python programming and application logging
Explainer

Convert an integer to a string in Python

Use str for integer conversion and f-strings for formatted text. Handle concatenation, padding, numeric bases, and conversion back to integers.

Python programming and application logging
Explainer

Copy files and directory trees in Python

Use shutil.copy, copy2, and copytree, understand metadata limits and overwrites, and handle errors without treating a file copy as a complete backup.

Python programming and application logging
Explainer

Pause execution in Python with sleep

Use time.sleep in synchronous code and asyncio.sleep in coroutines, with clear limits for timing accuracy, thread behavior, and recurring schedules.