Hacker News new | ask | show | jobs
by ____mr____ 19 days ago
It is still possible to measure the quality of software (or other products) simply by defining a metric that proves quality and testing for it

If I were to write 2 simple functions that reverse an array, and one successfully reverses an array and the other just randomizes it - despite never using this function, we could all agree that function 1 is of higher quality than function 2.

This is an extreme example but the same can be done for, lets say, speed or error handling.

1 comments

While I think the example is too fake as to be too useful, let's take it. While we could read the code and say that one appears to achieve the job we want and the other doesn't; you don't know if the one that apparently does the job actually does the job until you put it into real-world use. You can't know it'll run with acceptable speed, edge-cases, etc. until you actually run the code in production!

If that code never goes into production with real customer use-cases, everything we say about its quality (on any metric) is 100% theoretical! We can try to replicate that environment, and we should, but until it's actually used, we can't truly know.