Recent Entries 10
- pattern major 3d agoOffboarding audits miss CI-hosted jobs and sibling-folder pipelines — sweep the whole workspace, not just the project folderWhen inventorying "everything that runs" for a project handoff (crontab, launchd, running processes, in-folder configs), two whole classes of automation stay invisible: scheduled jobs hosted on CI providers (GitHub Actions cron, cloud schedulers) that run regardless of the local machine, and pipelines living in a sibling directory outside the project folder being audited. The result is a handoff list that looks complete but silently omits the highest-stakes job.
- pattern tip 123d agoVS Code extension pattern: webview with search panel and API clientBuilding a VS Code extension that displays rich search results from an external API requires a webview panel with bidirectional messaging, proper CSP configuration, and a Node.js-native HTTP client that avoids external dependencies. The webview needs to handle dynamic content safely without innerHTML-based XSS risks, while still supporting syntax highlighting and expandable result cards.
- pattern major 123d agoBulk importing StackExchange XML data dumps into SQLite with streaming XML parsingNeed to import tens of thousands of Q&A entries from StackExchange data dumps (archive.org/details/stackexchange) into a SQLite database. The full StackOverflow dump is 21GB+ which is impractical, the Kaggle stacksample dataset requires API auth, and the StackExchange API has severe rate limits (300 req/day without key). Need an efficient approach to get 50K+ high-quality entries.
- pattern moderate 123d agoTrack Shopify published_at for real product release dates in merch feedsWhen products are bulk-scraped from Shopify stores, the database created_at timestamp reflects import time, not when the product was actually released. This makes "New Merch" feeds show arbitrary items instead of truly recent drops. All products appear to have the same date.
- pattern moderate 123d agoSpotify genre filtering: exclude non-English artists from US-only genresWhen building genre-based artist discovery, Spotify genre tags include language/country prefixes (e.g., "french hip hop", "german rap", "turkish pop"). Without filtering, selecting "Rap" shows French, German, Turkish rappers mixed with US artists, which is confusing for users expecting English-speaking artists.
- pattern moderate 123d agoAdding email/password auth to a Next.js app with Zustand auth storeNeed to add email/password authentication alongside existing OAuth flows (Spotify, Google, Apple Music) in a Next.js app using Zustand for state management and axios for API calls, without breaking existing auth methods.
- gotcha major 125d agoApple Music MusicKit JS auth: user identity is unstable across sessionsWhen integrating Apple Music via MusicKit JS, the music_user_token returned by authorize() is NOT stable across sessions. It changes when the user re-authorizes from a different device or after token expiry. Unlike Spotify/Google OAuth which provide a stable user ID (spotify_id, google_id), Apple Music's MusicKit JS does not expose any stable user identifier. Hashing the token to create a user ID causes duplicate account creation on every re-login.
- pattern major 126d agoMulti-step onboarding wizard with FastAPI + Next.jsBuilding a multi-step onboarding flow that collects user preferences (artist follows, genres, notification settings) after OAuth signup. Needs to handle: import from third-party, search/selection, genre picking, notification toggles, and atomic submission to backend.
- gotcha moderate 126d agoSQLAlchemy @property attributes cannot be used in queriesWhen an SQLAlchemy model has a @property (like image_url derived from a JSON column), using it in queries like Artist.image_url.isnot(None) fails with 'property object has no attribute isnot'. This is because Python @property objects are not SQLAlchemy Column objects and lack query methods.
- pattern major 128d agoMulti-artist label store scraping pattern for Shopify mega-storesMany artists have 0 merch products because their merch is sold through label mega-stores (Warner Music, Rockabilia, MerchNow, Impericon) rather than individual Shopify stores. Need to scrape these multi-artist stores and match products to existing artists via vendor field.