quicktricks.dev
@quicktricks_dev
• Weekly coding tricks (each Tuesday) • Daily Software Engineer thoughts & quick tips • Developing an app to create your own code snippets!
Tired of manual array formatting when displaying it to user? 😮💨 Use JavaScript's Intl.ListFormat instead! It handles locale-specific formatting (e.g., 'A, B, and C' vs 'A, B y C') in a simple and elegant way.
CDNs aren’t just for static assets. They can cache APIs too. Benefits 👇 Lower latency 🌍 Reduced server load 💪 Better resilience 🔄 Think beyond images → cache JSON, GraphQL, even search results.
Tired of manual array formatting when displaying it to user? 😮💨 Use JavaScript's Intl.ListFormat instead! It handles locale-specific formatting (e.g., 'A, B, and C' vs 'A, B y C') in a simple and elegant way.
Quick way to get unique items in Python: unique = list(set(items)) Fast deduplication.
Hot take 🔥 Code comments should explain why, not what. Agree or disagree?
Retries aren’t free. They add load and can make outages worse. Use exponential backoff + jitter and circuit breaker.
Want smaller Docker images? Use --squash to combine layers. Less overhead = faster pulls.
Incident response isn’t about fixing fast. It’s about communicating clearly: Who’s impacted 👥 What’s happening 🔍 ETA for resolution ⏱️ Good comms = less panic.
Idempotency isn’t just a buzzword. It’s how you make APIs safe to retry. Same request → same result. Critical for payments, orders, and more.
Want to stash changes but keep staged files? git stash --keep-index Perfect when you’re halfway through a commit.
What’s the most frustrating bug you’ve ever debugged? Mine: race conditions that only happen during production workload
Stop using JSON.parse(JSON.stringify()) for deep copies! 🚫 Replace it with JavaScript's structuredClone()! It can copy objects and other complex types like Maps, and RegEx. It also clones functions and handles circular references. All that in a single, elegant line of code. 🎩
Versioning APIs isn’t optional. It’s about your clients' trust. 3 common strategies 👇 URI versioning → /v1/resource Header versioning → x-api-version: v1 Query param → ?version=1 Pick one, stick to it, and communicate clearly.
Need to duplicate a line fast using VS Code? Press Shift + Alt + ↓ (Cmd+Shift+Alt+↓ on Mac). No copy-paste needed. ⚡
Downtime isn’t always because of your application or infrastructure failure. It’s often about dependencies: External APIs 🌐 Third-party services 🔌 DNS failures 🌍 Make sure to add health checks, observability and resilience techniques like retries.
Hot take 🔥 Pull requests should be small. If it’s >500 lines, it’s not a PR — it’s a rewrite. Agree or disagree?
Queues aren’t just for scaling. They’re for decoupling. Producer doesn’t care if consumer is slow. That’s how you build resilient systems.
What’s the most underrated programming language feature you’ve used? 👀 (I’ll start: TypeScript's utility types)
Pagination isn’t just about performance. It’s about predictability. 3 common approaches 👇 Offset/Limit → simple, but can skip records Cursor → stable, scalable Keyset → fastest for large datasets Choose based on scale + UX.
United States Xu hướng
- 1. Good Monday 43.7K posts
- 2. #MondayMotivation 8,056 posts
- 3. Harada 10.2K posts
- 4. #JungkookxRollingStone 58.9K posts
- 5. Tekken 24.4K posts
- 6. Victory Monday N/A
- 7. #OrmxHausNowhereBKK 619K posts
- 8. ORM HAUS NOWHERE GOP 603K posts
- 9. #MondayVibes 2,804 posts
- 10. #GoldenGlobes 3,327 posts
- 11. MAGICAL WITH WILLIAMEST 240K posts
- 12. Chiefs 121K posts
- 13. Orm Kornnaphat 33.5K posts
- 14. Mahomes 44.7K posts
- 15. John Lennon 10.1K posts
- 16. Proverbs 5,878 posts
- 17. Texans 52.2K posts
- 18. Immaculate Conception 9,704 posts
- 19. FELIX NAVER SPOTIFY CAMPAIGN 13.6K posts
- 20. namjoon 78.9K posts
Something went wrong.
Something went wrong.