Click here to Skip to main content
15,896,278 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Why comments are stupid, a real example Pin
Sascha Lefèvre13-Apr-15 10:55
professionalSascha Lefèvre13-Apr-15 10:55 
GeneralRe: Why comments are stupid, a real example Pin
TheGreatAndPowerfulOz13-Apr-15 13:11
TheGreatAndPowerfulOz13-Apr-15 13:11 
GeneralRe: Why comments are stupid, a real example Pin
R. Giskard Reventlov13-Apr-15 11:01
R. Giskard Reventlov13-Apr-15 11:01 
GeneralRe: Why comments are stupid, a real example Pin
newton.saber13-Apr-15 11:02
newton.saber13-Apr-15 11:02 
GeneralRe: Why comments are stupid, a real example Pin
PIEBALDconsult13-Apr-15 11:13
mvePIEBALDconsult13-Apr-15 11:13 
GeneralRe: Why comments are stupid, a real example Pin
Kent Sharkey13-Apr-15 11:14
staffKent Sharkey13-Apr-15 11:14 
GeneralRe: Why comments are stupid, a real example Pin
den2k8813-Apr-15 21:06
professionalden2k8813-Apr-15 21:06 
GeneralRe: Why comments are stupid, a real example Pin
Nicholas Marty13-Apr-15 20:53
professionalNicholas Marty13-Apr-15 20:53 
I didn't really read the whole article yet. But already the first refactoring suggestion is already completely wrong.

The author suggests renaming path to validatedFullPath but if you have to check if the value is null, then it is NOT validated and therefore the name is wrong.

To be fair, the code itself isn't great in that regard either, as the comment itself says that the value inside the string should already be a valid value and then still checks for null. It would have been easier to understand to if they'd throw an ArgumentNullException when checking the value for null, as it clearly shouldn't be null it the first place. I, however, don't know how this method is used, and therefore can't really tell if that's a valid assumption. Of course, refactoring it this way would change the behaviour of the code ...
GeneralRe: Why comments are stupid, a real example Pin
User 1013254613-Apr-15 22:08
User 1013254613-Apr-15 22:08 
GeneralRe: Why comments are stupid, a real example Pin
Rob Grainger13-Apr-15 22:48
Rob Grainger13-Apr-15 22:48 
GeneralRe: Why comments are stupid, a real example Pin
Mark_Wallace13-Apr-15 22:53
Mark_Wallace13-Apr-15 22:53 
GeneralRe: Why comments are stupid, a real example Pin
TheGreatAndPowerfulOz14-Apr-15 9:47
TheGreatAndPowerfulOz14-Apr-15 9:47 
GeneralRe: Why comments are stupid, a real example Pin
Mark_Wallace14-Apr-15 11:02
Mark_Wallace14-Apr-15 11:02 
GeneralRe: Why comments are stupid, a real example Pin
TheGreatAndPowerfulOz14-Apr-15 11:14
TheGreatAndPowerfulOz14-Apr-15 11:14 
GeneralRe: Why comments are stupid, a real example Pin
Mark_Wallace14-Apr-15 11:21
Mark_Wallace14-Apr-15 11:21 
GeneralRe: Why comments are stupid, a real example Pin
TheGreatAndPowerfulOz14-Apr-15 11:22
TheGreatAndPowerfulOz14-Apr-15 11:22 
GeneralRe: Why comments are stupid, a real example Pin
Mark_Wallace14-Apr-15 12:04
Mark_Wallace14-Apr-15 12:04 
GeneralRe: Why comments are stupid, a real example Pin
TheGreatAndPowerfulOz14-Apr-15 15:20
TheGreatAndPowerfulOz14-Apr-15 15:20 
GeneralRe: Why comments are stupid, a real example Pin
Mark_Wallace14-Apr-15 22:14
Mark_Wallace14-Apr-15 22:14 
JokeRe: Why comments are stupid, a real example Pin
dan!sh 13-Apr-15 23:39
professional dan!sh 13-Apr-15 23:39 
GeneralRe: Why comments are stupid, a real example Pin
Mark_Wallace14-Apr-15 12:05
Mark_Wallace14-Apr-15 12:05 
GeneralRe: Why comments are stupid, a real example Pin
Chris Maunder14-Apr-15 8:30
cofounderChris Maunder14-Apr-15 8:30 
NewsIntroducing ReSharper C++ Pin
Kent Sharkey13-Apr-15 10:11
staffKent Sharkey13-Apr-15 10:11 
QuestionRe: Introducing ReSharper C++ Pin
Maximilien13-Apr-15 14:35
Maximilien13-Apr-15 14:35 
AnswerRe: Introducing ReSharper C++ Pin
Dan Neely14-Apr-15 3:18
Dan Neely14-Apr-15 3:18 

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

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