Smart Compiler

For questions and postings not covered by the other forums
User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Smart Compiler

Postby Dr Danyo » Tue Jun 14, 2011 9:41 pm

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.

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Smart Compiler

Postby allistar » Wed Jun 15, 2011 10:00 am

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.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 27 guests