4 ms·
>Ok, how does one best reason about performance and security with messy unmaintainable code? The same way one does it with 'clean' code: Using profiling tools.
by Xeamek 3y ago
>Ok, how does one best reason about performance and security with messy unmaintainable code?
The same way one does it with 'clean' code:
Using profiling tools.
Security is a bit less straight forward, but still.
>will feel very objective.
Keyword: Feel.
And while most people could probably agree on terrible code being terrible, the 'less terrible' the code is, the more this argument becomes a feeling.
And then we hit up point where it's no longer possible to discuss things using objective arguments - how will a senior java developer, who is used to heavy OOP style coding reason with a senior C developer for whom such OOP heavy style is the oposite of 'clean'?
Ofcourse, the example is (too) simplistic, but even in this thread You have people arguing about "big functions" vs splitting things up. And unlike the performance, which You can alaways just point to the raw numbers, here You can't rely on any sorts of 'objectivity'
- Nevermark 3y agoCertainly you can point to numbers re performance. But reasoning about performance is another thing if the code is a mess. Messiness and unmaintainability does not scale. You can argue its not a completely objective thing to measure. That is true. And yet objectively, it really matters. Not everything that is important comes with a clear number. Which is why experience and good judgement matter too. Two more things without numbers.
- Xeamek 3y agoAgain though: What do You do when someone thinks Your code is a mess, but You think it's good?
- Nevermark 3y agoWhat kind of question is that? It is impossible to answer without all the details of the situation. Different situations will have completely different answers. Who, what, where, how, when, why, ...?