4 ms·
11k out of a million. I wish I had a project under 1% of "dead code".
by unified101 2mo ago
11k out of a million. I wish I had a project under 1% of "dead code".
- verdverm 2mo agothere are linters that check for dead code (depending on your language / ecosystem), it should always be 0%
- jibal 2mo agoThe dead code was removed from the pre-Rust Zig version. The OP has no credibility. P.S. Nor does new user parenting my comments.
- unified101 2mo agoFlag the article and move on.
- dminik 2mo agoI mean, how do you check that your frontend code (possibly not even managed by your team) is calling and needs all of your backend endpoints? I'm sure it can be done, and it probably should, but saying it should always be 0% is not very pragmatic.
- myvoiceismypass 2mo agoDead code likely means chunks of code not used by other chunks of code, which should be easy to determine statically in most modern languages. Whether an exposed endpoint is being hit (used) or not as an API is more of a test-code-coverage thing, different from the concept of "dead code".
- dminik 2mo agoTrue, but Bun actually has a similar problem. It's creating bindings to a JS runtime. If the JS glue code then no longer uses it, the code is still marked as alive because it's registered with the runtime.
- touisteur 2mo agoIn a previous life I managed to deliver a system with (basic-block) coverage measurement compiled in (gcov) but instead of the mess of files gcov generates, the whole coverage structure was streamed to a remote server (it compressed very well). Once that was in place it was an amazing telemetry tool. Later on used Intel Processor Trace in a similar fashion for even finer (mc-dc) coverage. Coverage tools are very useful, if a bit hard to use...
- dgellow 2mo agoYou cannot be serious, any person with actual professional software experience would laugh at that claim