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.
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.
Need to move a line up or down in VS Code? Press Alt + ↑ / ↓. No cut‑paste needed. ⚡
Transform arrays of key-value pairs into objects easily. Use JavaScript's Object.fromEntries() for direct conversion. Turn [['name', 'Alice']] into {name: 'Alice'} using one line of code.
Monitoring isn’t about dashboards. It’s about questions you can answer quickly: Is the system healthy? ✅ Where’s the bottleneck? 🔍 Who’s impacted? 👤 Good monitoring = fewer 3AM incidents.
Horizontal vs Vertical scaling: - Vertical: bigger machine 💪 - Horizontal: more machines 🧑🤝🧑🧑🤝🧑🧑🤝🧑 Vertical = quick fix, limited Horizontal = harder, but scales further
United States 트렌드
- 1. Warner Bros 97.2K posts
- 2. HBO Max 46.5K posts
- 3. #FanCashDropPromotion N/A
- 4. Good Friday 52.6K posts
- 5. #FridayVibes 4,019 posts
- 6. Paramount 27K posts
- 7. $NFLX 4,561 posts
- 8. RED Friday 4,397 posts
- 9. #FridayMotivation 4,008 posts
- 10. Jake Tapper 56K posts
- 11. NO U.S. WAR ON VENEZUELA 2,551 posts
- 12. The EU 133K posts
- 13. #FridayFeeling 1,734 posts
- 14. Ted Sarandos 2,535 posts
- 15. Happy Friyay 1,034 posts
- 16. Pickens 17.1K posts
- 17. $WBD 1,949 posts
- 18. National Security Strategy 9,591 posts
- 19. #FlashbackFriday N/A
- 20. Cloudflare 39.1K posts
Something went wrong.
Something went wrong.