Substrings and Highest score, python

Summary This postmortem article discusses two Python programs that were written to solve specific problems, but contained errors that led to their failure. The first program was designed to read strings from a file and write to an output file all strings that appear as a substring of at least one other string in the … Read more

Python: find maximum value per group from CSV file

Summary A junior developer needed to extract the maximum score for a specific student from a CSV file, along with the corresponding subject. The standard approach using pandas (loading the entire dataset into memory) works for small files but introduces unnecessary overhead and potential memory saturation for large datasets. A more senior-engineer approach utilizes Python’s … Read more

swiftui button action calling wrong action

Summary A UI Interaction Conflict occurred where tapping a radio button in a PersonaliseCellView inadvertently triggered the action of an adjacent “Edit” button. This was caused by improper view re-rendering logic (specifically a mix of @ObservedObject and @State updates) that reset the visual state of the radio buttons within a List, effectively hijacking the touch … Read more

Android Studio Emulator and Galaxy Watch4 showing error retrieving weather data

Summary The core issue is a runtime permission change in Android 15 (SDK 35/36) and Google Play Services for Wear OS, which invalidates the implicit background weather fetch used by older watch face implementations. While the real Pixel Watch 3 (likely running an older or stable Wear OS build) permits the legacy com.google.android.wearable.permission.ACCESS_WEATHER behavior, the … Read more

Why the clippath defined in a fabric.Group is globally active?

Summary A clipPath defined on a single fabric.Group unexpectedly affects the entire canvas, causing all objects to be clipped. This issue stems from state leakage in Fabric.js’s rendering pipeline, where a group’s transformation matrix and clipping context are not properly isolated or reset after drawing that group. The root cause is often an improper custom … Read more

Intersector.intersectSegmentPolygon seems to be giving different results

Summary A user reported inconsistent behavior with Intersector.intersectSegmentPolygon during pathfinding graph generation. In one context (debug rendering), line-of-sight checks between nodes succeeded, but in the primary logic path (inside pathFromTo), they failed, preventing path calculation. The root cause was mutable object state being altered by method calls, specifically the side effects of Polygon.setPosition. This caused … Read more