In a method where any positive number returned would signify success, would it be good practice to use negative numbers to define error conditions?  Could then use enums to make readable.
Using negative numbers to return error conditions
architecture
It's often language dependant. Quite common practice in languages such as C and C++, but where other mechanisms exist it's preferable to use them, for example exceptions. They allow decoupling - both conceptual and in code - of usage of the method result from dealing with errors.int result = myFunction();if (result < 0) dealWithError(result);else proceedNormally();is arguably less easy to reason about and code than a try-catch block (which can be placed anywhere in the calling hierarchy, without the explicit need to propagate error results - though some languages like Java will require/recommend a signature change. E.g. myFunctionChecked() {   try {      myMethod();   }   catch (Exception e){      dealWithExcpetion(e)   }}and myOtherFunctionChecked() {   try {      myOtherFunction();   }   catch (Exception e){       dealWithExcpetion(e)   }}myOtherFunction() {   //... some stuff   myFunction();   //... some other stuff}can both be used without any change to how myFunction reports its errors if exceptions are used.Final point for exceptions is that they allow you to be consistent about how you report errors throughout your code, not depending on the range of the function.