Click here to Skip to main content
15,868,141 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!

 
NewsWhy you should never use a boolean field (use an Enum instead) Pin
Terrence Dorsey19-Nov-12 12:24
sitebuilderTerrence Dorsey19-Nov-12 12:24 
When I tweeted about this while I was refactoring, someone told me: “Using a boolean is an antipattern”… well… now I experienced it myself. From this experience, in the future, I’ll never use a Boolean field again, and always start with an Enum, especially with a Document database where migrating data is a bit more complex than with relational databases.
State management is not ideal for a boolean value, but booleans have value.
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
Clifford Nelson19-Nov-12 12:33
Clifford Nelson19-Nov-12 12:33 
GeneralRe: Why you should never use a boolean field (use an Enum instead) PinPopular
Kevin Marois19-Nov-12 12:56
professionalKevin Marois19-Nov-12 12:56 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
Brendan Costigan19-Nov-12 21:19
Brendan Costigan19-Nov-12 21:19 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
crazedDotNetDev20-Nov-12 6:11
crazedDotNetDev20-Nov-12 6:11 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
peterchen19-Nov-12 19:39
peterchen19-Nov-12 19:39 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
MehGerbil20-Nov-12 2:06
MehGerbil20-Nov-12 2:06 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
Pete O'Hanlon20-Nov-12 5:02
subeditorPete O'Hanlon20-Nov-12 5:02 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
Marc Clifton20-Nov-12 12:20
mvaMarc Clifton20-Nov-12 12:20 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
Pete O'Hanlon20-Nov-12 12:22
subeditorPete O'Hanlon20-Nov-12 12:22 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
wout de zeeuw20-Nov-12 12:35
wout de zeeuw20-Nov-12 12:35 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
wout de zeeuw20-Nov-12 12:33
wout de zeeuw20-Nov-12 12:33 
GeneralOT - Code Stash Pin
Marc Clifton25-Nov-12 15:52
mvaMarc Clifton25-Nov-12 15:52 
GeneralRe: OT - Code Stash Pin
Pete O'Hanlon25-Nov-12 22:31
subeditorPete O'Hanlon25-Nov-12 22:31 
GeneralRe: OT - Code Stash Pin
Marc Clifton26-Nov-12 8:42
mvaMarc Clifton26-Nov-12 8:42 
GeneralRe: OT - Code Stash Pin
Pete O'Hanlon28-Nov-12 23:48
subeditorPete O'Hanlon28-Nov-12 23:48 
GeneralRe: OT - Code Stash Pin
Marc Clifton29-Nov-12 1:36
mvaMarc Clifton29-Nov-12 1:36 
GeneralRe: OT - Code Stash Pin
Pete O'Hanlon29-Nov-12 2:03
subeditorPete O'Hanlon29-Nov-12 2:03 
GeneralRe: OT - Code Stash Pin
Marc Clifton29-Nov-12 3:32
mvaMarc Clifton29-Nov-12 3:32 
GeneralRe: OT - Code Stash Pin
Pete O'Hanlon29-Nov-12 10:19
subeditorPete O'Hanlon29-Nov-12 10:19 
GeneralRe: OT - Code Stash Pin
Marc Clifton29-Nov-12 10:24
mvaMarc Clifton29-Nov-12 10:24 
GeneralRe: OT - Code Stash Pin
Pete O'Hanlon29-Nov-12 10:31
subeditorPete O'Hanlon29-Nov-12 10:31 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
harold aptroot20-Nov-12 5:12
harold aptroot20-Nov-12 5:12 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
R. Giskard Reventlov20-Nov-12 5:59
R. Giskard Reventlov20-Nov-12 5:59 
GeneralRe: Why you should never use a boolean field (use an Enum instead) Pin
Marc Clifton20-Nov-12 12:17
mvaMarc Clifton20-Nov-12 12:17 

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.