Reddit Programming
209 subscribers
1.22K photos
123K links
I will send you newest post from subreddit /r/programming
Download Telegram
1 minute of Verlet Integration
https://www.reddit.com/r/programming/comments/1maw72t/1_minute_of_verlet_integration/

<!-- SC_OFF -->I've made a video recently on one of my favourite methods for solving Newton's equations. It is available on YouTube Shorts 🎥 It wasn't clear to me if this is worth a full article or just a short comment. Let me start with a supplementary material for the video first, and then we shall see... <!-- SC_ON --> submitted by /u/Inst2f (https://www.reddit.com/user/Inst2f)
[link] (https://wljs.io/blog/2025/07/27/verlet-supp/) [comments] (https://www.reddit.com/r/programming/comments/1maw72t/1_minute_of_verlet_integration/)
Reverse Proxy Deep Dive (Part 3): The Hidden Complexity of Service Discovery
https://www.reddit.com/r/programming/comments/1mb402l/reverse_proxy_deep_dive_part_3_the_hidden/

<!-- SC_OFF -->I’m sharing Part 3 of a series exploring the internals of reverse proxies at scale. This post dives into service discovery, a problem that sounds straightforward but reveals many hidden challenges in dynamic environments. Topics covered include: static host lists, DNS-based discovery with TTL tradeoffs, external systems like ZooKeeper and Envoy’s xDS, and active vs passive health checks. The post also discusses real-world problems like DNS size limits and health check storms. If you’ve worked on service discovery or proxy infrastructure, I’d love to hear your experiences or thoughts. Full post here (about 10 minutes): https://startwithawhy.com/reverseproxy/2025/07/26/Reverseproxy-Deep-Dive-Part3.html
Parts 1 and 2 cover connection management and HTTP parsing. <!-- SC_ON --> submitted by /u/MiggyIshu (https://www.reddit.com/user/MiggyIshu)
[link] (https://startwithawhy.com/reverseproxy/2025/07/26/Reverseproxy-Deep-Dive-Part3.html) [comments] (https://www.reddit.com/r/programming/comments/1mb402l/reverse_proxy_deep_dive_part_3_the_hidden/)
Throttle Doctor: Interactive JS Event Handling
https://www.reddit.com/r/programming/comments/1mb641i/throttle_doctor_interactive_js_event_handling/

<!-- SC_OFF -->Hey r/javascript (https://www.reddit.com/r/javascript), I've built Throttle Doctor, an interactive app to help you visually understand and fine-tune event handling in JavaScript. If you've ever struggled with performance due to rapid-fire events (like mouse moves or scroll events), this tool is for you. What it does: It's a sandbox for experimenting with debounce and throttle techniques. You can adjust parameters like wait time, leading edge, and trailing edge to see their immediate impact on function execution, helping you optimize your code and prevent "event overload." Why it's useful: See it in action: Visualizes how debouncing and throttling control function calls. Learn by doing: Tweak settings and observe real-time results. Optimize performance: Understand how to prevent unnecessary executions. Try the live demo: https://duroktar.github.io/ThrottleDoctor/ Check out the code: https://github.com/Duroktar/ThrottleDoctor Note: This app showcases a throttleDebounce function, but a standalone library is not yet released. It's a proof-of-concept, and a library will be considered based on demand. Let me know your thoughts! Disclaimer: This post was created with AI assistance. The project was primarily vibe-coded, with minimal user tweaks <!-- SC_ON --> submitted by /u/Duroktar (https://www.reddit.com/user/Duroktar)
[link] (https://duroktar.github.io/ThrottleDoctor/) [comments] (https://www.reddit.com/r/programming/comments/1mb641i/throttle_doctor_interactive_js_event_handling/)
I fine-tuned an SLM -- here's what helped me get good results (and other learnings)
https://www.reddit.com/r/programming/comments/1mb7khe/i_finetuned_an_slm_heres_what_helped_me_get_good/

<!-- SC_OFF -->This weekend I fine-tuned the Qwen-3 0.6B model. I wanted a very lightweight model that can classify whether any user query going into my AI agents is a malicious prompt attack. I started by creating a dataset of 4000+ malicious queries using GPT-4o. I also added in a dataset of the same number of harmless queries. Attempt 1: Using this dataset, I ran SFT on the base version of the SLM on the queries. The resulting model was unusable, classifying every query as malicious. Attempt 2: I fine-tuned Qwen/Qwen3-0.6B instead, and this time spent more time prompt-tuning the instructions too. This gave me slightly improved accuracy but I noticed that it struggled at edge cases. eg, if a harmless prompt contains the term "System prompt", it gets flagged too. I realised I might need Chain of Thought to get there. I decided to start off by making the model start off with just one sentence of reasoning behind its prediction. Attempt 3: I created a new dataset, this time adding reasoning behind each malicious query. I fine-tuned the model on it again. It was an Aha! moment -- the model runs very accurately and I'm happy with the results. Planning to use this as a middleware between users and AI agents I build. <!-- SC_ON --> submitted by /u/sarthakai (https://www.reddit.com/user/sarthakai)
[link] (https://github.com/sarthakrastogi/rival) [comments] (https://www.reddit.com/r/programming/comments/1mb7khe/i_finetuned_an_slm_heres_what_helped_me_get_good/)
Learn System Design Fundamentals With Examples
https://www.reddit.com/r/programming/comments/1mb8ukk/learn_system_design_fundamentals_with_examples/

<!-- SC_OFF -->Learn System Design Fundamentals With Examples From CAP Theorem, Networking Basics, to Performance, Scalability, Availability, Security, Reliability etc. <!-- SC_ON --> submitted by /u/erdsingh24 (https://www.reddit.com/user/erdsingh24)
[link] (https://javatechonline.com/system-design-fundamentals/) [comments] (https://www.reddit.com/r/programming/comments/1mb8ukk/learn_system_design_fundamentals_with_examples/)
Yet another dev thinking he's a cybersecurity expert 💀
https://www.reddit.com/r/programming/comments/1mb9beb/yet_another_dev_thinking_hes_a_cybersecurity/

<!-- SC_OFF -->So I decided to make an "antivirus" for Node.js. It checks uploaded files, marks them as clean / suspicious / malicious, and even lets you plug in YARA rules. Basically: "Yo bro, your ZIP file smells like malware, I ain't saving that." Is this useful, funny, or just plain cringe? I can’t tell anymore. <!-- SC_ON --> submitted by /u/Extension-Count-2412 (https://www.reddit.com/user/Extension-Count-2412)
[link] (https://www.npmjs.com/package/pompelmi?activeTab=readme) [comments] (https://www.reddit.com/r/programming/comments/1mb9beb/yet_another_dev_thinking_hes_a_cybersecurity/)
Here comes the sun
https://www.reddit.com/r/programming/comments/1mbbolm/here_comes_the_sun/

<!-- SC_OFF -->“Write crates, not programs” is a mantra my students are probably tired of hearing, but it's something I think many programmers would do well to bear in mind. Instead of being a Colonial gunsmith, in Scott Rosenberg's analogy, hand-crafting every nut and screw, we should instead think about how to contribute trusted, stable components to a global repository of robust software: the universal library of Rust. I have a fairly well-defined process for going about this. Here it is. <!-- SC_ON --> submitted by /u/AlexandraLinnea (https://www.reddit.com/user/AlexandraLinnea)
[link] (https://bitfieldconsulting.com/posts/here-comes-sun) [comments] (https://www.reddit.com/r/programming/comments/1mbbolm/here_comes_the_sun/)