Page 3 of 3

Re: Smart Compiler

Posted: Tue Jun 14, 2011 9:41 pm
by Dr Danyo
This is getting a little off topic, but... :)
- consistent variable definitions (we don't like one line per variable definition, rather they should have more than one on a line to make the lengh of a method less).
Is this really an issue anymore given that you can just fold up the vars section?
I never use code folding in the IDE. The point of some of the standards is consistency across the whole product for all developers, including third party developers.
For me personally, I think there is little value is creating standards around whether or not one line or two is used for declaring a variable ( does either make you a better developer? ), far more important to me is if the variables are named correctly, that they are readable, easy to understand and express their intent without me having to think too much about it.

Consider

total : Decimal[12,2];

vs

totalAmountOwing : Decimal[12,2];

Possibly if a method has so many variables that it makes the method too long, then perhaps that method is doing too much and is a candidate for refactoring.

Re: Smart Compiler

Posted: Wed Jun 15, 2011 10:00 am
by allistar
For me personally, I think there is little value is creating standards around whether or not one line or two is used for declaring a variable ( does either make you a better developer? ), far more important to me is if the variables are named correctly, that they are readable, easy to understand and express their intent without me having to think too much about it.
It's not so much about what makes someone a better developer, it's about what makes a product more consistent and hence easier to maintain. This is especially important when staff and contractors come and go, and when third party organisations have access to your code. Making it consistent isn't hard, and if it improves readability then that makes maintenance easier. This is important when you have millions of lines of code.