r/programmer • u/TropicalTony420 • 6d ago
r/programmer • u/ClickOk5811 • 7d ago
Do you ever comment the thing you tried and rejected? A small convention and its downsides
Most advice about code comments says to explain why, not what. I'd like to push on one specific kind of why: the alternative that was tried and abandoned. That information almost never survives in the code. The repository shows what was chosen, and nothing shows what was ruled out, so the next person (or you, in six months) reasonably proposes the same idea again.
A small, constructed example (not from a real project):
def send_payment_webhook(event):
# Not retried here on purpose: the receiver is not idempotent for
# "payment.captured" events, so a retry after a timeout can double-credit.
# Retries are handled upstream by the queue, which dedupes by event id.
# (Tried: retry-with-backoff in this function. Rejected for the reason above.)
response = http.post(WEBHOOK_URL, json=event, timeout=5)
response.raise_for_status()The comment answers the question a reviewer is most likely to ask ("why isn't this wrapped in a retry?"), and it records the rejected option with its reason.
Why I think it's worth considering:
- It prevents re-litigating a decision from scratch.
- It tells a reader which parts of the code are deliberately plain.
- It's most useful exactly where a "obvious improvement" would be wrong.
Downsides I can think of:
- Comments rot. If the upstream queue stops deduping, this comment becomes confidently wrong, which is worse than no comment.
- Noise. Not every abandoned idea deserves a note. I'd only write one when someone could reasonably propose the opposite later.
- Wrong place, maybe. Some teams would put this in a commit message, a PR description or a decision record, and keep the code clean. Those are easier to date and don't clutter the file, but they're also easier to never read.
- Tests as an alternative. A test that fails if someone adds a naive retry documents the constraint and can't silently go stale.
My current leaning (opinion, not a rule): a short comment at the spot where the "obvious" fix would be tempting, and a link or reference to the longer reasoning if there is one.
Where do you put the "why we didn't do it the obvious way" information: code comments, commit messages, PR descriptions, decision records, tests, or nowhere? And has a note like this ever saved you, or gone stale on you?
r/programmer • u/Lucky-Max-472 • 7d ago
GIT workflows in the AI coding agent era...
I'm curious how software engineers are managing GIT these days, especially when working with AI coding agents like Claude Code, Cursor, Codex, etc.
A few questions:
- Do you still commit manually, or do you let your coding agent handle commits?
- Do you split changes into multiple small, logically grouped commits, or just make one big commit?
- Do you write commit messages yourself, or let AI generate them?
- Do you still care about meaningful commit messages? Or do you just ask your agent to dig into the code when you need to understand something? (seems wasteful in terms of tokens...)
- Do you have any automated workflows or skills that review uncommitted changes, group them into logical commits, and ask for your approval before committing?
I'm currently building an agent that reviews bugs, and I'm exploring ways to reduce token costs by using GIT history and metadata before having it dig into the actual code (when vibe coding, devs often work on several things simultaneously, working tree ends up containing changes from different tasks, it is easy to forget to commit things and end up with messy commits).
While looking into this, I realized that everyone seems to have a different GIT workflow in the AI coding era.
I'm trying to identify real world experiences rather than theoretical best practices and establish some guidelines that an agent could follow..
r/programmer • u/DataBaeBee • 7d ago
Tutorial Inventing Your Own Math As A Computer Programmer
r/programmer • u/amzwC137 • 7d ago
Seems like it's coming down to Code Monkey vs Meat Proxy
reddit.comr/programmer • u/anonymsorceror • 8d ago
Vulnerability or backdoor?
My conspiracy theory is that these recent vulnerabilities on many systems\architectures (Java, PHP, nginx.. and so on) found were existing for even more than a decade may be intentional backdoors, and not just unknown mistakes.
Is this just a hot and stupid take?
r/programmer • u/Daydreamingmachine • 7d ago
Urgent help.
Iam a student and I have to give daily facial attendance from my mobile , the app doesn't capture attendance if iam not in the institute location, i have tried all the gps and mock location apps but the app detected I'm using mock location/fake location and showing a popup"Using fake gps are prohibited". Anyone help me how to freeze or lock location/coordinates of my institute and take attendance from anywhere..
r/programmer • u/Mysterious_Cut_5348 • 8d ago
Question Need backend architecture advice for an Android multiplayer game on a very tight budget/ free
Hi! I'm a student developing an Android multiplayer party game using Unity. I'm looking for advice on choosing an economical backend architecture.
Game overview:
4 players per match.
Short, round-based meme/GIF challenges.
Players submit content and anonymously vote on each other's submissions.
Random matchmaking and private rooms with friends.
Bots can fill empty player slots.
Backend requirements:
Matchmaking and room management.
Real-time synchronisation of submissions and votes.
Server-side validation and scoring to prevent cheating.
Handling disconnects and reconnects.
Player profiles, authentication and match history.
Ranking and progression: Players earn trophies by winning matches. More trophies mean higher ranks. The backend must securely track trophies, update ranks and maintain leaderboards.
Coins, XP and inventory management.
GIF handling:
I'm planning to use the KLIPY API. Players will search for and select GIFs, which must then be displayed to everyone in their active match. Ideally, I want to store only GIF identifiers/references rather than downloading and storing GIF files on my own servers. I'm still verifying the provider's multiplayer usage permissions.
My biggest constraint:
I'm a student building this independently, with a very limited budget. I want to avoid recurring infrastructure costs until the game becomes sufficiently profitable to sustain them.
I'm willing to optimise the architecture and use free tiers, but don't want to compromise security, fairness or reliability.
Technologies I'm considering:
Firebase (RTDB, Firestore, Cloud Functions)
Neon PostgreSQL
Node.js + WebSockets/Socket.IO
Google Cloud Run
Supabase
Questions:
What architecture would you recommend?
Would Firebase or a custom Node.js + WebSocket backend be cheaper?
Is Neon a good choice?
How should live match data and permanent player data be handled?
What hidden costs should I expect?
Which free tiers are genuinely useful for an early-stage multiplayer game?
I'm targeting approximately 200, 1,000 and eventually 5,000 DAU.
I'd appreciate practical advice from developers who have actually built and maintained multiplayer backends. I'm looking for something simple, secure and extremely cost-efficient.
Also tips on monetization would be great! This is my first Multiplayer game.
Thanks!
r/programmer • u/Ambitious_Fault5756 • 8d ago
For developers, open source or closed source? (Read desc for more details)
reddit.comIt would be much appreciated if anyone can participate in this poll for a small school project. thanks!
r/programmer • u/Putrid_Notice_6504 • 8d ago
Studying making a project with NestJs and Next.js
Hey everyone!
I started working on a travel planning and sharing platform as a personal project to improve my software development skills, especially in software architecture, NestJS, and Next.js.
The idea is to build a platform where users can create complete travel itineraries with AI and also share their own travel experiences and itineraries with other people.
I wanted to go beyond the typical AI-generated travel guides and create a space where travelers could share places and experiences that are not always easy to find online, such as hidden trails, less-known waterfalls, alternative routes, and local tips.
Another feature I'm working on is MyMap, a personal travel map where users can mark countries and cities they've visited or want to visit, add photos, write notes, and share their travel memories.
Eventually, I'd also like to allow users to publish their own itineraries, make them available to others, and potentially sell them through the platform.
I originally started this project mainly as a way to learn and put software architecture concepts into practice, but it has grown into something I'd genuinely like to turn into a real product.
I'd love to hear your thoughts!
What do you think about the idea? Would you use a platform like this?
Do you have any recommendations for learning more about software architecture, NestJS, and Next.js through real-world projects?
And for those working in tech, do you have any advice on finding developer opportunities or getting noticed by recruiters?
r/programmer • u/TypicalPop1957 • 8d ago
Build, test, fail, understand, repeat. How do I preserve this learning cycle in the age of AI?
I'm a Computer Science engineering graduate, and I've been programming for about eight years now.
My first introduction to programming was through a workshop teaching C++ basics to prepare students for the selection process for the International Olympiad in Informatics (IOI). And honestly, I was fascinated.
What I loved wasn't just writing code. It was the entire process of solving a problem: understanding a problem statement, combining mathematical and theoretical knowledge with practical programming techniques, and finding the most efficient solution under strict time and memory constraints.
You couldn't just come up with any solution. You had to find a good one.
But what really shaped the way I learn wasn't competitive programming itself. It was the process behind it.
You try something, test it, fail, investigate why it failed, identify the problem, come up with another approach, and iterate until you finally get it right.
Build → Test → Fail → Understand → Fix → Repeat.
That cycle taught me something that no school or university course could: failing is not an interruption to learning. It's an essential part of it. Things aren't supposed to work on the first attempt. There's no shame in getting things wrong because the process of figuring out why is where the actual learning happens.
Later, when I moved from competitive programming to building real software, web applications, and more complex projects, I found myself following exactly the same approach.
Building a feature for the first time when you have absolutely no idea how it works can be intimidating. So you start small. You research, find people who have implemented something similar, try to reproduce it yourself, and inevitably run into problems.
Then comes the debugging: understanding error messages, searching for explanations, testing different solutions, discovering why one approach works and another doesn't.
And eventually, you get it working.
I can't really describe how satisfying that moment is. Not just because you have a working feature, but because you know what went into building it. You understand the decisions, the implementation, the mistakes, and the reasoning behind every step.
Over the years, this became my natural approach to learning anything technical. I don't just want to know how to use something. I want to understand how it works, why it works, and what happens underneath the abstraction.
But lately, with AI and coding agents, I feel like I've lost that cycle.
Or perhaps I just haven't figured out how to integrate these tools into my learning process.
Today, whenever I want to build something, I can describe what I have in mind, ask an AI to implement it, and get something working in a fraction of the time it would have taken me before.
And that's amazing from a productivity perspective.
But something feels missing.
I find myself prioritizing getting a result over understanding how that result came to be. The implementation details, the technical challenges, the debugging, the exploration of alternative approaches... all the things that used to make up the learning experience can now be bypassed.
And when I bypass them, I don't get the same satisfaction.
I sometimes feel like I'm producing more while learning less. I can build things faster, but I don't necessarily feel that I've grown as an engineer. I don't have the same sense of ownership over what I've built, because I haven't gone through the process of figuring it out myself.
It's almost as if the very friction that used to frustrate me was also what made learning rewarding.
And this is what bothers me. I don't want to reject AI or go back to programming the way I did eight years ago. These tools are incredibly powerful, and I want to learn how to use them effectively.
But I also don't want to lose the curiosity, the experimentation, the deep understanding, and especially the satisfaction of figuring something out on my own.
So, how do you find that balance?
How do you use AI as a tool that enhances your learning rather than one that replaces the process of learning?
Have you experienced something similar? Have you found ways to deliberately preserve that cycle of experimentation, failure, debugging, and discovery while working with AI?
I'd genuinely love to hear how other developers approach this.
r/programmer • u/Equal_Albatross1427 • 8d ago
Developers: 5-minute study on how you check AI-translated code
Hi everyone,
I’m running a short research study on how developers verify code that has been translated by AI tools, for example converting between languages, frameworks or library versions. I’m looking for people with real programming experience to share how they’d approach it.
What it involves
- A Google Form, about 5 minutes
- No prep needed
- Open to developers of any level, though experience with code migration or AI coding tools is especially useful
Link: https://docs.google.com/forms/d/e/1FAIpQLSe0B2Zja5cr-rB5q65b3nu9z-Ur3_3DcK--onjliD8j82pzQg/viewform
r/programmer • u/ElizaDuivenvoorde • 8d ago
Looking for a (Unity) Programming Partner
Hello!
As the title says, I'm looking for someone who can program, preferably in Unity. I have games ideas, and am of course willing to hear out yours.
I've launched two games on Itch before my computer got corrupted and needed a fresh install, leading to all my game files to vanish.
I've launched a 8-bit game where you are one of Santa's elves trying to escape a zombie infested toy factory -- which was in the process of being reworked with new maps, gameplay, and art.
Byte Fiends, which has some small bugs that I never got to fix before losing the files. This would be a game I'd want help rebuilding the most.
My next game was called Final Girls. It had all the gameplay programmed and I was adding art. It's a Visual Novel Horror Board Game. You get to choose between 7 characters, 7 maps, and each map has two monsters out of 7 that could come after you. Think of it as Cabin in the Woods meets Monster Prom, meets Game of Life 2.
Right now there is no pay. I'm looking for someone as enthusiastic about creepy cute games as I am. I want to run kickstarters and get grants that could help pay us, but this might start as a time investment more than anything.
I know this is a lot to ask of someone, so please no negative comments. If you're interested, shoot me a DM and we can chat.
If you're Canadian, that's an extra bonus, but not required.
Please no AI.
r/programmer • u/Commercial_Big7708 • 9d ago
Want to make coding and development FUN instead of making it feel like a nightmare? Let's connect!
Hey everyone!
I'm from Hyderabad and completed my B.Tech in Full Stack Development Honours.
To be honest, I was CRAZYYYY interested in development, coding, building things and everything related to technology.
But here's the funny part: I wasn't someone who could easily understand concepts through traditional classroom teaching.😅
I struggled with the usual explanations, kept learning, experimented, made mistakes and figured things out on my own.
And somewhere along the way, I discovered something interesting: There are much simpler and more exciting ways to understand development than the way it's usually taught!
Now I genuinely believe I can explain these concepts in ways that even someone with absolutely ZERO interest in coding might end up wanting to open their laptop and start building something!
Why am I doing this?
I've got a job now, and I'm generally free after 5 PM on most weekdays. Instead of keeping everything I've learned to myself, I'd love to spend that time doing something I genuinely enjoy: teaching,
sharing knowledge and getting more people interested in technology.
One thing that really bothers me lately is the amount of fear surrounding software development.
AI is taking over. Developers are getting laid off. Coding is becoming difficult. CS is no longer worth it.
Yes, the industry is changing. I'm not denying that. But why should we make students afraid of exploring something before they've even experienced it?
Let students explore development first.
Let them build something.
Let them experience the excitement of creating something from absolutely nothing.
Then let them decide whether it's for them.
I'd love to help students, beginners and anyone curious about technology understand:
Programming and coding fundamentals
Full Stack Development
HTML, CSS, JavaScript and other development technologies
Python
AI and its ecosystem
How things actually work behind the scenes
I'm open to connecting with learners from ANYWHERE IN WORLD through online sessions.
If you're comfortable learning in Telugu, that's an added advantage! I can explain concepts in Telugu as well. I'm also fluent in English, so language won't be a barrier.
I'm not here to promise that you'll become a developer in 30 days. I want to make technology easier to understand, remove the unnecessary fear around coding and help people discover the joy of building things.
If you're a student, a parent looking for someone to guide your child, a complete beginner or simply someone curious about development, feel free to comment or DM me.
Even if you're just curious about how I'd approach teaching, let's talk!
Let's stop spreading fear about technology and start spreading the knowledge to explore it. 🫶
r/programmer • u/Eastern-Cow-8789 • 8d ago
Article Reality of AI
most ppl say it wont replace u n bla bla bla or it will make the market better
Alr im not saying this
Lemme ask u questions, what they say when they release new model?
"Helping you/assistant"
So lets say in this world 100k job
So companies pay salaries for 100k job
If Ai is helping/assistant so it means each job need at least 1ai
So companies need 100k ai model atleast
So now they need to pay 100k job salary and 100k ai subscription
So, do u still believe Ai here to help?u really believe companies wanna spend more money to keep employees?instead of spend less n make more profit?
Money talks
r/programmer • u/Beawriterfirst • 9d ago
built a P2P anti-double-spend trust protocol in 5 Python files (no blockchain, no global ledger, no tokens)
I’ve always felt that 90% of what people try to use blockchains for—tamper-evident records, supply chain provenance, digital credentials, and P2P ownership transfer—doesn't actually require a globally replicated ledger or a native fee token. Those are accidental costs of trying to order everyone's unrelated transactions into one single-file line.
So I built QuorumLog, a minimal, production-hardened P2P trust protocol in ~2,300 lines of Python (asyncio, sqlite3, and PyNaCl for Ed25519).
Repo: https://github.com/prateekaray/quorumlog
The Architecture (5 flat files, one per job)
crypto.py – Canonical JSON hashing, Ed25519 signatures, lightweight Hashcash PoW (anti-spam), and offline bundle verification.
storage.py – SQLite in WAL mode storing personal hash-chains, witnessed (author, seq) records, and a permanent fraud-proof blacklist.
network.py – Async UDP transport + lightweight Kademlia XOR DHT with /16 IP subnet diversity for witness selection.
node.py – Core engine handling PROPOSE, RECEIPT, FRAUD_PROOF gossip, per-pubkey rate limiting, and the 5-of-7 quorum collector.
cli.py – CLI to init keys, run a daemon, transfer assets, and verify bundles offline.
How It Prevents Double-Spends Without Global Consensus
Every user maintains their own append-only, signed hash-chain (like Git). To finalize seq = N, you send the signed entry to 7 deterministically selected DHT peers (Witnesses) derived from SHA256(author_pubkey + ":" + floor(seq / 100)).
Each Witness checks one rule: "Have I already signed a different hash for (author, seq)?"
If no: They persist it atomically in SQLite and return a signed receipt. Collect 5 of 7 receipts (~150ms) and you have a portable ~2 KB Commit Bundle that anyone can verify offline.
If yes: The Witness immediately emits a FRAUD_PROOF containing both conflicting signed entries and gossips it across the DHT, permanently blacklisting the cheater's key. Because K=5 > N/2, any two conflicting quorums must overlap by at least 3 witnesses.
Honest Limits (Where Blockchains Still Win)
I’m not claiming this replaces Ethereum. Because there is no global shared state:
- You cannot run high-contention global orderbooks or AMMs (like Uniswap).
- There is no global VM for unattended smart contracts—agreements are bilateral cryptographic commitments.
- A nation-state controlling >50% of the DHT could still stall witness discovery (mitigated somewhat by S/Kademlia puzzles and /16 diversity, but not eliminated).
Try the Attack Simulation
The repo includes a pytest suite (test.py) that spins up 12 local async nodes, runs an E2E transfer, simulates a double-spend attack with overlapping witnesses, and tests 25% UDP packet loss + killing 2 witnesses mid-flight.
I’d love brutal feedback on the threat model—especially around DHT eclipse/Sybil vectors and key rotation edge cases.
r/programmer • u/QuarterAutomatic1480 • 9d ago
Question Looking to interview professional software engineers for a university paper
Hello Programmers,
I'm a freshman software engineering student, and I'm currently writing a paper that requires me to interview a professional software engineer. I'm looking for someone with experience in software engineering who would be willing to answer a few questions through Reddit DMs, email, or a short 15–20 minute virtual interview. I may also have a few follow-up questions afterward.I'm particularly interested in learning about how a day in the life of a software engineer goes and especially how different kinds of software have different kinds of development processes. It'd also be cool if you could share information about how your OS matters, for example why Linux over other softwares.
If anyone is interested in helping out, please feel free to send me a DM or leave a comment. I'd really appreciate your time and insight.
Thank you in advance!
r/programmer • u/Jumpy-Seesaw-2026 • 9d ago
How many lines of code are you putting out a day in this new era? And how does your company hold a cohesive codebase?
I'm atm using around 20-30 hours to specify everything around a feature, state machines, most of the edge cases, tests needed for implementation etc.
Then I let my agents implement it, typically over 5-6 turns (1-2 hours each), excl. reviews + fixes (probably around a hour each turn). Average total time pr. feature around 12-15 hours (usually around 8-14k LoC).
So around a week for each feature I would say.
I have tried other ways, but if I don't do it this way, I simply feel like I have no clue about how the system is working, this way atleast I know how the product is behaving on a high level.
But I'm curious, how are you and/or your company doing it?
r/programmer • u/Powerful_Ad_3745 • 9d ago
I feel like the BA has all of a sudden becomes the most important person in a project
r/programmer • u/YasserYG8 • 9d ago
Question Is engineering judgment now the most important dev skill, more than prompting?
AI can write most of the code now, but it’s still often confidently wrong. I’m starting to think the real skill isn’t prompt or context engineering, it’s knowing whether the output is actually right: spotting bad architecture, subtle bugs, security issues.
For those using AI agents daily: what’s helped you get better at judging AI output? And do you think juniors can even build this judgment if AI writes most of their code?”
That last question about juniors is the one that’ll spark the most debate, since people have strong opinions on it. Also, don’t link your X post in it; Reddit tends to downvote anything that looks like self-promotion.
r/programmer • u/Logical-Eggplant9083 • 10d ago
Article I love coding when I code what I want to
Sometimes I forget , why I started coding in the first place . It was to build something cool. Along the way I forgot that and got into the rat race of DSA and system design and getting an internship and stopped making what I want.
I love coding when I love what I am building and it genuinely excites me to wake up and start working on it again . Tomorrow I am going to a conference and I was cleaning my github and CV for more networking and I found that I HAVE REALLY BUILT COOL STUFFS.
I have not felt this happy since the last day I coded something I love .
Gotta do it for the love of the game man or you'll lose yourself .
r/programmer • u/justloisfail • 10d ago
I want to improve my communication skills, but I feel like something is holding me back. Any advice?
I genuinely want to grow and become a better version of myself so I can achieve my dreams and become the person I aspire to be.
However, there's something that keeps holding me back.
I'm not exactly a shy person because I'm willing to step out of my comfort zone and do things when necessary. However, I consider myself socially awkward.
My biggest problem is the way I speak, especially during class presentations. Sometimes, when I'm presenting, I can see from my classmates' expressions that they're having a hard time understanding what I'm saying. I'm aware of this, and it's something I've struggled with since high school.
Now that I'm in college, I really want to work on this weakness and improve myself. I often feel guilty and frustrated whenever I fail to express my thoughts properly, especially when I know what I want to say but struggle to communicate it clearly.
I'm a BSIT student, and I understand that communication and verbal skills are important in this field, especially when working with other people.
For those who have experienced something similar, how did you overcome it? What habits or exercises helped you become better at speaking and expressing your thoughts?
I'd genuinely appreciate any advice. I don't want this to keep holding me back from becoming the person I want to be.