Click here to Skip to main content
15,917,005 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: When Worlds (or best practices) Collide Pin
Jacquers18-Jul-17 4:56
Jacquers18-Jul-17 4:56 
GeneralRe: When Worlds (or best practices) Collide Pin
Marc Clifton18-Jul-17 5:03
mvaMarc Clifton18-Jul-17 5:03 
GeneralRe: When Worlds (or best practices) Collide Pin
jschell19-Jul-17 8:02
jschell19-Jul-17 8:02 
GeneralRe: When Worlds (or best practices) Collide Pin
KarstenK18-Jul-17 4:32
mveKarstenK18-Jul-17 4:32 
GeneralRe: When Worlds (or best practices) Collide Pin
Marc Clifton18-Jul-17 4:48
mvaMarc Clifton18-Jul-17 4:48 
JokeRe: When Worlds (or best practices) Collide Pin
User 1106097918-Jul-17 5:13
User 1106097918-Jul-17 5:13 
GeneralRe: When Worlds (or best practices) Collide Pin
Sander Rossel18-Jul-17 5:50
professionalSander Rossel18-Jul-17 5:50 
GeneralRe: When Worlds (or best practices) Collide Pin
Gary Wheeler18-Jul-17 6:24
Gary Wheeler18-Jul-17 6:24 
Hmm. For my money, I'd prioritize DRY (Don't Repeat Yourself) and SR (single responsibility) based on which option resulted in less code.

If you've got 100 discrete calls to VerifyToken() that you'd have to add else { error-handling-stuff; } to, I'd leave the error handling where it is.

On the other hand, if you've only got a couple calls to VerifyToken(), but the error handling is different for each case, then obviously you don't want it inside the function.
Software Zen: delete this;

GeneralRe: When Worlds (or best practices) Collide Pin
TheGreatAndPowerfulOz18-Jul-17 6:32
TheGreatAndPowerfulOz18-Jul-17 6:32 
GeneralRe: When Worlds (or best practices) Collide Pin
_Maxxx_18-Jul-17 17:10
professional_Maxxx_18-Jul-17 17:10 
GeneralRe: When Worlds (or best practices) Collide Pin
Vivi Chellappa18-Jul-17 21:14
professionalVivi Chellappa18-Jul-17 21:14 
GeneralRe: When Worlds (or best practices) Collide Pin
Jirajha18-Jul-17 22:52
professionalJirajha18-Jul-17 22:52 
GeneralIdentical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
ZurdoDev18-Jul-17 3:05
professionalZurdoDev18-Jul-17 3:05 
GeneralRe: Identical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
Jacquers18-Jul-17 3:18
Jacquers18-Jul-17 3:18 
GeneralRe: Identical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
Darkness_0718-Jul-17 3:34
Darkness_0718-Jul-17 3:34 
GeneralRe: Identical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
MacSpudster18-Jul-17 4:21
professionalMacSpudster18-Jul-17 4:21 
RantThe USA, Liberia and Myanmar Pin
Cornelius Henning18-Jul-17 1:03
professionalCornelius Henning18-Jul-17 1:03 
GeneralRe: The USA, Liberia and Myanmar Pin
Richard Deeming18-Jul-17 1:06
mveRichard Deeming18-Jul-17 1:06 
GeneralRe: The USA, Liberia and Myanmar Pin
OriginalGriff18-Jul-17 1:14
mveOriginalGriff18-Jul-17 1:14 
GeneralRe: The USA, Liberia and Myanmar Pin
Richard Deeming18-Jul-17 1:24
mveRichard Deeming18-Jul-17 1:24 
GeneralRe: The USA, Liberia and Myanmar Pin
CodeWraith18-Jul-17 1:27
CodeWraith18-Jul-17 1:27 
GeneralRe: The USA, Liberia and Myanmar Pin
OriginalGriff18-Jul-17 1:36
mveOriginalGriff18-Jul-17 1:36 
GeneralRe: The USA, Liberia and Myanmar Pin
Daniel Pfeffer18-Jul-17 1:52
professionalDaniel Pfeffer18-Jul-17 1:52 
GeneralRe: The USA, Liberia and Myanmar Pin
OriginalGriff18-Jul-17 2:06
mveOriginalGriff18-Jul-17 2:06 
GeneralRe: The USA, Liberia and Myanmar Pin
CodeWraith18-Jul-17 2:15
CodeWraith18-Jul-17 2:15 

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.