|
This is a warning.
If you are currently happy with your life do not continue reading.
I cannot guarantee you will ever be happy, find love, see beauty or sleep at night again after reading this.
So, don't say I didn't warn you.
One shop I worked at, that used SQL Server 2005 and up with VB.NET 2.0 and up, did not use the BIT data type, nor did they use a numeric type with 0 and 1.
Instead, they used the MBoolean, M being the first letter of the company name.
The MBoolean was a CHAR(1). Now you might expect it to be Y or N.
It wasn't.
It could actually have the values J and N, from the Dutch Ja (yes) and Nee (no).
The worst part was that they often didn't even bother to cast J/N to a regular boolean (not even in .NET), the code was littered with If something = "J" Then...
Because doing things in Dutch is so much easier when finding help on the internet.
Not even the Dutch people understood the J/N boolean
The reason for the J/N had something to do with Clipper, Visual Basic (pre-.NET) and dBase all handling booleans differently.
|
|
|
|
|
Sander Rossel wrote: So, don't say I didn't warn you.
And yet, I read it....
Maybe they could get a job at SAP?
Jeremy Falcon
|
|
|
|
|
Actually, a byte for a character and a bit are frequently implemented the same: takes one bit of the eight for the value and ignores the other seven. An int would be four bytes; short int could be as small as two. So just about anyway you cut it, Y/N isn't that bad of choice. It is even self documenting!
|
|
|
|
|
Jeremy Falcon wrote: From this one table alone I can see 3 problems at least... archaic naming convention, using text fields for boolean logic, and not using an ENUM field or lookup table where appropriate
archaic naming convention: it amazes me people see another's naming/coding style and label that as bad/problem, it's not an issue - what next, pick on people who have different skin color?
using text fields for boolean: as others pointed out bool is not ISO, so not portable. SAP can use different underlying databases, and supports older DB versions of even those vendors that have those features.
and not using an ENUM field or lookup table: well this is just a combination of the above two points.
So no, your arguments that their code is bad is just simply 100% wrong.
And so you think could do it better: will it work when rolled out to thousands of live enterprise sites, some of which have older systems/databases... THIS is why SAP make so much money (and they also don't employ bragging know-it-all smart asses like yourself because you don't get it.)
Sin tack ear lol
Pressing the any key may be continuate
|
|
|
|
|
Try your pretty little online argument crap with someone less experienced and stop wasting my time. It may work on those that know no better.
And while we are at it, you use too many commas. What's next, you're a child killer?
Jeremy Falcon
|
|
|
|
|
LOL. Just keep on believing that.
SAP is making billions, you're not!
Sin tack ear lol
Pressing the any key may be continuate
|
|
|
|
|
And neither are you. So you just invalidated your own post as well.
Jeremy Falcon
|
|
|
|
|
Add PeopleSoft to that list.
To be fair, both companies are trying to build an application that streamlines business. The only problem is that every business has different thoughts on how things should be done. SAP is German over-engineered and removes a lot of flexibility from the user side of things to get things done quickly, especially from a user standpoint. Accountants love it though because it makes their job so much easier.
|
|
|
|
|
SAP gets into a company through the management board (CEO/CIO). Non technical people worried about their seat in the company - not the company itself. Their goal is to implement a system that will work - they won't take riscs with new IT companies/technologies. If the projects fails they loose their pretty seat in the company... With SAP they cannot go wrong. It'll work eventually, slow & expensive, but it'll work and they'll keep their seat.
After the implementation the saying is that everything works great, because nobody has the guts to admit that they spend X miliions for a piece of crap..
|
|
|
|
|
You sir, hit the nail on the head.
Jeremy Falcon
|
|
|
|
|
So to sum it all up it sounds like we have the perception that exorbitant cost of product should equal better coding standards or at least an upgrade to better technology. What's new?
I am curious about one aspect though... there was mention of poor referential integrity. Are you saying that there is actually misshapen data like, for instance, orphaned records or data points stored in the wrong fields or invalid values (i.e. an invalid enum value)?
That would be more alarming.
|
|
|
|
|
When I was a lot newer to programming and databases, I once wrote an application that maintained the referential integrity through the code. If I knew then what I know now
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
I unfortunately work with a legacy system that was written without FKs. The amount of crap data in this DB is enough to make angels cry. This is why I was curious.
It's the classic thinking that you only need to write a DB for the front end's needs without considering that other systems may one day interact with it with their own idiosyncrasies (forget about devs going in and mussing things up directly in the tables).
|
|
|
|
|
Ed Bouras wrote: So to sum it all up it sounds like we have the perception that exorbitant cost of product should equal better coding standards or at least an upgrade to better technology. What's new? Touché!
Ed Bouras wrote: I am curious about one aspect though... there was mention of poor referential integrity. Are you saying that there is actually misshapen data like, for instance, orphaned records or data points stored in the wrong fields or invalid values (i.e. an invalid enum value)?
None that I've noticed yet. So I assume (hope) SAP helps enforce it, but there are no such foreign keys in the DB to help enforce it.
Ed Bouras wrote: That would be more alarming.
Finally, someone with experience talking. You're correct. Seeing the lack of foreign keys was what started this whole jaw dropping thing actually. It just went from there.
Jeremy Falcon
|
|
|
|
|
We tell a joke about SAP.
We know many companies who have started migrating to SAP.
A few who have given up,
and NONE who have completed the migration yet!
We finish with...
Rumor has it, SAP is almost COMPLETELY on SAP now!
|
|
|
|
|
Jeremy Falcon
|
|
|
|
|
You're not the customer. What I've learned the hard way is that business doesn't care that if it's coded well, that's not their problem. What they care about is whether the software helps them solve a problem and ultimately whether it saves or makes them money. It's our job to convince them that good code saves and makes them money!
Idaho Edokpayi
|
|
|
|
|
You are correct sir. It just took me for a surprise after being exposed to it is all. I totally agree with you however.
Jeremy Falcon
|
|
|
|
|
appropriately named SAP because it's for saps
|
|
|
|
|
Jeremy Falcon
|
|
|
|
|
|
Jeremy Falcon
|
|
|
|
|
Some believe that SAP was Germany's revenge for losing the was (WWII). See this [^]
|
|
|
|
|
|
It also amazes me that Citrix got installed in so many places - must be the CEO who bought it on the basis of "zero admin costs" and "reducing PC estate" claims....
Every infrastructure team I've ever spoke to about it HATE it and spend more time supporting it than they ever did with proper PC desktops....
|
|
|
|