Reddit Programming
212 subscribers
1.22K photos
125K links
I will send you newest post from subreddit /r/programming
Download Telegram
Engineering a Columnar Database in Rust: Lessons on io_uring, SIMD, and why I avoided Async/Await
https://www.reddit.com/r/programming/comments/1qfkijn/engineering_a_columnar_database_in_rust_lessons/

<!-- SC_OFF -->I recently released the core engine for Frigatebird, an OLAP (Columnar) database built from scratch. While building it, I made a few architectural decisions that go against the "standard" Rust web/systems path. I wanted to share the rationale and the performance implications of those choices. 1. Why I ditched Async/Await for a Custom Runtime
The standard advice in Rust is "just use Tokio." However, generic async runtimes are designed primarily for IO-bound tasks with many idle connections. In a database execution pipeline, tasks are often CPU-heavy (scanning/filtering compressed pages). I found that mixing heavy compute with standard async executors led to unpredictable scheduling latency. Instead, I implemented a Morsel-Driven Parallelism model (inspired by DuckDB/Hyper): Queries are broken into "morsels" (fixed-size row groups). Instead of a central scheduler, worker threads use lock-free work stealing. A query job holds an AtomicUsize counter. Threads race to increment it (CAS), effectively "claiming" the next step of the pipeline. This keeps CPU cores pinned and maximizes instruction cache locality, as threads tend to stick to specific logic loops (Scanning vs Filtering). 2. Batched io_uring vs. Standard Syscalls
For the WAL (Write-Ahead Log), fsync latency is the killer. I built a custom storage engine ("Walrus") to leverage Linux's io_uring. Instead of issuing pwrite syscalls one by one, the writer constructs a submission queue of ~2,000 entries in userspace. It issues a single submit_and_wait syscall to flush them all. This reduced the context-switching overhead significantly, allowing the engine to saturate NVMe bandwidth on a single thread. 3. The "Spin-Lock" Allocator
This was the riskiest decision. Standard OS mutexes (pthread_mutex) put threads to sleep, costing microseconds. For the disk block allocator, I implemented a custom AtomicBool spin-lock. It spins in a tight loop (std::hint::spin_loop()) for nanoseconds. Trade-off: If the OS preempts the thread holding the lock, the system stalls. But because the critical section is just simple integer math (calculating offsets), it executes faster than the OS scheduler quantum, making this statistically safe and extremely fast. 4. Zero-Copy Serialization
I used rkyv instead of serde. Serde is great, but it usually involves deserialization steps (parsing bytes into structs). rkyv guarantees that the in-memory representation is identical to the on-disk representation, allowing for true zero-copy access by just casting pointers on the raw buffer. I'm curious if others here have hit similar walls with Tokio in CPU-bound contexts, or if I just failed to tune it correctly? <!-- SC_ON --> submitted by /u/Ok_Marionberry8922 (https://www.reddit.com/user/Ok_Marionberry8922)
[link] (https://github.com/Frigatebird-db/frigatebird) [comments] (https://www.reddit.com/r/programming/comments/1qfkijn/engineering_a_columnar_database_in_rust_lessons/)
Tested a random APK with MobSF out of curiosity
https://www.reddit.com/r/programming/comments/1qg0i7h/tested_a_random_apk_with_mobsf_out_of_curiosity/

<!-- SC_OFF -->Hey everyone, Disclaimer: I'm a Flutter developer, not a security expert. This is purely a learning experiment from someone who got curious about mobile security tools. If I mess up terminology or miss something obvious, please correct me - that's literally why I'm posting this. I've been using an app APK for 2 years (which is not on the playstore). Got curious about mobile security tools, so I scanned it with MobSF. Setup (takes 2 minutes): docker run -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf Security Score: 44/100 Main findings: Debug Certificate - Signed with Android's default debug key. Anyone can modify and re-sign it. Cleartext Traffic Enabled - Been streaming over HTTP for 2 years. My ISP saw everything. Sketchy Permissions: GET_INSTALLED_APPLICATIONS - scanning what apps I have installed RECORD_AUDIO - no voice search exists in the app MobSF is ridiculously easy to use. If you've never scanned your own app, try it. For those who want more details, I wrote a step-by-step article with screenshots on Medium. You can find the link in my profile if you're interested. Not promoting anything - I'm not a Medium member so I don't earn from this. Just sharing for anyone who wants to learn more about the process. <!-- SC_ON --> submitted by /u/night-alien (https://www.reddit.com/user/night-alien)
[link] (https://medium.com/@web.pinkisingh/i-reverse-engineered-the-free-movie-app-i-used-for-2-years-the-results-were-terrifying-98796cef6837) [comments] (https://www.reddit.com/r/programming/comments/1qg0i7h/tested_a_random_apk_with_mobsf_out_of_curiosity/)
A daily football crest guessing game (like Wordle but for crests)
https://www.reddit.com/r/programming/comments/1qg9ion/a_daily_football_crest_guessing_game_like_wordle/

<!-- SC_OFF -->Hey everyone! I've been teaching myself to code for the past few weeks and built this as my first proper project. How it works: You get a zoomed-in, blurred football crest and have 6 guesses to identify the club. Each wrong guess reveals a bit more of the crest. There's also a shirt color hint system to help you narrow it down. The game has: Daily Puzzle (same crest for everyone, resets at midnight) Practice Mode (unlimited random crests) Sprint Mode (10 crests, race against the clock) Still very much a work in progress and I'm sure there are bugs, but my mates have been enjoying it so thought I'd share here. Would love to hear what you think! <!-- SC_ON --> submitted by /u/olhaogabigol (https://www.reddit.com/user/olhaogabigol)
[link] (https://crestle-snowy.vercel.app/) [comments] (https://www.reddit.com/r/programming/comments/1qg9ion/a_daily_football_crest_guessing_game_like_wordle/)
🎬 MovieMania: Open Source MERN Stack Entertainment Tracker – Seeking Contributors!
https://www.reddit.com/r/programming/comments/1qga7y9/moviemania_open_source_mern_stack_entertainment/

<!-- SC_OFF -->Seeking For Contribution <!-- SC_ON --> submitted by /u/x-neon-nexus-o (https://www.reddit.com/user/x-neon-nexus-o)
[link] (https://github.com/x-neon-nexus-o/MovieMania) [comments] (https://www.reddit.com/r/programming/comments/1qga7y9/moviemania_open_source_mern_stack_entertainment/)
How do I learn programming/coding faster? Tips and guide
https://www.reddit.com/r/programming/comments/1qgcg95/how_do_i_learn_programmingcoding_faster_tips_and/

<!-- SC_OFF -->Hello! I'm currently A 1st year College student who Takes IT. And right now is my 2nd Semester. I didn't learn much in the 1st Semester . And I'm going to get serious now. Tell me, Aside from mastering coding/programming from Doing A Hands On While learning, Is it also crucial to learn or buy a text books which specializes Programming Languages like Java or Python? My school only gives us short modules as a guide , and not an entire book, It was very short and it doesn't have enough explanation. I have PDF's Books with a thousand of pages, But I'm not used to studying in a Laptop as well and my eyesight will totally getting worse. And I don't have enough budget to by a book. So, should I get myself get used to study in my laptop? And focused on doing more hands-on coding and programming by applying what I've studied? Or should I really buy books? I really wanted to learn this Course so bad, and If I want to learn something, I really want to dig deeper on it and fully understand how it works, not just by putting a code. <!-- SC_ON --> submitted by /u/No_Childhood7709 (https://www.reddit.com/user/No_Childhood7709)
[link] (https://www.reddit.com/r/programming/submit/?type=LINK) [comments] (https://www.reddit.com/r/programming/comments/1qgcg95/how_do_i_learn_programmingcoding_faster_tips_and/)
Reliability > Shipping speed. Fight me.
https://www.reddit.com/r/programming/comments/1qgxl7w/reliability_shipping_speed_fight_me/

<!-- SC_OFF -->Building a Yahoo Finance MCP server. Day 3: 17 timeouts in 20 requests. Most devs would ship anyway and call it "MVP." I spent 2 weeks engineering resilience instead. Here's what I built: πŸ”Ή Circuit breaker β€” CLOSED/OPEN/HALF_OPEN states with auto recovery πŸ”Ή Token bucket + adaptive + per-endpoint rate limiting πŸ”Ή LRU cache with stale-while-revalidate β€” 70-90% hit ratio πŸ”Ή Data quality scoring β€” Completeness + integrity validation πŸ”Ή Chaos tests β€” Network failures, rate limits, partial data PM decision: Don't ship unreliable code. Your 2-day ship time doesn't matter if your bot dies at 2 AM. Built with AI as my pair programmer (TRAE 😍). TRAE caught edge cases I'd miss. We debated tradeoffs. We wrote chaos tests together. The results: βœ… 95%+ test coverage βœ… βœ… 13+ tools verified working βœ… Production-grade resilience Known issues: - Crypto/forex = placeholder data - Financials = may fail for some symbols The hard truth: Building on unreliable APIs? Either engineer resilience or inherit their unreliability. tl;dr: Chose 2 weeks of resilience over 2-day ship time. PM decision was reliability > speed. AI pair programmer helped. 95% test coverage. <!-- SC_ON --> submitted by /u/kanishkanmd (https://www.reddit.com/user/kanishkanmd)
[link] (https://github.com/kanishka-namdeo/yfnhanced-mcp) [comments] (https://www.reddit.com/r/programming/comments/1qgxl7w/reliability_shipping_speed_fight_me/)
Google Gemini for Java Developers & Architects: A Practical 2026 Guide
https://www.reddit.com/r/programming/comments/1qgxxhl/google_gemini_for_java_developers_architects_a/

<!-- SC_OFF -->Let's explore how Google Gemini can be used by Java developers and software architects, focusing on real development and architecture use cases rather than hype. The article covers: What Google Gemini is and how it differs from typical code assistants, How it fits into Java development workflows (IDE support, APIs, CLI, Vertex AI), Using Gemini for architecture reviews, microservices, and migration scenarios, Strengths, limitations, and best practices for production use with Beginner-friendly explanations with practical examples. Let's check it out completely here: Google Gemini for Java Developers & Architects (https://javatechonline.com/gemini-for-java-developers-and-architects/) <!-- SC_ON --> submitted by /u/erdsingh24 (https://www.reddit.com/user/erdsingh24)
[link] (https://javatechonline.com/gemini-for-java-developers-and-architects/) [comments] (https://www.reddit.com/r/programming/comments/1qgxxhl/google_gemini_for_java_developers_architects_a/)
Chasing a newline
https://www.reddit.com/r/programming/comments/1qgyp1c/chasing_a_newline/

<!-- SC_OFF -->What's the ASCII representation of a newline \n character? We can write a simple program to print out some text with a newline, and then look at the binary output... <!-- SC_ON --> submitted by /u/Idiomatic-Oval (https://www.reddit.com/user/Idiomatic-Oval)
[link] (https://owengage.com/writing/2026-01-18-chasing-a-newline/) [comments] (https://www.reddit.com/r/programming/comments/1qgyp1c/chasing_a_newline/)
Programiz Pro Subscription on sell
https://www.reddit.com/r/programming/comments/1qgyxyv/programiz_pro_subscription_on_sell/

<!-- SC_OFF -->A voucher worth of 120$’s on sell of Programiz Pro where we can learn many programming languages effectively, clearly, easily making job ready. Comment for buy. <!-- SC_ON --> submitted by /u/Minimum_Respect_2779 (https://www.reddit.com/user/Minimum_Respect_2779)
[link] (https://www.programiz.com/) [comments] (https://www.reddit.com/r/programming/comments/1qgyxyv/programiz_pro_subscription_on_sell/)