Desk Clarity

A field guide to everyday digital problems.

The guidebook / 181 guides

Developer tools

Code, configuration and workflows. Source-linked checks to help you move forward.

Developer tools · GUIDE

An empty folder disappears from a Git clone: track a deliberate placeholder

Compare normal git add on an empty folder with a tracked placeholder, verify a fresh clone and separate application emptiness from directory layout.

4 min readSource-linked guide
Developer tools · GUIDE

json.load reports Extra data after repeated dumps: choose one document boundary

Reproduce concatenated JSON roots, compare one array with one-record-per-line output and reject line parsing for pretty-printed multi-line documents.

4 min readSource-linked guide
Developer tools · GUIDE

curl saves the redirect response: follow Location and verify the final payload

Compare a redirect body with the final GET payload, inspect effective URL and redirect count, and separate HTTP redirects from login pages and scripts.

4 min readSource-linked guide
Developer tools · GUIDE

argparse reads False as true: choose a flag or an explicit text converter

Reproduce type=bool with False and empty strings, compare optional boolean flags and validate a text converter with rejected invalid input.

4 min readSource-linked guide
Developer tools · GUIDE

Git ignores a file you did not exclude: find the exact rule source

Read the matching source, line and pattern for an unexpectedly ignored path, distinguish tracked files and verify a narrow rule correction.

4 min readSource-linked guide
Developer tools · GUIDE

Python finds a data file only from one folder: inspect cwd before changing the path

Compare the working directory with a source-file anchor, reproduce three launch locations and choose the right base for bundled data or caller input.

4 min readSource-linked guide
Developer tools · GUIDE

Git file history stops at a rename: read patches with one-path follow

Use a one-file rename fixture to distinguish commit lists, patches and path filtering, then inspect missing history without changing repository state.

4 min readSource-linked guide
Developer tools · GUIDE

Python subprocess arguments disappear with shell=True: check the POSIX boundary

Compare a direct argument list with POSIX shell=True, inspect actual received values and choose an explicit interpreter without guessing quoting.

4 min readSource-linked guide
Developer tools · GUIDE

pip freeze versus direct requirements: what an installed package list can tell you

Compare freeze, not-required graph roots and direct project requirements with an offline fixture, then verify a clean environment before changing the handoff.

5 min readSource-linked guide
Developer tools · GUIDE

pip externally-managed-environment: choose the project library or app target

Distinguish an externally managed base from project and application environments, inspect the actual interpreter and verify the intended installation target.

5 min readSource-linked guide
Developer tools · GUIDE

Empty submodule after git clone: initialize it and verify the recorded commit

Inspect Git submodule registration, populate an existing clone recursively and compare actual files and HEAD with the parent-recorded commit.

4 min readSource-linked guide
Developer tools · GUIDE

Python json has no loads attribute: inspect the imported file before reinstalling

Check the module file behind json, distinguish shadowing from installation failure and verify a local rename with a fresh-process JSON parse.

4 min readSource-linked guide
Developer tools · GUIDE

Git warns LF will become CRLF: inspect the index and working copy separately

Inspect Git line-ending reports, attributes and configuration, with verified LF index bytes and a CRLF working-copy checkout in a disposable repository.

4 min readSource-linked guide
Developer tools · GUIDE

pip installed the package but Python cannot import it: compare interpreters

Compare the failing Python executable, its pip inventory and the selected IDE environment, with a two-virtual-environment local reproduction.

4 min readSource-linked guide
Developer tools · GUIDE

jq defaults without overwriting false: choose null or missing-key behavior

Compare jq alternative, null-check and key-presence defaults using missing, null, false, true, zero and empty-string inputs.

4 min readSource-linked guide
Developer tools · GUIDE

curl returns HTTP 404 but exits 0: keep the body and check the right status

Separate curl transfer errors, HTTP error policy and strict-200 checks, with local 200, 201, 302 and 404 responses and saved-body verification.

4 min readSource-linked guide
Developer tools · GUIDE

Detached HEAD after checking out origin: preserve commits before switching

Distinguish checking out origin from a local branch, preserve a detached commit at its exact tip and verify a tracking branch in a local reproduction.

5 min readSource-linked guide
Developer tools · GUIDE

Deleted remote Git branch still listed? Preview pruning and keep local work

Distinguish local and remote-tracking branches, preview Git pruning and verify what remains, using a local bare-repository reproduction.

5 min readSource-linked guide