Click here to Skip to main content
11,481,850 members (63,316 online)

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.

Technical discussions are encouraged, but click here to ask your programming question.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Programming Question Pin
_Maxxx_16-Jan-13 17:51
member_Maxxx_16-Jan-13 17:51 
GeneralRe: Programming Question Pin
AspDotNetDev16-Jan-13 18:03
protectorAspDotNetDev16-Jan-13 18:03 
GeneralRe: Programming Question Pin
_Maxxx_16-Jan-13 18:09
member_Maxxx_16-Jan-13 18:09 
GeneralRe: Programming Question Pin
Mark_Wallace16-Jan-13 22:00
memberMark_Wallace16-Jan-13 22:00 
GeneralRe: Programming Question Pin
Nagy Vilmos16-Jan-13 23:15
memberNagy Vilmos16-Jan-13 23:15 
GeneralRe: Programming Question Pin
M Towler17-Jan-13 23:18
memberM Towler17-Jan-13 23:18 
GeneralRe: Programming Question Pin
greldak17-Jan-13 23:32
membergreldak17-Jan-13 23:32 
GeneralRe: Programming Question Pin
M Towler18-Jan-13 1:27
memberM Towler18-Jan-13 1:27 
I feel that level of commenting or descriptive naming would be breaking encapsulation, by exposing the implementation of GetTaxRate. I will go further and say that it would be repeating some of the documentation of GetTaxRate, so fails DRY. This piece of code is simply doing a calculation, so it calls a function to get the rate. It does not really need to have knowledge of where the rate came from to do its task, so it is best not to give it this knowledge. Having minimal information in this function means it will not become out of date when the implementation of GetTaxRate changes, such as to add a local cache of the value obtained from the service, using a database of rates or some other alteration.

In summary, what I am really saying is that comments of this type raise the cost of maintenance, as each later change will have to find and change multiple comments in addition to the code itself, or else risk misleading future maintainers.
GeneralRe: Programming Question Pin
liordino18-Jan-13 2:29
memberliordino18-Jan-13 2:29 
GeneralRe: Programming Question Pin
patbob18-Jan-13 6:53
memberpatbob18-Jan-13 6:53 
GeneralRe: Programming Question Pin
JackDingler18-Jan-13 7:52
memberJackDingler18-Jan-13 7:52 
GeneralRe: Programming Question Pin
CHill6018-Jan-13 2:28
memberCHill6018-Jan-13 2:28 
GeneralRe: Programming Question Pin
John Atten18-Jan-13 3:32
memberJohn Atten18-Jan-13 3:32 
GeneralRe: Programming Question Pin
jrscherer18-Jan-13 5:08
memberjrscherer18-Jan-13 5:08 
GeneralRe: Programming Question Pin
jharano18-Jan-13 5:46
memberjharano18-Jan-13 5:46 
GeneralRe: Programming Question Pin
Florin Jurcovici18-Jan-13 20:06
memberFlorin Jurcovici18-Jan-13 20:06 
GeneralRe: Programming Question Pin
Klaus-Werner Konrad24-Jan-13 2:56
memberKlaus-Werner Konrad24-Jan-13 2:56 
GeneralRe: Programming Question Pin
_Maxxx_24-Jan-13 3:10
member_Maxxx_24-Jan-13 3:10 
GeneralRe: Programming Question Pin
PIEBALDconsult16-Jan-13 18:09
memberPIEBALDconsult16-Jan-13 18:09 
GeneralRe: Programming Question Pin
_Maxxx_16-Jan-13 18:20
member_Maxxx_16-Jan-13 18:20 
GeneralRe: Programming Question Pin
PIEBALDconsult16-Jan-13 18:23
memberPIEBALDconsult16-Jan-13 18:23 
GeneralRe: Programming Question Pin
ahmed zahmed17-Jan-13 6:12
memberahmed zahmed17-Jan-13 6:12 
JokeRe: Programming Question Pin
Harry Neethling17-Jan-13 20:52
memberHarry Neethling17-Jan-13 20:52 
GeneralRe: Programming Question Pin
Chris Maunder16-Jan-13 18:44
adminChris Maunder16-Jan-13 18:44 
GeneralRe: Programming Question Pin
Brisingr Aerowing17-Jan-13 2:28
memberBrisingr Aerowing17-Jan-13 2:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 24 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid