Lost track of where a local branch pointed? git reflog records local reference movements. It can help you find an earlier commit, but those entries can expire, so treat it as a recovery aid.
@sashikantsingh_ Git reflog has saved me more than once in situations like this. It's worth checking before assuming a commit is gone. Just remember to create a branch from the recovered commit if you want to keep it safe.
Lost track of where a local branch pointed? git reflog records local reference movements. It can help you find an earlier commit, but those entries can expire, so treat it as a recovery aid.
@olamide_ai_dev Thanks! "git bisect" is such an underrated debugging tool. It can turn hours of manually checking commits into a quick binary search when you have a reliable way to reproduce the bug.
A reproducible regression is a good reason to reach for git bisect. Give it a known good commit and a known bad commit, then test the revisions it selects to narrow down the change.
@AmbroseAbaasa A useful detail: "response.clone()" creates a second stream before consumption, but both copies share the underlying data. For large responses, avoid cloning unnecessarily because the unread copy can increase memory usage.
A response body is a stream. Once you've consumed it with response.json(), you can't read it again with response.text(). If you genuinely need two reads, clone the response before consuming it.
A response body is a stream. Once you've consumed it with response.json(), you can't read it again with response.text(). If you genuinely need two reads, clone the response before consuming it.
await asyncio.sleep(0) gives other tasks a chance to run by suspending the current task. It can help a cooperative loop yield, but you still need to think about how much work happens between those yields.
@AmbroseAbaasa The real win is that "TaskGroup" gives you a clear cancellation boundary. Just remember that cancellation is cooperative, so tasks should clean up resources properly when "CancelledError" is raised.
Python TaskGroup waits for its tasks when the async with block exits. If one task fails with an exception other than CancelledError, remaining tasks are cancelled. Useful when the tasks belong to one operation.
An old revision fails to build during git bisect for an unrelated reason? Use git bisect skip rather than calling it bad. Skipped revisions can leave more than one possible culprit.
fetch() can resolve successfully even when the server returns 404 or 500. Check response.ok before treating the response as a successful result. Network failure and HTTP failure take different paths.
One AbortController can cancel multiple fetch requests that share its signal. That can be useful when a whole operation becomes irrelevant. Once aborted, create a new controller for the next operation.
By default, asyncio.gather() propagates the first exception without cancelling its other awaitables. If your operation needs sibling tasks cancelled on failure, compare that behavior with TaskGroup.