Click here to Skip to main content
15,890,512 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: Coding - so what's a crime and whats a misdemeanor? Pin
Rob Philpott30-Oct-15 2:56
Rob Philpott30-Oct-15 2:56 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
John Torjo30-Oct-15 0:40
professionalJohn Torjo30-Oct-15 0:40 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
GuyThiebaut29-Oct-15 4:07
professionalGuyThiebaut29-Oct-15 4:07 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 4:23
professionalZurdoDev29-Oct-15 4:23 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Eddy Vluggen29-Oct-15 4:38
professionalEddy Vluggen29-Oct-15 4:38 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 4:41
professionalZurdoDev29-Oct-15 4:41 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Slacker00729-Oct-15 5:19
professionalSlacker00729-Oct-15 5:19 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
OriginalGriff29-Oct-15 5:30
mveOriginalGriff29-Oct-15 5:30 
I'd disagree with this: I'd far rather see validation failures causing an immediate return then over indented cr@p to avoid it:
C#
int age;
if (!int.TryParse(tbAge.Text, out age) && age > 0 && age < 150)
   {
   MessageBox.Show("Age must be an integral value between 1 and 150");
   return;
   }
...

C#
int age;
if (!int.TryParse(tbAge.Text, out age) && age > 0 && age < 150)
   {
   MessageBox.Show("Age must be an integral value between 1 and 150");
   }
else
   {
   ...
You can get away with that for one level, but when you are validating a dozen inputs? Return is a cleaner way to do it, IMO.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:37
professionalZurdoDev29-Oct-15 5:37 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
OriginalGriff29-Oct-15 5:43
mveOriginalGriff29-Oct-15 5:43 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:46
professionalZurdoDev29-Oct-15 5:46 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:47
professionalZurdoDev29-Oct-15 5:47 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Eddy Vluggen29-Oct-15 5:50
professionalEddy Vluggen29-Oct-15 5:50 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:53
professionalZurdoDev29-Oct-15 5:53 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Eddy Vluggen29-Oct-15 6:01
professionalEddy Vluggen29-Oct-15 6:01 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Robert g Blair1-Nov-15 17:40
Robert g Blair1-Nov-15 17:40 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Kevin McFarlane29-Oct-15 8:02
Kevin McFarlane29-Oct-15 8:02 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 8:20
professionalZurdoDev29-Oct-15 8:20 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Richard Deeming29-Oct-15 4:30
mveRichard Deeming29-Oct-15 4:30 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
OriginalGriff29-Oct-15 5:31
mveOriginalGriff29-Oct-15 5:31 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Jörgen Andersson29-Oct-15 6:52
professionalJörgen Andersson29-Oct-15 6:52 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
F-ES Sitecore29-Oct-15 4:36
professionalF-ES Sitecore29-Oct-15 4:36 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Duncan Edwards Jones29-Oct-15 4:39
professionalDuncan Edwards Jones29-Oct-15 4:39 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Rob Philpott29-Oct-15 5:06
Rob Philpott29-Oct-15 5:06 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
U. G. Leander29-Oct-15 5:00
professionalU. G. Leander29-Oct-15 5:00 

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.