Guance Learn

Observability questions

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

Python programming and application logging
Explainer

Read standard input in Python

Use input for prompts, stream lines from sys.stdin, or accept files and pipes with fileinput without accidentally consuming input twice.

Python programming and application logging
Explainer

Remove a key from a Python dictionary

Choose del or pop for dictionary deletion, distinguish a missing key from a stored None, and remove multiple entries without mutating an active iterator.

Python programming and application logging
Explainer

Remove trailing newlines from a Python string

Choose rstrip or removesuffix based on whether you want to remove all trailing newline characters, one line ending, or every kind of whitespace.

Python programming and application logging
Explainer

Reverse a string in Python

Reverse a string with slicing or reversed, and understand why Unicode code-point reversal may split combining marks or emoji sequences.

Python programming and application logging
Explainer

Schedule a Python script with cron

Run a Python script from cron with explicit paths, a predictable environment, writable logs, and checks for failed or missing executions.

Python programming and application logging
Explainer

Sort a list of dictionaries by a field in Python

Sort records with a key function, combine multiple fields, choose missing-value behavior, and preserve stable ordering.

Python programming and application logging
Explainer

Sort a dictionary by keys or values in Python

Create sorted item lists or dictionaries, handle ties and mixed types, and distinguish insertion order from automatic sorted order.

Python programming and application logging
Explainer

Split a Python list into chunks

Use slicing or itertools.batched to process fixed-size groups, validate the chunk size, and distinguish chunk size from number of chunks.

Python programming and application logging
Explainer

Start a local HTTP file server with Python

Serve a directory for local testing with http.server, choose the bind address explicitly, and understand version-specific HTTPS support and exposure limits.

Python programming and application logging
Explainer

Convert strings to uppercase or lowercase in Python

Use Python string case methods, choose casefold for Unicode-aware comparisons, and avoid surprising title-case and whitespace behavior.

Log collectors routing application events to their destinations
Explainer

How do I add fields or routing tags to Fluentd events?

Use record_transformer to enrich Fluentd records, rewrite_tag_filter to route errors, and a tail input tag to identify file events.

Illustration of Git branches and shared commit history
Technical guide

Fix Git’s “Another Git process seems to be running” error

Check for an active Git operation before removing a stale lock. Locate the correct lock file, including in linked worktrees, and preserve staged changes.