• Donald (unregistered)

    Bosses ask us to "just add a button" ... but it's NEVER that simple is it?

  • Kyle Z. (unregistered)

    FIRST TIME THE SECOND!

  • assi (unregistered) in reply to Donald

    Boss and "just/simple" in one sentence?

    -> Problem!

  • (cs)

    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Addendum (2011-02-16 09:45): For the dense, this is satire.

  • (cs) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Die Frits!

  • Ken B. (unregistered) in reply to Donald
    Donald:
    Bosses ask us to "just add a button" ... but it's NEVER that simple is it?
    I've learned over the years that the shorter the description, the harder it is to implement.

    Take, for example, the simple two-word request "ODBC support".

  • XXXXX (unregistered)
    Var Report Set = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
    Var comment =    [00000000000000000000001000] +
                     [00000000000000000001000000] +
                     [00000100000000000000000000]
    
  • Jayson B (unregistered) in reply to Ken B.
    Ken B.:
    Take, for example, the simple two-word request "ODBC support".

    Yeah, we had to add that "simple" request years ago. Now we are having to go back to add "direct SQL support" as well...

  • (cs) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    No, no, NO! You have to make sure the string is....wait for it... UNICODE!!!

  • (cs) in reply to Smitty
    Smitty:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Die Frits!

    How did you know that's how I refer to myself?

    Die Frits says "Stay in school!". Die Frits says "Brush your teeth!". Die Frits says "Tuck in your shirt!".

    You get the idea.

  • boog (unregistered)

    I'm pretty sure I would have strangled the penguin by case 4.

  • (cs)

    I work with Cognos. I beat your WTF by default...

  • Larry (unregistered) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!
    TRWTF is that you can't come up with a better way to do it.
  • Rootbeer (unregistered)

    This is terrible design, yes, but how is it hard to implement the change request?

    Find the id of the report to be changed, and the index of the column to be added. Go to the appropriate place in the array-string and change the '0' to a '1'. Done. Maybe.

  • (cs)

    You fools. Who writes queries for reports anymore?

  • Bobbo (unregistered) in reply to boog
    boog:
    I'm pretty sure I would have strangled the penguin by case 4.

    Is that like choking the chicken?

    In which case, I made it as far as case 2.

  • Bill's Kid (unregistered) in reply to frits
    frits:
    Smitty:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Die Frits!

    How did you know that's how I refer to myself?

    Die Frits says "Stay in school!". Die Frits says "Brush your teeth!". Die Frits says "Tuck in your shirt!".

    You get the idea.

    Wouldn't "Die Frits" say "Aufenthalt in der Schule"?

  • Some overworked SysAdmin (unregistered) in reply to steenbergh
    steenbergh:
    I work with Cognos. I beat your WTF by default...

    +1

    But at least I can laugh at how ridiculous the SQLs it generates and the subsequent explain plans are.

    iusto - verb; Iusto go to the gym, but now I'm just fat

  • Radium (unregistered) in reply to Rootbeer
    Rootbeer:
    This is terrible design, yes, but how is it hard to implement the change request?

    Find the id of the report to be changed, and the index of the column to be added. Go to the appropriate place in the array-string and change the '0' to a '1'. Done. Maybe.

    How is this a terrible design? I can't discern a pattern. There probably isn't one, because the configuration of the columns to display isn't dependent on a mathematical equation.
  • (cs) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Addendum (2011-02-16 09:45): For the dense, this is satire.

    Wait, you can edit your own posts? I registered an account to see if this is true.

    Addendum (2011-02-16 09:58) Yup.

  • The Nerve (unregistered)

    An obvious solution would be to create an array with all 36893488147419103232 possible permutations of the columns displayed and a map that maps from the report number to its index in the array. If you want to add a column, recompute the data index and retrieve that string (prepending it first with a '-').

  • (cs) in reply to The Nerve
    The Nerve:
    An obvious solution would be to create an array with all 36893488147419103232 possible permutations of the columns displayed and a map that maps from the report number to its index in the array. If you want to add a column, recompute the data index and retrieve that string (prepending it first with a '-').

    That sounds like a great idea... if you're working your two-week notice, and really, really wanted to be mean to the other developers.

    As an aside, I'd really hate to see the file size, and load time (for whatever IDE), that the report file would require.

  • (cs) in reply to Rootbeer
    Rootbeer:
    This is terrible design, yes, but how is it hard to implement the change request?

    Find the id of the report to be changed, and the index of the column to be added. Go to the appropriate place in the array-string and change the '0' to a '1'. Done. Maybe.

    By the looks of it, if you wanted to add a column you would need to make the same change to all 32 strings. And try injecting a column at, let's say, position 23. Might take less time to just rewrite it.

  • confused (unregistered)

    Just wrap that baby in a for loop and it'll be perfect!

  • tristique (unregistered) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Addendum (2011-02-16 09:45): For the dense, this is satire.

    Yes, and for everyone else, it's simply nonsense.

  • Nagesh (unregistered)

    This is preferred way to do this in CMS shop.

  • frits (unregistered) in reply to Bobbo
    Bobbo:
    boog:
    I'm pretty sure I would have strangled the penguin by case 4.

    Is that like choking the chicken?

    In which case, I made it as far as case 2.

    Are you at work? If so, I'm pretty sure you could get fired for this.

    Your not too bright, are you?

  • (cs) in reply to frits
    frits:
    Are you at work? If so, I'm pretty sure you could get fired for this.

    Depends where he works. How do you know he doesn't own his own chain of clothing stores?

  • KDN (unregistered) in reply to tristique
    tristique:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Addendum (2011-02-16 09:45): For the dense, this is satire.

    Yes, and for everyone else, it's simply nonsense.

    I think someone's booty hurts.

  • wito (unregistered)

    I would never have written code like that. I would use a script to write it for me.

    captcha: laoreet

  • Michael (unregistered) in reply to Donald
    Donald:
    Bosses ask us to "just add a button" ... but it's NEVER that simple is it?
    I have banned the term "just" in the office. Everyone who uses it outside his/her domain has to contribute to the summer part fund. works rather well!! Same applies for: quick, easy, simple etc...
  • (cs) in reply to frits
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Addendum (2011-02-16 09:45): For the dense, this is satire.

    For the super-dense: this is VB, and VB stores internal strings in Unicode. So you don't even save the space.

  • frits (unregistered) in reply to Nagesh
    Nagesh:
    This is preferred way to do this in CMS shop.
    Your not the real Nagesh. We want the real Nagesh!
  • Stanley (unregistered) in reply to Michael
    Michael:
    Donald:
    Bosses ask us to "just add a button" ... but it's NEVER that simple is it?
    I have banned the term "just" in the office. Everyone who uses it outside his/her domain has to contribute to the summer part fund. works rather well!! Same applies for: quick, easy, simple etc...
    Is your last name "Scott?"
  • Bobbo (unregistered) in reply to frits
    frits:
    Bobbo:
    boog:
    I'm pretty sure I would have strangled the penguin by case 4.

    Is that like choking the chicken?

    In which case, I made it as far as case 2.

    Are you at work? If so, I'm pretty sure you could get fired for this.

    Your not too bright, are you?

    Yes I'm at work, but I own a chain of clothing stores so it's ok. This is actually company policy.

  • (cs) in reply to belgariontheking
    belgariontheking:
    You fools. Who writes queries for reports anymore?
    Yeah, my reports are entirely populated by rand(). It's not like anyone's reading them anyway.
  • backForMore (unregistered) in reply to steenbergh
    steenbergh:
    I work with Cognos. I beat your WTF by default...

    I have worked with Cognos and Kronos, so WTF^2.

  • (cs) in reply to Nagesh
    Nagesh:
    This is preferred way to do this in CMS shop.
    Nice!
  • (cs) in reply to frits
    frits (unregisted):
    Nagesh (unregistered):
    This is preferred way to do this in CMS shop.
    Your not the real Nagesh. We want the real Nagesh!
    The comedy here is so sweet, I think I'll be skipping lunch today.
  • (cs) in reply to Larry
    Larry:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!
    TRWTF is that you can't come up with a better way to do it.
    At first, I didn't get your schtick. Now I do though. Bravo, and carry on...
  • (cs) in reply to Larry
    Larry:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!
    TRWTF is that you can't come up with a better way to do it.

    OK, Larry. It's hard to improve on such high-level technique. However, if I could change one thing it would be that I store those strings in a plain text file so future enhancements could be made without recompiling the code. Or maybe a tab-delimited file, so they could use Excel...

    Happy now?

  • (cs) in reply to boog
    boog (cheap imitation):
    I'm pretty sure I would have strangled the penguin by case 4.
    You're relatively tolerant if you make it past case 1, my clueless counterfeit.
  • minime (unregistered) in reply to frits
    frits:
    Bobbo:
    boog:
    I'm pretty sure I would have strangled the penguin by case 4.

    Is that like choking the chicken?

    In which case, I made it as far as case 2.

    Are you at work? If so, I'm pretty sure you could get fired for this.

    Your not too bright, are you?

    fired for what? reading thedwtf? then you are not at work?

  • not trwtf (unregistered) in reply to Bobbo
    Bobbo:
    boog:
    I'm pretty sure I would have strangled the penguin by case 4.

    Is that like choking the chicken?

    I pretty sure every comment fake boog makes is a euphemism for masturbation.

  • (cs)

    At least all of the reports are defined in one place, making it easier for Brian H to find the code he needs to change.

    You can't put a price on that.

  • airdrik (unregistered)

    This needs to be more enterprizy! They need to use xml and store it in the database!

    select columnXML from reportColumns
    

    yields:

    <ReportColumns>
    	<Columns reportID="1">-,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1</Columns>
    	<Columns reportID="2">-,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1</Columns>
    	<Columns reportID="3">-,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0</Columns>
    	<Columns reportID="4">-,1,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0</Columns>
    	<Columns reportID="5">-,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,0,1,1,0,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</Columns>
    	...
    	<Columns reportID="31">-,1,1,1,0,1,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</Columns>
    	<Columns reportID="0" blnRunReport=false>-,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</Columns>
    </ReportColumns>
    

    Now you don't need to rebuild and deploy in order to change the columns on a report, you just need to change it in the database.

  • by (unregistered) in reply to frits
    frits:
    Larry:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!
    TRWTF is that you can't come up with a better way to do it.

    OK, Larry. It's hard to improve on such high-level technique. However, if I could change one thing it would be that I store those strings in a plain text file so future enhancements could be made without recompiling the code. Or maybe a tab-delimited file, so they could use Excel...

    Happy now?

    Nope, there is no for loop, or maybe a while(true), and the lack of a wooden table with OCR is simply offensive.

  • trtrwtf (unregistered) in reply to Smitty
    Smitty:
    frits:
    C'mon people. This is actually a fairly clever and elegant data compression technique. You see, booleans often take up 32 bits of data storage. In this case, they only need 16 bits- 8 bits for the character, and 8 bits for the comma. Additionally, this is quite an ingenious way of representing a nullable boolean by using the "-" chanracter to represent the unused columns. A++ to this obviously talented developer!

    Die Frits!

    Unless there's something Frits isn't telling us, that would be "Der Frits!"

    (Du bist nicht so klug, oder?)

  • (cs) in reply to airdrik
    airdrik:
    This needs to be more enterprizy! They need to use xml and store it in the database!
    Grasshopper, your understanding of enterprise-grade XML is somewhat lacking. Where are the schemas? Where are the DTDs? Where is the part where you set the types of rows to different values to indicate whether or not the particular report is to be generated?
  • Nagesh (unregistered) in reply to Bobbo
    Bobbo:
    frits:
    Bobbo:
    boog:
    I'm pretty sure I would have strangled the penguin by case 4.

    Is that like choking the chicken?

    In which case, I made it as far as case 2.

    Are you at work? If so, I'm pretty sure you could get fired for this.

    Your not too bright, are you?

    Yes I'm at work, but I own a chain of clothing stores so it's ok. This is actually company policy.

    In Hyderabad, it is similar. At newstand, (which also sells clothes), you can buy fresh chicken made while you wait. This is great delicacy, as chickens cannot be frozen with power outages happening. In fact, I am eating chicken pita as I write this in internet cafe.

Leave a comment on “Adding a Column”

Log In or post as a guest

Replying to comment #337940:

« Return to Article