Guance Learn

Observability questions

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

Python programming and application logging
Explainer

Run an external program or command from Python

Use subprocess.run to pass arguments, capture output, check failures, set timeouts, and redirect command output without unnecessary shell parsing.

Illustration of an event loop and asynchronous tasks
Technical guide

Exit a Node.js program cleanly

Set an exit code without discarding pending work, close resources deliberately, and reserve process.exit for an intentional forced termination.

Python programming and application logging
Explainer

Deactivate a Python virtual environment

Leave an activated Python environment, reactivate it on your platform, and check which interpreter a terminal or process is actually using.

Python programming and application logging
Explainer

Extract a file extension in Python

Use os.path.splitext or pathlib suffix properties to handle ordinary extensions, dotfiles, and compound filenames without fragile string searches.

Illustration of Git branches and version history
Technical guide

Fetch all branches in Git

Fetch remote-tracking branches from one or more remotes, fix a single-branch refspec, and understand what --all and --prune actually update.

Illustration of Git branches and version history
Technical guide

Find and restore a deleted file in Git

Locate a deletion commit, restore the file from its parent, stage the recovered file, and distinguish committed deletions from working-tree or index changes.

Illustration of Git branches and version history
Technical guide

Find a deleted file in Git history

Locate deletion commits, search changed content, follow earlier paths, and restore a file from the appropriate parent snapshot.

Illustration of files, modules, and dependencies
Technical guide

Find the installed version of an npm package

Distinguish installed packages, manifest ranges, lockfile resolutions, and registry versions before diagnosing a dependency problem.

Illustration of Git branches and version history
Technical guide

Find when and by whom a file was deleted in Git

Locate deletion commits, inspect author and committer metadata, recover the previous contents, and choose between restoring one file and reverting a whole commit.

Illustration of scheduled jobs, logs and Linux operations
Explainer

Troubleshoot cron jobs that do not run as expected

Separate scheduling failures from environment, permissions, output, and application failures with a repeatable diagnostic sequence.

Illustration of an event loop and asynchronous tasks
Technical guide

Fix EADDRINUSE in a Node.js server

Identify the listener that owns the address, stop or reconfigure the right service, and distinguish application bind failures from container port conflicts.

Illustration of files, modules, and dependencies
Technical guide

Install npm packages without relying on sudo

Move global tools to an appropriate writable location, repair only verified ownership problems, and keep version-manager configuration consistent.