• Anon (unregistered)

    "No comments have been added yet."

    i feel special

  • Neener (unregistered)

    Boing! I hate akismet!

  • (cs)

    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).

  • Axe (unregistered)

    You seem to have a fundamental misunderstanding, first post must contain 'frist'

  • (cs)

    What Sal didn't tell you was that there was another element in the table:

    Total_Height_SQFT NVARCHAR(50) NOT NULL

    See, it's actually very clever...

  • sotian (unregistered)

    TWTF not using Metric

  • 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.

  • steve (unregistered)

    predecessor or colleague?

  • Ack (unregistered)

    Damn, to make long enough to even figure out what SQFT meant. Silly imperial measures....

  • (cs)

    Should obviously be Total_Length_NEWTON_SQ_SEC_PER_KILO NVARCHAR(50) NOT NULL

  • Anonymous (unregistered)

    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?

  • (cs)
    article:
    Total_Length_SQFT NVARCHAR(50) NOT NULL

    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...

  • nonA (unregistered)

    Surely TRWTF is the NOT NULL constraint.

  • (cs)

    Tell this retard to do us all a favor and never touch an RDBMS again.

  • keith (unregistered)

    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.

  • (cs) in reply to snoofle
    snoofle:
    article:
    Total_Length_SQFT NVARCHAR(50) NOT NULL

    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...

    Which reporting technology doesn't support calculated report fields? Even if you roll your own...
  • Eric (unregistered)

    I almost bet if you looked at the values in that column you'd see: '14.236m^2' '12 acres' '1,567 square inches' ...

  • Bob (unregistered) in reply to keith

    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

  • Edosoft (unregistered)

    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

  • kikito (unregistered)

    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.

  • backForMore (unregistered)

    All your units of measurement are belong to us.

  • blarg (unregistered) in reply to JamesQMurphy
    JamesQMurphy:
    I don't know what's worse... the fact that it's called total length in SQFT (square feet)

    thanks for explaining the WTF for us. <--- ASKIMET, THIS IS NOT SPAM

  • (cs) in reply to backForMore
    backForMore:
    All your units of measurement are belong to us.
    I like that.
  • (cs) in reply to Anon
    Anon:
    "No comments have been added yet."

    i feel special

    "Special" as in "school", yes.

  • (cs) in reply to sotian
    sotian:
    TWTF not using Metric
    Right, because multiplication by a constant is too difficult.

    Oh wait, you do that in metric, too.

  • golddog (unregistered)

    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.

  • golddog (unregistered) in reply to golddog
    golddog:
    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.

    Or varchar. Ugh.

  • hartmut (unregistered)

    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? ;)

  • (cs) in reply to sotian
    sotian:
    TWTF not using Metric

    What makes you so sure that "Total_Length_SQFT" entries are not in meters (or m^2)?

  • vtcodger (unregistered)

    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.

  • (cs)

    This lousy predecessor lead to R.A. Salvatore quitting his job and to become a lousy book author -> Dilbert principle fullfilled.

  • QJ (unregistered)

    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.

  • (cs)

    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.

  • Will Noob (unregistered) in reply to hoodaticus

    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.

  • (cs) in reply to the script kiddie
    the script kiddie:
    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.
    But I thought power/time = energy...
  • hottwaj (unregistered)

    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?

  • (cs) in reply to the script kiddie
    the script kiddie:
    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.

    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.

  • metric (unregistered) in reply to hoodaticus
    hoodaticus:
    sotian:
    TWTF not using Metric
    Right, because multiplication by a constant is too difficult.

    Oh wait, you do that in metric, too.

    How many square feet is a square mile?

    How many square meters is a square kilometer?

    I think that settles it.

  • Michael (unregistered)

    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."

  • XXXXX (unregistered) in reply to RichP

    Clearly because they are measured in hertz-seconds

  • (cs) in reply to metric
    metric:
    hoodaticus:
    sotian:
    TWTF not using Metric
    Right, because multiplication by a constant is too difficult.

    Oh wait, you do that in metric, too.

    How many square feet is a square mile?

    How many square meters is a square kilometer?

    I think that settles it.

    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.

  • (cs) in reply to kikito
    kikito:
    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.

    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.

  • Anon (unregistered) in reply to JamesQMurphy
    JamesQMurphy:
    or that it's using VARCHAR(50).

    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.

  • (cs) in reply to golddog
    golddog:
    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.

    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.

  • AP² (unregistered) in reply to hoodaticus
    hoodaticus:
    the script kiddie:
    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.
    But I thought power/time = energy...
    [image] http://www.appropedia.org/Power_and_energy_basics#Energy_.3D_Power_x_
  • (cs)

    Alex, you left out the part where Salvatore dug a little further and discovered that yes, the column also represents length sometimes.

  • (cs) in reply to AP²
    AP²:
    hoodaticus:
    the script kiddie:
    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.
    But I thought power/time = energy...
    [image] http://www.appropedia.org/Power_and_energy_basics#Energy_.3D_Power_x_
    Can't it be both? And you're right, I had energy and power backwards.
  • (cs) in reply to hoodaticus
    hoodaticus:
    metric:
    How many square feet is a square mile?

    How many square meters is a square kilometer?

    I think that settles it.

    It settles nothing - you still multiply by a constant and then square it. The only difference is the constant.
    Yes, but if "multiplication" only involves moving a decimal point back and forth, any moron can do it.

  • Two Deep (unregistered) in reply to Will Noob
    Will Noob:
    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.

    I shudder to think of how CS would be integrated with FaceBook ...

  • Me (unregistered)

    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.

Leave a comment on “Fundamental Misunderstanding”

Log In or post as a guest

Replying to comment #342561:

« Return to Article