Please create a I Hate Microsoft Club too
-
@izzion I wouldn't say it's spoiling anything for me.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
Granted, there's no "empty" equivalent for a boolean value.
Other than NULL?
-
@Arantor said in Please create a I Hate Microsoft Club too:
@boomzilla said in Please create a I Hate Microsoft Club too:
Granted, there's no "empty" equivalent for a boolean value.
Other than NULL?
Yes. In the case of a boolean, it would be more like
FILE_NOT_FOUNDmu maybe? Again, I was looking for an analog to null / empty strings.
-
@boomzilla but isn't NULL for a boolean effectively making it 'yes / no / don't know' which is all NULL does for strings, it delineates some type of 'don't know' from all the possible legal answers as
''
is often a legal known answer.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
Oh, so they can't change their mind later?
They definitely can. They can revert back to having a blank address if they wanted to, for instance, after having provided an address before.
@boomzilla said in Please create a I Hate Microsoft Club too:
Because maybe you want to pester an "unasked" user the next time they log in and you just added one of them, so they have something that's unasked.
That's exactly what I'm talking about. Null has a good use case here (distinct from empty string) for both the address, and each of the checkboxes.
-
@Arantor said in Please create a I Hate Microsoft Club too:
@boomzilla but isn't NULL for a boolean effectively making it 'yes / no / don't know' which is all NULL does for strings, it delineates some type of 'don't know' from all the possible legal answers as
''
is often a legal known answer.Maybe, but not necessarily. Again, if the user just missed that checkbox, it doesn't mean he doesn't know. It just means he didn't answer it. All the same stuff applies. You'd need an "I'm not answering" sort of option to be a logical equivalent to the empty string.
-
@LB_ said in Please create a I Hate Microsoft Club too:
That's exactly what I'm talking about. Null has a good use case here (distinct from empty string) for both the address, and each of the checkboxes.
Only if you think pestering the user is a good thing.
-
@boomzilla Except an unchecked checkbox has a value: false. That's a concrete known value to the system, which is all we're discussing. We don't care whether the user meant to check it or not, we're saying we've gone from 'we don't know what the value is' to 'we know a value for this column'.
This is a waste of time, though, because it's clear you don't get what we're getting at, and probably never will.
-
@Arantor said in Please create a I Hate Microsoft Club too:
We don't care whether the user meant to check it or not, we're saying we've gone from 'we don't know what the value is' to 'we know a value for this column'.
Yes, for normal user input, there's no way for the user to make a "no answer."
@Arantor said in Please create a I Hate Microsoft Club too:
This is a waste of time, though, because it's clear you don't get what we're getting at, and probably never will.
I agree. I think this is mostly a programmer's OCD sort of thing and not a big deal.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
@Arantor said in Please create a I Hate Microsoft Club too:
We don't care whether the user meant to check it or not, we're saying we've gone from 'we don't know what the value is' to 'we know a value for this column'.
Yes, for normal user input, there's no way for the user to make a "no answer."
They could just not submit the form...
-
@boomzilla said in Please create a I Hate Microsoft Club too:
OK, so there's a second, "Review this information" step and if they still leave it blank then it's an empty string?
We will gladly let you hand review all 8 billion multiple system generated transactions in our one table to let us know which are really intentionally empty and which are null because there was no data available....
Or deal with muddying up the reports by having to run multicolumn conditional searches just to find where the null really means ''.
All in the name of defending one RDB's poor choice. Even MySQL doesn't do that and Oracle owns them now.
-
@Jaloopa said in Please create a I Hate Microsoft Club too:
I haven't said that's an issue, so I'm not sure why you'd want me to explain it.
Because reframing the question in a different form and denying that any other problems exist is the only way he can twist his argument into making sense.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
I'm trying to think of a place in my system where it makes a difference but I'm not coming up with anything.
Other than the ones that were given and conveniently ignored of course
-
thanks node for punting me up to some odd random location halfway back up the topic after I posted.
-
@djls45 said in Please create a I Hate Microsoft Club too:
@boomzilla said in Please create a I Hate Microsoft Club too:
@Arantor said in Please create a I Hate Microsoft Club too:
We don't care whether the user meant to check it or not, we're saying we've gone from 'we don't know what the value is' to 'we know a value for this column'.
Yes, for normal user input, there's no way for the user to make a "no answer."
They could just not submit the form...
If the form is only that stuff, then sure.
-
@darkmatter said in Please create a I Hate Microsoft Club too:
We will gladly let you hand review all 8 billion multiple system generated transactions in our one table to let us know which are really intentionally empty and which are null because there was no data available....
Sure, why not? Look, I never said there was no reason why, just that I haven't seen a convincing case. I think data warehouses may be the best argument for them, even if I don't have a concrete idea of a useful case.
@darkmatter said in Please create a I Hate Microsoft Club too:
All in the name of defending one RDB's poor choice.
Wow, you are terrible at reading my posts. I'm not defending a database, I'm attacking you guys!
-
@darkmatter said in Please create a I Hate Microsoft Club too:
@boomzilla said in Please create a I Hate Microsoft Club too:
I'm trying to think of a place in my system where it makes a difference but I'm not coming up with anything.
Other than the ones that were given and conveniently ignored of course
Yours was really vague and incomprehensible after anonymizing. No one else has given me anything convincing as to the utility. In fact, I demonstrated that some of the schemes put forth were TRWTF and asking for trouble.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
I think data warehouses may be the best argument for them
They make up the majority of my work with databases, so you can see why I am biased.
-
@darkmatter said in Please create a I Hate Microsoft Club too:
They make up the majority of my work with databases, so you can see why I am biased.
Yeah, I don't do that sort of thing, though it's possible we'll be doing something like one in the next year or two. Though I still can't think of a reason to care, but that may be domain specific.
-
@darkmatter i perfectly agree with the user entry forms needing to take the onus on fixing empties or nulls or whatever.
but databases have lots of purposes, not just holding user form entry. the empty vs null conflation is a weakness.
So now that we're agreed, lets get to the part where oracle has no boolean or bit field (at least not to the last of my knowledge).
-
@darkmatter granted, this requires making use of the much superior 'Y' 'N' 'Maybe' 'FILE_NOT_FOUND' methodology ;)
-
@darkmatter said in Please create a I Hate Microsoft Club too:
So now that we're agreed, lets get to the part where oracle has no boolean or bit field (at least not to the last of my knowledge).
Yeah, you just use a
number(1)
field. I'm sure it drives the strong typers crazy, but that's definitely a benefit.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
Yeah, you just use a number(1) field. I'm sure it drives the strong typers crazy, but that's definitely a benefit.
that is drives strong typers crazy or that there's up to 10 possibilities that can be stored in a Number(1).
we used CHAR(1).
What does end up happening though, is if you migrate to a new system and want to change all the 'Y'/'N' or 0/1 entries from your old database to boolean or bit (performance reasons yeah?) then you have a lot of applications to fix :/
Less so with the 0/1 method since it would coerce most of the time. On our particular db choice it does not though, you have to use True/False/NULL and 0/1/NULL fail.
-
@darkmatter said in Please create a I Hate Microsoft Club too:
that is drives strong typers crazy or that there's up to 10 possibilities that can be stored in a Number(1).
11 if you don't make it non-nullable. OK, for completeness you add a constraint that it's 1 or 0.
@darkmatter said in Please create a I Hate Microsoft Club too:
What does end up happening though, is if you migrate to a new system and want to change all the 'Y'/'N' or 0/1 entries from your old database to boolean or bit (performance reasons yeah?) then you have a lot of applications to fix
Less so with the 0/1 method since it would coerce most of the time. On our particular db choice it does not though, you have to use True/False/NULL and 0/1/NULL fail.Yeah, whatever. That's future me's problem. Well, no, there's about zero percent chance it's going to happen. This stuff reminds me of blakey ranting about newlines in file names. But not for long, because after a little bit of that I'm right asleep.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
That's future me's problem. Well, no, there's about zero percent chance it's going to happen.
Future me already got that fork stuck in his ass and likes to think about protecting future future me's ass.
-
@darkmatter Trust me, I've got much bigger fish to fry than worrying about boolean columns or null / empty strings if we have to port to a different DB.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
Trust me, I've got much bigger fish to fry than worrying about boolean columns or null / empty strings if we have to port to a different DB.
exactly, that's why i don't want to have to think about them!
future future future me is safe, because we'd never revert back to oracle in a hundred years. it's future future future future me's future son's problem.... which is fine i guess, hell with him.
-
@boomzilla said in Please create a I Hate Microsoft Club too:
I'm not defending a database, I'm attacking you guys!
In Mafia, we call that a "chainsaw defense".
-
@djls45 I'm reminded of the Dirty Dozen, when he makes them all shave with cold water, and they totally bond over that and having him as a common enemy. Most of them, he notes, have probably never shaved with anything but cold water, but now they're incensed.
I get the feeling using empty strings is kind of like that.
-
@darkmatter said in Please create a I Hate Microsoft Club too:
that is drives strong typers crazy or that there's up to 10 possibilities that can be stored in a Number(1).
we used CHAR(1).I used to work somewhere that used SQL Server and used
tinyint
fields for booleans. Not sure when SQL Server addedbit
but it was definitely in by the version we were on when I was there.They couldn't really change the column definitions for a couple of reasons:
- the columns were named in hungarian notation, so the tinyint bools were
tiHasThing
. Changing the names would have been confusing. Not that this stopped them from redefining a VARCHAR(20)sz20Stuff
to a VARCHAR(50) when they needed longer fields - in almost all tables with the tinyints, 1 meant true and 0 meand false. In one column, 1 was false and 0 was true. Nobody remembered why but there were loads of stored procedures referencing it so changing it to be sane would have been a large undertaking
- the columns were named in hungarian notation, so the tinyint bools were
-
I did have a bit of a minor pain point recently related to the empty string / null issue.
As a background, I work almost exclusively with Oracle databases, mainly using Informatica for the heavy lifting. Informatica does distinguish between '' and null but I generally don't have much of a problem with it because I don't have '' in most of my source data (being mainly from Oracle tables).
In this case, I'm loading data which arrives in XML form to a bunch of Oracle tables. Some of the data is in the form of addresses, which all get put into a common table after deduplication. Then when I load the other tables, wherever there's an address I look up the address details in the address table to get the generated ID for that address so I can populate the appropriate foreign key field.
The problem is that if there's an empty field in the address XML, it gets converted to an empty string. When that is stored in the database, it gets stored as a NULL because it's Oracle. And then the lookup fails because Informatica distinguishes between an empty string and NULL.
So now, instead of just saying the equivalent of (actually with more fields than this)
lookup_address(field1, field2, ..., field10)
I have to do
lookup_address(IF(field1='', NULL, field1), IF(field2='', NULL, field2), ..., IF(field10='', NULL, field10))
every time I want to look up an address. I can't do it in the lookup query (i.e. fix it in one place), because there is nothing I can return from an Oracle database that will match an empty string.I could still fix this in one place by creating a user-defined function in Informatica to accept the original fields, do the munging, and call the lookup, but UDFs in Informatica are a bit of a pain.
ETA: There's also at least one IF in there that converts a boolean to 'Y' or 'N', because yes, Oracle doesn't have those either :)
-
@Jaloopa said in Please create a I Hate Microsoft Club too:
1 was false and 0 was true
the column probably had a negative or negative sounding name?
tiNotNotNotIt
Even on boolean/bit fields it is maddening when the creator names it with a negative.
-
@darkmatter said in Please create a I Hate Microsoft Club too:
Even on boolean/bit fields it is maddening when the creator names it with a negative.
I think we've got a coding standard against them. Negative names on boolean variables/settings lead to double negatives in code statements, which makes for confusing code, which is more prone to bugs.
-
@darkmatter said in Please create a I Hate Microsoft Club too:
@darkmatter last week we needed to check for the groupings on a set of items that had been added. Some of them are in no group, which is
''
. Some of them are in groups, say'Test Set'
Some of them had not yet been added by the users on the other system, which meant their group wasNULL
. We needed to find the ones that had not been set up yet - hence, searching forNULL
. In Oracle we'd have kept getting the''
empty groups showing up as having not been set up yet, unless they want to add a meaningless'THIS ITEM HAS NO F`IN GROUP'
to the data.So you're abusing strings to do something that should be done with a one-to-many JOIN, (or an array-typed column, if you're in a SQL version that supports them,) and it's the string's fault?
-
@Jaloopa said in Please create a I Hate Microsoft Club too:
.net has one built in.
String.IsNullOrEmpty()
...because in practice, they're synonymous, and it's obnoxious having to check for both, so they combined them into a single call. (Why they did that, rather than keep to Delphi's convention of the empty string being a NULL, when it was written by the architect of Delphi and borrowed so many other concepts from Delphi, is beyond me.)
-
@masonwheeler said in Please create a I Hate Microsoft Club too:
Why they did that, rather than keep to Delphi's convention of the empty string being a NULL, when it was written by the architect of Delphi and borrowed so many other concepts from Delphi, is beyond me.
They obviously realized their mistake.
-
@masonwheeler sorry, data warehouses are not normalized that way by design. Your answer doesn't apply to my situation.
-
Why @Dan-Howard , why one for Google? Google is DO NO EVIL. They even wiped away my personal data, when I sent them request. Also you are missing I hate Facebook, but I can't stay away from it CLUB.
-
@nagesh welcome back!
-
-
@dan-howard said in Please create a I Hate Microsoft Club too:
Please create a I Hate Microsoft Club too. They deserve as much hate as Oracle. How about an Apple and Google one too?
There are server space limitations.
-
@tharpa said in Please create a I Hate Microsoft Club too:
@dan-howard said in Please create a I Hate Microsoft Club too:
Please create a I Hate Microsoft Club too. They deserve as much hate as Oracle. How about an Apple and Google one too?
There are server space limitations.
This is a subtle joke that need explanation!
- Too many microsoft haters will fill up forum with their posts of how dog ate homework!
-
@Nagesh said in Please create a I Hate Microsoft Club too:
This is a subtle joke that need explanation!
Everything a subtle joke until the explanation!
-
@Tsaukpaetra said in Please create a I Hate Microsoft Club too:
@Nagesh said in Please create a I Hate Microsoft Club too:
This is a subtle joke that need explanation!
Everything a subtle joke until the explanation!
Some jokes are as subtle as a baseball bat in the face. Like the one @Nagesh quoted.