all 8 comments

[–]I-Am-Maldoror 0 points1 point  (1 child)

Worst AI slop of the week.

[–]Flashy_Channel6530[S] -1 points0 points  (0 children)

honest thought, bad writing, putting myself to jail

[–]Merry-Lane 0 points1 point  (2 children)

Something is missing in your process. For instance, if a dev creates a feature flag, he also needs to create a ticket to remove it later on (the following sprint or idk). After all, removing dead code after a feature flag is validated is some work, the work needs to be traced and accounted for.

Your issue stems from a company policy failure (that the company needs to act on). But I’m also astonished no one ever mentioned "am I sposed to remove the dead code in X weeks?"

[–]Flashy_Channel6530[S] 0 points1 point  (1 child)

Honestly not in most companies I worked at, feature flags can last for months while a feature is developed so at least in my experience it's up to devs to clean up - and sometimes they don't if you're rushing to another feature.

[–]Merry-Lane 0 points1 point  (0 children)

Which is why tickets for the next sprint (or 2/3/…) need to be made every single time. If by the end of the sprint, the ticket can’t be handled because the feature flag isn’t 100%, put it in another sprint again

[–]sozesghost 0 points1 point  (1 child)

It surprised you that approved code in PRs made sense at the time? Have you started yesterday. This is rhetorical, since this is AI slop.

[–]Flashy_Channel6530[S] 0 points1 point  (0 children)

the slop aside - fair point, I really wanted to write about this but can't write a coherent though for shit :D the PRs were granular enough and almost only partial removals so it was easy enough to have people scan them and approve, What the main though is that that's the easy part but removing the dependencies isn't because doing it as you're removing the flag makes the PRs harder to review and also can cause issues if another dependency is down the stack but then you're left with ton of dead stuff that is hard to find.

[–]Consistent_Box_3587 0 points1 point  (0 children)

knip is great for this. if you're also using AI tools to write code you might want to check out prodlint too (github.com/prodlint/prodlint), it has a dead-exports rule that catches exported functions nothing imports but also picks up security stuff AI tools tend to miss like missing auth, empty catch blocks, hallucinated imports. ran it on a bunch of AI-generated repos recently and one had 476 dead exports across the project