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

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Expletive Deleted Pin
PIEBALDconsult9-Jul-13 8:28
mvePIEBALDconsult9-Jul-13 8:28 
GeneralRe: Expletive Deleted Pin
Rob Grainger9-Jul-13 22:45
Rob Grainger9-Jul-13 22:45 
GeneralRe: Expletive Deleted Pin
Shameel10-Jul-13 4:38
professionalShameel10-Jul-13 4:38 
GeneralRe: Expletive Deleted Pin
Rob Grainger10-Jul-13 5:09
Rob Grainger10-Jul-13 5:09 
GeneralRe: Expletive Deleted Pin
AspDotNetDev10-Jul-13 5:15
protectorAspDotNetDev10-Jul-13 5:15 
GeneralRe: Expletive Deleted Pin
Ingo11-Jul-13 6:24
Ingo11-Jul-13 6:24 
GeneralRe: Expletive Deleted Pin
Corporal Agarn10-Jul-13 1:44
professionalCorporal Agarn10-Jul-13 1:44 
GeneralRe: Expletive Deleted Pin
Rob Grainger10-Jul-13 5:14
Rob Grainger10-Jul-13 5:14 
There are two parts:

1. We now use a .config file to store these settings. Reading these is done during app startup. If errors occur, either (a) a message is shown to the user if the settings is required, or (b) an entry is made in a log if the entry is non-critical.

2. The original coding loaded the settings within a VB Form. I've migrated this to app startup code, so the errors (a) raise an exception so they can be reported back to the user in a more managed way.


The old app has the business logic entirely in VB forms, in the new version almost all business logic is in C# classes, the (WPF) forms have minimal code to set the data context for the form to an appropriate view model object.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.

GeneralRe: Expletive Deleted Pin
ExcellentOrg10-Jul-13 20:38
ExcellentOrg10-Jul-13 20:38 
GeneralRe: Expletive Deleted Pin
Lee Chetwynd11-Jul-13 1:28
Lee Chetwynd11-Jul-13 1:28 
GeneralRe: Expletive Deleted Pin
donbsc11-Jul-13 3:41
donbsc11-Jul-13 3:41 
GeneralRe: Expletive Deleted Pin
RafagaX11-Jul-13 4:43
professionalRafagaX11-Jul-13 4:43 
GeneralRe: Expletive Deleted Pin
Rob Grainger15-Jul-13 23:05
Rob Grainger15-Jul-13 23:05 
GeneralWhat this 'null' check doing here... PinPopular
Mohammed Hameed8-Jul-13 3:06
professionalMohammed Hameed8-Jul-13 3:06 
GeneralRe: What this 'null' check doing here... Pin
Pete O'Hanlon8-Jul-13 3:19
mvePete O'Hanlon8-Jul-13 3:19 
GeneralRe: What this 'null' check doing here... Pin
Mohammed Hameed8-Jul-13 3:29
professionalMohammed Hameed8-Jul-13 3:29 
GeneralRe: What this 'null' check doing here... Pin
Pete O'Hanlon8-Jul-13 3:30
mvePete O'Hanlon8-Jul-13 3:30 
GeneralRe: What this 'null' check doing here... Pin
Mohammed Hameed8-Jul-13 3:36
professionalMohammed Hameed8-Jul-13 3:36 
GeneralRe: What this 'null' check doing here... Pin
KP Lee10-Jul-13 19:22
KP Lee10-Jul-13 19:22 
GeneralRe: What this 'null' check doing here... Pin
bencr10-Jul-13 3:16
bencr10-Jul-13 3:16 
GeneralRe: What this 'null' check doing here... Pin
KP Lee10-Jul-13 19:52
KP Lee10-Jul-13 19:52 
GeneralRe: What this 'null' check doing here... PinPopular
peterchen8-Jul-13 3:21
peterchen8-Jul-13 3:21 
GeneralRe: What this 'null' check doing here... Pin
Mohammed Hameed8-Jul-13 3:25
professionalMohammed Hameed8-Jul-13 3:25 
GeneralRe: What this 'null' check doing here... Pin
jim lahey8-Jul-13 4:03
jim lahey8-Jul-13 4:03 
GeneralRe: What this 'null' check doing here... Pin
englebart10-Jul-13 4:18
professionalenglebart10-Jul-13 4: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.