| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |
|
"No comments have been added yet."
i feel special |
|
Boing! I hate akismet!
|
|
I don't know what's worse... the fact that it's called total length in SQFT (square feet), or that it's using VARCHAR(50).
|
|
You seem to have a fundamental misunderstanding, first post must contain 'frist'
|
|
What Sal didn't tell you was that there was another element in the table:
See, it's actually very clever... |
|
TWTF not using Metric
|
Re: Fundamental Misunderstanding
2011-03-30 09:12
•
by
the script kiddie
(unregistered)
|
|
pet hate of mine, people getting units dimensionally wrong. especially when people quote energy usage in KW/h . That one, especially, makes me cry on the inside.
|
|
predecessor or colleague?
|
|
Damn, to make long enough to even figure out what SQFT meant. Silly imperial measures....
|
|
Should obviously be
Total_Length_NEWTON_SQ_SEC_PER_KILO NVARCHAR(50) NOT NULL |
|
Length... in square feet? 50 characters? Alphabetic characters allowed? I'm sure there's a "future proofing" joke here somewhere but damn, what sort of bizarre future is this guy proofing for?
|
Without context here, this is stretching to justify it, but there's a miniscule chance it might be something like a precalculated string for simplified subsequent reporting (i.e. "The computed length of feet-squared = nnn")... Of course, it's more likely exactly as it seems at first glance... |
|
Surely TRWTF is the NOT NULL constraint.
|
|
Tell this retard to do us all a favor and never touch an RDBMS again.
|
|
Charitably, maybe it describes objects that are uniformly one foot wide like classroom rulers or rolls of paper towels, so the length in feet is the same numeral as the area in square feet.
|
Re: Fundamental Misunderstanding
2011-03-30 09:27
•
by
hoodaticus
|
Which reporting technology doesn't support calculated report fields? Even if you roll your own... |
|
I almost bet if you looked at the values in that column you'd see:
'14.236m^2' '12 acres' '1,567 square inches' ... |
Re: Fundamental Misunderstanding
2011-03-30 09:34
•
by
Bob
(unregistered)
|
|
I was thinking something similar.
Brilliantly, his code copes with all your examples even without the uniform 1ft restriction because he can specify 2PI4ftSQUARED or 6x12x1inches |
|
Not only is it a VARCHAR its an N varchar, so it can hold all unicode variants of.... a length or a square of feet or something
|
|
That is nothing.
Near the end of my big-corporate working life, I once found a database field called "Money". A VARCHAR, of course. Depending on the record, it would hold: * Currency names - Like "Euro", or "Dollar" (apparently "USD" was not clear enough). * Slight variations of currency names: "Eur", "eur", "euros". * Numbers - "112", "220". * City names: "London", "Paris" * Localized city names: "Londres". That field is just an example; the whole "database" was built with the same prowess. It was an Access database, of course. The 3-month work product of a "database expert". He was called (no joke) "Scooby Doo" by his project manager. On his face. It took me 4 days to understand the requirements and build an equivalent excel-based solution using 4 sheets. Well, it wasn't really equivalent; my solution actually worked. Not much later, I was "let go" from that company. Scooby Doo is still there. Apparently he's someone important's nephew. A group of Project Managers have agreed to rotate him from project to project, so the cost is shared among all. |
Re: Fundamental Misunderstanding
2011-03-30 09:46
•
by
backForMore
(unregistered)
|
|
All your units of measurement are belong to us.
|
Re: Fundamental Misunderstanding
2011-03-30 09:46
•
by
blarg
(unregistered)
|
thanks for explaining the WTF for us. <--- ASKIMET, THIS IS NOT SPAM |
Re: Fundamental Misunderstanding
2011-03-30 09:48
•
by
hoodaticus
|
I like that. |
Re: Fundamental Misunderstanding
2011-03-30 09:49
•
by
bertram
|
"Special" as in "school", yes. |
Re: Fundamental Misunderstanding
2011-03-30 09:49
•
by
hoodaticus
|
Right, because multiplication by a constant is too difficult. Oh wait, you do that in metric, too. |
|
Maybe in some n-dimensional space (n > 4), what we think of as a two-dimensional measure gets folded down to a single dimension?
OK, probably not. On a related note, the chimps that originally built our database defined household number as verchar throughout the database. Then built a function used when inserting a new record which determines the new value by taking the max currently in the table, converting it to int and adding one. Sigh. |
Re: Fundamental Misunderstanding
2011-03-30 09:51
•
by
golddog
(unregistered)
|
Or varchar. Ugh. |
|
My favorite SQL field definition:
some_flag VARCHAR2(1) NOT NULL; for a boolean field in an MS Access -> Oracle migration project. As with most Microsoft products true false is zero and true is -1 (signed integer, all bits set) we ended up with '0' for false and '-' for true after the original Access data was imported. (Do i need to mention that the person who did the schema design and import was the only certified MCSE on the project? ;) |
What makes you so sure that "Total_Length_SQFT" entries are not in meters (or m^2)? |
|
At a guess, this might be a business practice issue. My immediate thought would be that it could have started out as a sort of GIRTH+LENGTH measurement such as that used by the USPS to determine if a package is mailable and later morphed into an area -- assuming that it actually is an area and not some other hard to label function of object dimensions.
|
|
This lousy predecessor lead to R.A. Salvatore quitting his job and to become a lousy book author -> Dilbert principle fullfilled.
|
|
Oh you silly people. SQFT is clearly "squirrel-feet". It's a length of 0.75644 inches, based on the original King John Imperial Red Squirrel (originally an Argentinian import, but died out in the 17th century). An important measure in the manufacture of shlocks.
|
|
This reminds me of a database where dates were stored as three TEXT fields. Yes, TEXT (would probably be called CLOB in Oracle), not even VARCHAR.
I shall not be rude to that contractor, because recently (and this is over 10 years later) he did some work for us, and it was actually pretty good. For me to think that something is pretty good, it has to be pretty good indeed. People do learn. |
Re: Fundamental Misunderstanding
2011-03-30 10:14
•
by
Will Noob
(unregistered)
|
|
I also like that. There needs to be a facebook styled "like" button so we can all properly appreciate peoples slight witticisms...you know...because facebook hasn't quite reached every corner of the internet yet.
|
Re: Fundamental Misunderstanding
2011-03-30 10:18
•
by
hoodaticus
|
But I thought power/time = energy... |
|
TRWTF is that he meant to write:
Total_Length_RTSQFT NVARCHAR(50) NOT NULL right? So that it's clear that he can store real, imaginary and complex lengths in his nvarchar for the root of square feet? |
Re: Fundamental Misunderstanding
2011-03-30 10:25
•
by
token_woman
|
You mean KW/h as opposed to KWh? Does this mean I've found an ally in my annoyance at the notation "24/7"? We have customers paying over the odds for 24/7 support. I'd love to take them up on it and support them for roughly 3.4 hours a week. Wednesday afternoons, preferably - I do like a long weekend. |
Re: Fundamental Misunderstanding
2011-03-30 10:25
•
by
metric
(unregistered)
|
How many square feet is a square mile? How many square meters is a square kilometer? I think that settles it. |
|
reminds me of a table in a DB at an investment bank I used to work for with a column "day_of_week" containing values 1 .. 31. askign a colleague, he said:"ah well, we unfortunately named in inappropriately."
|
Re: Fundamental Misunderstanding
2011-03-30 10:33
•
by
XXXXX
(unregistered)
|
|
Clearly because they are measured in hertz-seconds
|
Re: Fundamental Misunderstanding
2011-03-30 10:36
•
by
hoodaticus
|
It settles nothing - you still multiply by a constant and then square it. The only difference is the constant. If this is beyond your grasp, there is little hope for you. |
Re: Fundamental Misunderstanding
2011-03-30 10:36
•
by
ClaudeSuck.de
|
My guess is that you screwed up their database and especially their way of working. That means your clients obviously used to use such a field like a free field where they put things as they liked. It might be correct that referential integrity should be maintained and so on. But sometimes you would like to add a contact to your database without knowing for which company the person works. The same way probably another field in the record indicated how to interpret the value. Sales people can be like that. You probably know the "it used to work like that before", or don't you yet? "Before I could enter << London >> in order to reserve the money for a ticket whatever the cost will be." Draughting a statistical report from these data is, of course, impossible. But that's probably not needed either. |
Re: Fundamental Misunderstanding
2011-03-30 10:36
•
by
Anon
(unregistered)
|
Of course you need to use VARCHAR(50), otherwise how you gonna put in values like "about 25 feet" or "10 feet, give or take a couple of inches". PS: fuck you Akismet. Blah, blah, blah, not spam you moron. |
Re: Fundamental Misunderstanding
2011-03-30 10:40
•
by
ClaudeSuck.de
|
There were two consultants involved: 1 to create the database with varchar as the type (requirement at creation time?). The second one to "fix" the NewValue() problem. |
Re: Fundamental Misunderstanding
2011-03-30 10:41
•
by
AP²
(unregistered)
|
http://www.appropedia.org/Power_and_energy_basics#Energy_.3D_Power_x_ |
|
Alex, you left out the part where Salvatore dug a little further and discovered that yes, the column also represents length sometimes.
|
Re: Fundamental Misunderstanding
2011-03-30 10:47
•
by
hoodaticus
|
Can't it be both? And you're right, I had energy and power backwards. |
Yes, but if "multiplication" only involves moving a decimal point back and forth, any moron can do it. |
Re: Fundamental Misunderstanding
2011-03-30 10:55
•
by
Two Deep
(unregistered)
|
I shudder to think of how CS would be integrated with FaceBook ... |
|
Obviously, he is protecting against SQL injections. Everybody knows that you can't escape a numeric values, and under no circumstances can you enclose it it qoutes.
|
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |