#01easy3-5 min
The Event Listener Memory Leak
This WebSocket handler looks clean but will slowly consume all your memory.
Node.jsMemory
58%
solve rate
websocket.jsjavascriptCode snippets that passed code review but will crash in production. Real bugs from real systems. Test your debugging instincts.
This WebSocket handler looks clean but will slowly consume all your memory.
websocket.jsjavascriptThis query function works perfectly in testing but will bring down production.
queries.jsjavascriptThis authentication check has a vulnerability that could expose your secrets.
auth.jsjavascriptThis caching logic seems bulletproof but has a subtle race condition.
cache.jsjavascriptThis Node.js stream implementation looks fine but will crash your server under load.
server.jsjavascriptI release new Half-Baked Code challenges monthly. Subscribe to get them first, along with detailed solutions and explanations.
No spam. Just bugs. Unsubscribe anytime.