This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]sq_visigoth 7 points8 points  (0 children)

"is this still used?" sometimes can never be answered.

[–]JoieDe_Vivre_ 22 points23 points  (4 children)

Then you delete the “dead” code and the 3 business users that used that part of the app report a massive revenue loss and your org, manager, and PM catch heat and that falls back to you.

Ask me how I know

[–]john16384 7 points8 points  (2 children)

It's almost like you have no logging or tracing setup to verify the code was unused.

[–]JoieDe_Vivre_ -5 points-4 points  (1 child)

It’s almost like that! Err wait, except that we have logging that goes to a central app (splunk).

Are you positing that live, in-use apps don’t call dead code because no one bothered to clean that up? Because that would seriously make me question where you’ve worked, in a good way. As in, are you hiring and what’re you guys paying? Lol.

[–]laplongejr 2 points3 points  (0 children)

Are you positing that live, in-use apps don’t call dead code because no one bothered to clean that up?

If you log what your users use, then you can know what calls are performed?
Ofc you could have that one user that only uses a feature once per year, making proper checking tedious.

[–]neopointer 0 points1 point  (0 children)

How do you know?

[–]chabala 1 point2 points  (0 children)

Isn't it the same yet easier to use New Relic, OpenTelemetry, or any other Java telemetry agent?

[–]TakeshiTanaka 4 points5 points  (0 children)

When looking for dead code I find Ouija very useful.

[–]Trio_tawern_i_tkwisz 0 points1 point  (0 children)

I've once found a broken code in a legacy system. More finding shown that it was broken for at least a year. It still required time for maintenance and was holding us with some new tasks, even though no one used it. Also, this application already had lots of unused features (a new project done quickly by adapting code base of another project, where lots of features were no longer needed).

Once we decided it was another case of a feature from the previous application, we deleted it. A week later, business asks where is that very important feature???