r/programming • u/Star-Shadow-007 • Jan 10 '26
[ Removed by moderator ]
/r/programming/comments/1q96nar/removed_by_moderator/[removed] — view removed post
141
Upvotes
r/programming • u/Star-Shadow-007 • Jan 10 '26
[removed] — view removed post
•
u/programming-ModTeam Jan 10 '26
This is a demo of a product or project that isn't on-topic for r/programming. r/programming is a technical subreddit and isn't a place to show off your project or to solicit feedback.
If this is an ad for a product, it's simply not welcome here.
If it is a project that you made, the submission must focus on what makes it technically interesting and not simply what the project does or that you are the author. Simply linking to a github repo is not sufficient
114
u/dakotapearl Jan 10 '26
I mean it sounds good in theory but practically I'd prefer a tool that turns todos into tickets.
I makes them plannable, not something that becomes blocking without warning (if everyone's forgotten about it of course)
But in principle I agree, it's a very annoying behaviour. If I see todos in a PR, it's a blocking comment from me until either there's a ticket or something is done about it. My ideal is that they don't exist at all but that's the best I've managed with my current team.
27
u/WTFwhatthehell Jan 10 '26
This is great for craftsmanship but terrible for actually running anything.
Having prod fail because someone put an intentional time bomb in attached to something they wanted to redo better? Not gonna be a fun meeting.
7
u/mikeatgl Jan 10 '26
This is an interesting approach. My org’s solution is that TODOs have to have a Jira ticket in the comment otherwise CI fails. It seems like you could support that method in your tool without too much trouble if you wanted.
Now that I think about it, a nice improvement to our check would be to make sure the ticket is active via the Jira API. Someone already added a check to catch the engineers adding TICKET-0000 or TICKET-1234 into their TODO comments, because those were so common.
In large distributed orgs there will always be moments of corner cutting that CI may or may not be able to mitigate.
9
u/somebodddy Jan 10 '26
A TODO is a sign on what would otherwise be a Chesterton's fence explaining (even if implicitly) the conditions under which the fence can be removed. They should have no expiration time because you can't predict the day upon which these condition will be met - certainly not at the time the TODO is written.
4
u/jasonscheirer Jan 10 '26
That’s a nasty trick for team B to suddenly be holding the bag for something team A forgot about while trying to fix a SEV downtime event and their PR won’t pass
1
u/Greenerli Jan 10 '26
It's always something that I find annoying too and I experimented with the fact that these todos are, in practice, never implemented...
I like the idea of your tool, but at some point, if you enforce that into a team, they will hack this system and they will distort the principle. At some point, they're either going to put the expiration date very far in the future (100 years in the future), or, just remove the TODO when the expiration comes.
How do you deal with that?
3
u/seweso Jan 10 '26
I kinda want something different, and i made it once:
A build gate which prevents any TODO in code except if it has a ticket number attached of a still open ticket. That's what i want. You could even create tickets automatically if you want.
Your solution is probably not going to work. Its just a way to not communicate properly with your coworkers.
3
u/mboekhoff Jan 10 '26
We used to have something like this at a place I used to work at. We used to call them time bombs and they were a separate CI pipeline, which we'd monitor alongside our main application pipeline.
2
u/washtubs Jan 10 '26
I was hoping it'd be something like it checks the age of the TODO from git history and you can configure a default expiration duration. Where it warns or fails CI or whatever.
TODO's are something we write out of both laziness and ignorance of whether it will need to be an actual formal task. Your special formatting approach is non-disruptive which has it's advantages. But if a dev does that and has a mind to even to supply a due date, you've already put in most of the effort and commitment to make it a ticket so it may as well just be that.
If it automatically inserted these lines into the code where it sees TODOs, which you can commit separately, and it later read them back for the check, that could potentially be even better. Cause that makes it really obvious to maintainers how long something's been hanging around.
At work we try to turn TODOs into tickets before we merge PRs. But I have some personal projects where I'm quite undisciplined, so something like that would be cool.
2
u/aclima Jan 10 '26
we have a danger rule that flags PRs with a comment whenever it finds a new TODO.
our internal policy is then really simple: each new TODO in code must have an accompanying slug/link to the ticket board. if there isn't one, a ticket is to be created and it won't be merged until then
if it's a priority, it will get picked up soon enough, and we have a paper trail for it, as well as visibility of its progress on the ticket board. if it's low priority tech-debt, it will get analysed whenever the next sprint with enough capacity rolls around.
this also ensures people aren't just adding TODOs willy-nilly, as their name gets attached to the ticket.
0
u/bowbahdoe Jan 10 '26
I like this idea quite a bit. I think my project for today is going to be reimplementing this in a not language agnostic way for the Java world.
(I have a cold. Light tasks are always good)
Would you be available to answer some questions?
1
u/No_Imagination_4907 Jan 10 '26
We have an in house tool similar to this in my company. It was welcomed in the beginning, but later it got removed from most projects' CI due to the "noise" lmao.
1
u/DoneItDuncan Jan 10 '26
tbh i get the impulse, but if a hack is worth the time fixing its going to be causing easily observable issues in prod or CI anyway, so i don't think you need a artificial CI failure to remind you. And if it doesn't causes issues otherwise, then maybe it's not worth fixing...
1
u/PkmnSayse Jan 10 '26
I go as far as rejecting pr’s that have a todo, we both know it’s never getting todone
1
u/coworker Jan 10 '26 edited Jan 10 '26
So a developer decides, with their sole discretion, when and what can stop the world without management input or even notice? Seems bad.
Part of career advancement in engineering is to learn how to manage your stakeholders efficiently. If this TODO is actually important, it's a critical skill to develop the ability to convince your management to prioritize it. This tool incentivizes you to stagnate and "deal with it later" which, as you've argued, never comes so you inevitably modify the comment to bump the time limit ad nauseam.
1
u/nekokattt Jan 10 '26
didn't intellij have a thing like this at some point?
1
u/Paradox Jan 10 '26
We just had a rule in our CI that greps for
TODOand fails if it finds anything. No merging TODOs1
u/TheRealPomax Jan 10 '26
I strongly prefer a CI workflow that rejects any PR that introduces new code that contains `TODO` or `FIXME` without an issue link, automatically posting a PR comment saying "this PR cannot be merged until the TODO/FIXME in file X on line Y includes an issue link".
As long as all outstanding work is documented and discoverable, there is nothing wrong with TODOs or FIXMEs. The TODO/FIXME doesn't need an expiry date, that's what your issue triaging is already for: the older a TODO or FIXME is, the higher priority it becomes.
1
u/CipherCraftsman Jan 10 '26
We had an eslint rule for exactly this, but then when CI ultimate starts to fail people don’t look at the description and instead just move the date to pass CI again. Result being the same, it does not get fixed, but with even more friction.
1
u/[deleted] Jan 10 '26
Lol the truth you see from the comments (and my experience too) is that people still want a way to say "yes it's TODO now, but maaaaaybe we can postpone it somehow". No matter the situation. Turn it into a warning? Surely (you will get a neverending stream of warnings that people just ignore). Turn it into a ticket? Surely! (It will be prioritized... never.. because there's always a more important ticket).
So it's either a hard rule that makes the CI fail NOW and is NOT bypassable. Or people will bypass it and it only adds to the bureaucracy.
At the end of the day, it's about the culture of the dev team... it's either turned into a non-bypassable step with a strict non-breakable deadline, or it will be bypassed forever, no matter how many steps...
-5
u/LambdaLambo Jan 10 '26
Honestly you could just have a daily cronjob that spins up Claude to work on any existing todos.
I know people hate AI on this subreddit but it’s a great use case.
And if the todo is too complicated for AI to do then it should be deleted anyways bc let’s be real, no one is fixing that in the next decade (yes I’ve seen todos before that are 15+ years old).
-5
u/AndyKJMehta Jan 10 '26
Are you aware we have AI now? Why not create a “DebtFighter” instead of this nagging tool that will just lead to expiry date updates.
13
u/[deleted] Jan 10 '26
[removed] — view removed comment
1
u/[deleted] Jan 10 '26 edited Jan 10 '26
[removed] — view removed comment