4 ms·
OK but if you have large amounts of unused code throughout the codebase, mistakes are more likely to be "missed, blindly trusted, or just misunderstood".
by NewJazz 3y ago
OK but if you have large amounts of unused code throughout the codebase, mistakes are more likely to be "missed, blindly trusted, or just misunderstood".
- teaearlgraycold 3y ago> but if you have large amounts of unused code throughout the codebase Delete it? Version control is your backup
- hyperman1 3y agoYou have to find it, first. I have a PHP codebase where symfony and doctrine are using strings to connect distant parts of the code. Just trying to find what calls what is hard. I am in the process of replacing as much strings with real calls and adding as much typing as possible, and have thrown away 1/3, but the code base fights back.
- jay_kyburz 3y agoI think when the OP says concise they mean using several lines to make some logic clear, rather than a tricky little one liners. (like many of the mistakes in the article)
- newZWhoDis 3y agoOne example of this I HATE is ruby’s obsession with return X unless [complex logic] I sometimes see this stacked inside other complex logic and it’s a nightmare sometimes to figure out the actual control flow.
- nayuki 3y agoWhich desugars to: if (!complex logic) return X;
- reportgunner 3y agoIf you put OR between two ANDs without a paren I think you have bigger issues than unused code.