quicktricks_dev's profile picture. • Weekly coding tricks (each Tuesday)
• Daily Software Engineer thoughts & quick tips
• Developing an app to create your own code snippets!

quicktricks.dev

@quicktricks_dev

• Weekly coding tricks (each Tuesday) • Daily Software Engineer thoughts & quick tips • Developing an app to create your own code snippets!

Pinned

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.

quicktricks_dev's tweet image. 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.

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. 🎩

quicktricks_dev's tweet image. 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.

quicktricks_dev's tweet image. 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.


United States Trends

Loading...

Something went wrong.


Something went wrong.