• (cs) in reply to phithe
    Someone:
    Someone Else:

    INSURE is to buy insurance for.

    ENSURE is to make sure of.


    Humor WTF: it was a pun. This was at an insurance company (not an ensurance company)


    Not only that ...

    <pedant>

    Although it's not common, and it's not taught this way any longer (the dogma of "there's no way to ensure breasts like Dolly Parton's" was pounded into me in high school, even though it was wrong...), Merriam-Webster lists "ensure" and "insure" as synonyms.

    </pedant>

    I'd suggest renting a clue and a dictionary.
  • (cs) in reply to baldvin

    baldvin:
    > This is why I counsel my devs not to put their name in the comments...

    This was also my first thought. I googled for him a little bit, and this address came up: http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=20677597

    Now a real WTF: you can't see on that page if that guy is a programmer or not (so you cannot be sure if it is him or not), but in the "Who I'd like to meet" section there is M. Bolton, the same name as in the second comment!!

    Didn't you notice all of the references to the movie Office Space?  Please tell me you've seen the movie (if not you can complete the sentence 'the real WTF is')

  • (cs) in reply to Bus Raker

    How many years went by between the insertion of the div0 and the uncovering of the same?  WTF?

  • (cs) in reply to lucky luke
    lucky luke:
    frosty:
    CodeWhisperer:

    This is why I counsel my devs not to put their name in the comments...


    You do?  I'd encourage them to so that I'd know who needs to be shown the light (i.e. given guidance, not the light outside the building).


    You do? I just use something like CVS and be able to see exactly what everyone did and not rely on a comment to decide who to blame ;)


    It's awfully nice when your developers actually include a comment in their CVS commits.  It's always a bitch when you know an error was introduced in the last month, in file X, but file X has been committed 12 times without a single commit comment in the last month.  Totally makes the 'cvs log' command useless.
  • Jonathan (unregistered) in reply to Bus Raker
    Bus Raker:

    baldvin:
    > This is why I counsel my devs not to put their name in the comments...

    This was also my first thought. I googled for him a little bit, and this address came up: http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=20677597

    Now a real WTF: you can't see on that page if that guy is a programmer or not (so you cannot be sure if it is him or not), but in the "Who I'd like to meet" section there is M. Bolton, the same name as in the second comment!!

    Didn't you notice all of the references to the movie Office Space?  Please tell me you've seen the movie (if not you can complete the sentence 'the real WTF is')



    I hadn't even heard of the film until this comment, let alone watched it (I obviously don't get out enough!)
    In case anyone else out there is in the same situation as me: http://en.wikipedia.org/wiki/Office_Space
  • other (unregistered) in reply to baldvin

    If you look at Michael Bolton's myspace account, you'll see that his username is notalentassclown00.  I think that explains everything.

    http://www.myspace.com/notalentassclown00

  • VGR (unregistered) in reply to marvin_rabbit
    marvin_rabbit:
    Transcript of conversion from June 8, 2003.  In attendance are PHB and M. Bolton.

    PHB:  The users say they keep getting "Overflow Errors".  Can you fix that?

    M. Bolton: ...


    And I can almost envision M. Bolton rubbing his hands together with eager, conniving glee.

    This kind of childishly literal means of evasion of actual design seems to be a strategy commonly favored by neurotic, neophobic "Look, at least it works" types.  In an environment lacking peer reviews, it's almost impossible to stop such behavior.  And the other developers pay the price.
  • (cs) in reply to Sean

    Sean:
    This brings me to something I always wonder about.  What goes through the developer's mind when he or she comes up with this kind of idea?  I can't decide between "This will really wow 'em," or "You know, this is so crazy it just might work!"

    "I'd have gotten away with it, too, if it weren't for you darn kids."

  • bdubz (unregistered) in reply to merreborn
    merreborn:


    It's awfully nice when your developers actually include a comment in their CVS commits.  It's always a bitch when you know an error was introduced in the last month, in file X, but file X has been committed 12 times without a single commit comment in the last month.  Totally makes the 'cvs log' command useless.


    Two things fix that problem:

    1.  CVS trigger to require a commit comment.  This works really well unless your developers just begin using bogus comments (i.e., "laskjdfal"), in which case you can explain to them why they should not do that and then ask them to find employment elsewhere.

    2.  CodeHistorian to find the bug.  It's a neat little utility that helps you do find the source of the problem.  (http://www.codehistorian.com/codehistorian-overview.php).
  • A Futurist (unregistered) in reply to xrT
    xrT:

    i guess they're thinking that one day datatypes will increase in size and the forced overflow error would not error out anymore...thus using the division by zero error..


    Yet they're not thinking far enough ahead.

    Some day, my friends, humanity will learn how to divide by zero.

    And then where will they be?
  • (cs) in reply to VGR

    Anonymous:
    marvin_rabbit:
    Transcript of conversion from June 8, 2003.  In attendance are PHB and M. Bolton.

    PHB:  The users say they keep getting "Overflow Errors".  Can you fix that?

    M. Bolton: ...


    And I can almost envision M. Bolton rubbing his hands together with eager, conniving glee.

    This kind of childishly literal means of evasion of actual design seems to be a strategy commonly favored by neurotic, neophobic "Look, at least it works" types.  In an environment lacking peer reviews, it's almost impossible to stop such behavior.  And the other developers pay the price.

    <FONT color=#ff0000>Bob Slydell: So we just went ahead and fixed the glitch.</FONT>

    <FONT color=#000080>Bill Lumbergh: Great.</FONT>

    <FONT color=#800080>Dom Portwood: So um, Milton has been let go?</FONT>

    <FONT color=#ff0000>Bob Slydell: Well just a second there, professor. We uh, we fixed the *glitch*. So he won't be receiving a paycheck anymore, so it will just work itself out naturally. </FONT>

    <FONT color=#a52a2a>Bob Porter: We always like to avoid confrontation, whenever possible. Problem solved from your end.</FONT>

    http://www.angelfire.com/oh/quotations/movies/o/officespace.html

  • (cs) in reply to A Futurist
    Anonymous:

    Yet they're not thinking far enough ahead.

    Some day, my friends, humanity will learn how to divide by zero.

    And then where will they be?


    I'm not sure whether this advance would be much appreciated.  As a German soccer coach once said: "I could walk on water and people would complain that I can't even swim."

  • Anonymous (unregistered) in reply to enterprise biziclop
    marvin_rabbit:

    v_divzero := v_divzero / 0.00000000000000000000000000000000000001;


    Shouldn't that produce a "Division by Very Null" error instead...? 

    Anonymous:


    Thank you, Bruce Dickinson...


  • (cs) in reply to Kevan
    Anonymous:
    That's why I love that the Toroise SVN plug in names the compare with earlier version function "Blame"
    Blame is actually the standard SVN command and you can also use it under the aliases "praise", "annotate" and "ann" (try it out in command line, all 4 display the help file for svn blame)
  • Cooney (unregistered) in reply to bdubz

    1.  CVS trigger to require a commit comment.  This works really well unless your developers just begin using bogus comments (i.e., "laskjdfal"), in which case you can explain to them why they should not do that and then ask them to find employment elsewhere.


    works for me. You can also back out commits with fake comments, or else require that they be fixed before they get commit privs back.  
  • (cs) in reply to Colin McGuigan

    <font size="1"><font size="3">Needless to say, Initech's expertise is not in Oracle, so I tried to anticipate where they were going with the code. For clarity, I left out some production-class stuff like PL/SQL exception handlers, which is what they should have been looking at for the original code:
    </font>
    </font><font face="Courier New" size="1">CREATE OR REPLACE PACKAGE credt_union_exceptions IS
       c_money_overflow_limit CONSTANT PLS_INTEGER := 3;
       c_overflow CONSTANT PLS_INTEGER := -22053;
       c_zero_divide CONSTANT PLS_INTEGER := -1476;
       x_overflow EXCEPTION;
       PRAGMA EXCEPTION_INIT(x_overflow,-22053);
       PROCEDURE handle(
          p_value IN OUT NUMBER,
          p_sql_code IN NUMBER,
          p_sql_errm IN VARCHAR2);
    END credt_union_exceptions;
    /
    SHO ERR PACKAGE credt_union_exceptions

    CREATE OR REPLACE PACKAGE BODY credt_union_exceptions IS
       --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==
       -- Parameters:     NONE                                                                       ==
       -- Purpose:        FORCE END OF STORED PROCEDURE                                              ==
       -- Interval:       Called From Other Programs.                                                ==
       -- Tables:         NONE                                                                       ==
       -- Sub Programs:   NONE                                                                       ==
       -- Author:         S. Nagheenanajar                                                           ==
       -- Create Date:    2002-10-08                                                                 ==
       -- Revisions:                                                                                 ==
       --   Author                    Date       Description                                         ==
       --   ------------------------- ---------- -------------------------------------------------   ==
       --   M. Bolton                 2003-06-09 Changed to DIV0 error instead of overflow error     ==
       --   P. Gibbons                2006-05-22 Subsumed into general exception handler             ==
       --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==
       FUNCTION overflow (p_value IN OUT NUMBER) RETURN NUMBER IS
          v_new_value NUMBER := TRUNC(p_value,c_money_overflow_limit);
          v_overflow NUMBER := p_value-v_new_value;
       BEGIN
          -- really underrated movie, actually
          UPDATE cu_balances SET
             balance = balance + v_overflow
          WHERE account_id = 99238468;
          COMMIT;
          RETURN v_new_value;
       END overflow;

       PROCEDURE handle(
          p_value IN OUT NUMBER,
          p_sql_code IN NUMBER,
          p_sql_errm IN VARCHAR2) IS
       BEGIN
          CASE p_sql_code
             WHEN c_overflow THEN
                p_value := overflow(p_value);
             WHEN c_zero_divide THEN
                p_value := 0;
             ELSE RAISE_APPLICATION_ERROR(-20000,p_sql_errm);
          END CASE;
       END handle;
    END credt_union_exceptions;
    /
    SHO ERR PACKAGE BODY credt_union_exceptions
    </font><font size="1">
    </font>

  • Lurker 666 (unregistered)

    And I thought the real WTF was that SQL Server doesn't allow the use of RaIsError (The Sun God boo boo.  Thanks, Bill, for saving me a vowel!) in user defined functions.  Divide by zero begins to look pretty useful.

  • (cs) in reply to Sean
    Sean:
    This brings me to something I always wonder about.  What goes through the developer's mind when he or she comes up with this kind of idea?  I can't decide between "This will really wow 'em," or "You know, this is so crazy it just might work!"


    More along the lines of, "It's almost time for me to leave, I'll fix this tomorrow."

    Then they get drunk and promptly forget the whole thing.
  • Konrad (unregistered) in reply to r3jjs
    I havn't tested this but is there any reason why
     
    throw: Error; 
     
    wouldn't have the desired effect?
     
    I that in the entire vm.js file there is no try catch exception handing so
    there is certanly no danger of the this getting caught inapropriatly.
  • Konrad (unregistered) in reply to r3jjs
    Anonymous:

    What makes this so bad is that I do something quite similar in my compiler.  I couldn't find a way to make Javascript just abort so I had to force an error.

    Spend hours reading and googling.

    (Yea, yea, I know, I could have set a global status flag and then tracked it back and after every function call did a 'if (errorLevel == fatal) return;' but that seemed even worse to me.)

    <FONT color=#0000ff>http://motevm.sourceforge.net/</FONT>

    http://motevm.sourceforge.net/motevm/vm.js (killJS at the bottom)

    (Sorry for the lack of documentation, its not been 'released to the wild' yet. Got too busy at work to finish things so its on hold till the end of the season, but if you are curious you can reach me at:
    r3jjs AT yahoo DOT com)

     
    My Last post was in response to the above
     
    throw: Error;
     
    is I believe the correct way to implement killJS.
  • (cs) in reply to Unklegwar
    Anonymous:

    INSURE is to buy insurance for.

     

    ENSURE is to make sure of.



    Thank you, I have gotten sick of explaining that to people.  I see this mistake everywhere, even in newspaper articles.

  • (cs) in reply to Sgt. Zim
    Sgt. Zim:
    Someone:
    Someone Else:

    INSURE is to buy insurance for.

    ENSURE is to make sure of.


    Humor WTF: it was a pun. This was at an insurance company (not an ensurance company)


    Not only that ...

    <pedant>

    Although it's not common, and it's not taught this way any longer (the dogma of "there's no way to ensure breasts like Dolly Parton's" was pounded into me in high school, even though it was wrong...), Merriam-Webster lists "ensure" and "insure" as synonyms.

    </pedant>

    I'd suggest renting a clue and a dictionary.


    Ok, I stand partly corrected.  My English teachers never allowed us to use them as synonyms.  Probably because of the entry for "ensure" states that there is a difference in some context between the two words, so by using the correct word, you will insure against any confusion about what was intended.

  • (cs) in reply to WeatherGod
    WeatherGod:
    Ok, I stand partly corrected.  My English teachers never allowed us to use them as synonyms.  Probably because of the entry for "ensure" states that there is a difference in some context between the two words, so by using the correct word, you will insure against any confusion about what was intended.


    My understanding is that the conflation of "insure" and "ensure" into "insure" is a U.S. dialectal difference.  As a Canadian, I ensure that I use "ensure" for to make certain of.

    Sincerely,

    Gene Wirchenko

  • Anony (unregistered) in reply to loneprogrammer

    You mean:
    <font face="Courier New">throw myBackOut();</font>

  • ChiefCrazyTalk (unregistered) in reply to Paul Tomblin
    Anonymous:
    At a job I had back in the mid-80s, the same code supported several Unix flavours and VMS.  In order to produce a stack trace on error in VMS, they called the one and only Fortran subroutine in the system to do a divide by zero, since that would force a stack trace.  I had already gotten rid of all the other Fortran remnants on the system, so I attacked the big orange wall and found the documentation on how to produce a stack trace in C with a VMS system call.  I took great pride in removing the last trace of Fortran from that system.

    Ahh, I remember all those orange VMS manuals all too well. Thanks for the memories, dude!

  • Gabe (unregistered) in reply to lucky luke
    lucky luke:
    frosty:
    CodeWhisperer:

    This is why I counsel my devs not to put their name in the comments...

    -cw



    You do?  I'd encourage them to so that I'd know who needs to be shown the light (i.e. given guidance, not the light outside the building).


    You do? I just use something like CVS and be able to see exactly what everyone did and not rely on a comment to decide who to blame ;)

    Comments are better because the person who writes the code isn't necessarily the person who checks it in. If you're trying to get your codebase stable, say for a beta release, you would not want to be checking in new features. That means that people writing new features may have to wait a while (perhaps months) to get new features checked in. I've had code that I've written checked in 5-6 months after I no longer worked there.

  • (cs) in reply to Gabe
    Anonymous:
    Comments are better because the person who writes the code isn't necessarily the person who checks it in. If you're trying to get your codebase stable, say for a beta release, you would not want to be checking in new features. That means that people writing new features may have to wait a while (perhaps months) to get new features checked in. I've had code that I've written checked in 5-6 months after I no longer worked there.
    I've heard of lousy SCM, but that certainly ranks up there.

    I've seen teams branch off a "release" stream and keep the main branch as a development branch (which is incorrect, but workable).  Better to branch off a new development stream for the next release, in order to submit code which isn't intended for the current release.  There's no excuse for having either the current or the next release become unstable because some code hasn't been checked in for many months after it's been changed.
  • (cs) in reply to GalacticCowboy
    GalacticCowboy:

    Sean:
    This brings me to something I always wonder about.  What goes through the developer's mind when he or she comes up with this kind of idea?  I can't decide between "This will really wow 'em," or "You know, this is so crazy it just might work!"

    "I'd have gotten away with it, too, if it weren't for you darn kids."

    Rut row. 

  • r3jjs (unregistered) in reply to Konrad
    Anonymous:
    My Last post was in response to the above
     
    throw: Error;
     
    is I believe the correct way to implement killJS.


    A dozen thank you!s.


  • (cs) in reply to Bus Raker
    Bus Raker:

    baldvin:
    > This is why I counsel my devs not to put their name in the comments...

    This was also my first thought. I googled for him a little bit, and this address came up: http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=20677597

    Now a real WTF: you can't see on that page if that guy is a programmer or not (so you cannot be sure if it is him or not), but in the "Who I'd like to meet" section there is M. Bolton, the same name as in the second comment!!

    Didn't you notice all of the references to the movie Office Space?  Please tell me you've seen the movie (if not you can complete the sentence 'the real WTF is')

    The rea... Hell, you know what I mean... Anyway, it's that I don't even know if Office Space ever came to Sweden... It must've, but I can't remember it, even though at that point in time I didn't even have any kids to disctract me from living :)

    Swedes, did you watch Office Space in Sweden? Was it as good as it seems?

  • csrster (unregistered) in reply to enterprise biziclop
    Anonymous:


    Of course. If he'd been a Pratchett fan it would have been 8, a Douglas Adams fan 42,
    but with 7 he's gotta be an Iron Maiden or Orson Scott Card guy.
  • TheDoom (unregistered) in reply to csrster

    Not the yanks this time, but eh - good try lads!

    I WORKED AT THE COMPANY WITH THIS GUY!

    He used to listen to Michael Bolton so loudly on his iPOD that you could hear it 3 desks away.

    Bolton's not that bad on the 4th listen.

  • foxyshadis (unregistered) in reply to CodeWhisperer
    CodeWhisperer:

    That's what source control management systems are for.  Keeps track of who made what changes and even gives them a space to explain why they changed what they did.  That way the company has the info, but anyone who stumbles on the code doesn't.  


    No one brought this up yet? How, exactly, do you get a COMMIT LOG from a set of STORED PROCEDURES? Unless you have a diabolical DBA who runs every update through source control before uploading it, how do you get people to not abuse it? Or has cvs/svn been extended inside databases while I wasn't looking? (I know a couple have proprietary code control.)

    One of these days I'll figure my password out again.
  • Peter (unregistered) in reply to Anonymous SQLuser

    I think you are looking for "SET XACT_ABORT" ;)

  • (cs) in reply to Coughptcha

    That wall's not 4 ft high!

  • Anonymous (unregistered) in reply to Anonymous

    No no, it is Charles Dikkens, the famous dutch author.

  • (cs) in reply to foxyshadis
    foxyshadis:

    No one brought this up yet? How, exactly, do you get a COMMIT LOG from a set of STORED PROCEDURES? Unless you have a diabolical DBA who runs every update through source control before uploading it, how do you get people to not abuse it? Or has cvs/svn been extended inside databases while I wasn't looking? (I know a couple have proprietary code control.)

    I think it could somehow be done with Oracle's system triggers but the best and easiest way is to prevent programmers from creating/replacing stored procedures directly in the (staging / productive) database; instead of that, scripts to create/replace stored procedure are checked out from the CVS and run in a "build" process.

    For my personal needs, I have configured SlickEdit (my favourite PL/SQL editor) to load the previous version of a stored procedure from the database and append it to a save file before actually compiling the stored procedures. (Yes, that means 10 versions of the procedure if I need 10 attempts to fix all syntax errors, but who cares, disk space is cheap)
    This way, even if one of my undisciplined coworkers makes changes directly in the database, his version is saved so I can compare/merge it if the collission is detected. By far not perfect, but a life-saver anyway.

  • Erwin (unregistered) in reply to VGR

    <FONT style="BACKGROUND-COLOR: #ffff8c">This is the type of comment that is typically made by egocentric types who haven't yet discovered that customer satisfaction ought to be a higher priority interest than programmer satisfaction.  And that "other developers paying the price" (of designs that are anywhere in the range of absolutely terrible to slightly imperfect) is a lesser evil than "customers paying the price" (of developers getting stuck in endless debates over how to organise "proper" error handling).</FONT>

     

  • Erwin (unregistered) in reply to Erwin

    Where is my quoted text ????

    Grrrrrrrrrrr.

  • (cs)

    I think a little sick just came up in my mouth...

    (Seriously - this is bad enough to make me post....Oh dear, oh dear...)

  • (cs) in reply to Erwin
    Erwin:

    <font style="background-color: rgb(255, 255, 140);">This is the type of comment that is typically made by egocentric types who haven't yet discovered that customer satisfaction ought to be a higher priority interest than programmer satisfaction.  And that "other developers paying the price" (of designs that are anywhere in the range of absolutely terrible to slightly imperfect) is a lesser evil than "customers paying the price" (of developers getting stuck in endless debates over how to organise "proper" error handling).</font>



    In the long term, what is bad for the other developers will most likely be bad for the customer, too. Systems live longer than expected, changes are more frequent than expected. Unmaintainable code makes changes more expensive and by far more likely to have undesired side effects (aka bugs).
  • IngramJames (unregistered) in reply to CodeWhisperer
    CodeWhisperer:
    frosty:
    CodeWhisperer:

    This is why I counsel my devs not to put their name in the comments...

    -cw



    You do?  I'd encourage them to so that I'd know who needs to be shown the light (i.e. given guidance, not the light outside the building).

    That's what source control management systems are for.  Keeps track of who made what changes and even gives them a space to explain why they changed what they did.  That way the company has the info, but anyone who stumbles on the code doesn't.  

    Two reasons: 1) after a few years you end up with multi-page change logs at the start of every source file (common); 2) by identifying yourself you're actually opening yourself to legal repercussions if your WTF ever kills someone or loses them millions of dollars (much less common, but it's happened).

    Oh, and third, I recall a fellow I used to work with (who I'll leave nameless to protect the guilty) who wrote a pretty nasty WTF and had his email in the javascript source.  It took about 3 months before he started getting hate mail from clueful users.  

    -cw



    1) What's wrong with that?  If it gets too long and obsolete, just trim it.  You also don't ned to comment *every* change; just major changes.  I'd rather turn to a guy sitting two desks away and say "Why did you do this?" Than hunt through 2 or 3 years of source control and THEN turn to him.  I maintain legacy systems.  This is a daily occurrence for me, though I have now leared to identify the developers from the style of the hack and which word(s) they can't spell in comments :)

    2) You are identified anyway, by source control.

    3) If you let the users see your source code, and put a developer's email address in there, then you deserve everything you get...

  • (cs)

    --He he he

     

    <FONT color=#0000ff>BEGIN</FONT>

       <FONT color=#008000>-- Do Stuff</FONT>

    <FONT color=#0000ff>EXCEPTION
      WHEN OTHERS THEN</FONT> <FONT color=#008000>-- Completely mask the preceding error</FONT>
         ABORT_PROCEDURE<FONT color=#0000ff>;</FONT>

    <FONT color=#0000ff>END;</FONT>

  • TheDoom (unregistered) in reply to Anonymous

    Forget Dikkens sir, I have proof that the wall is indeed 4ft

    http://www.mlchapel.org/photogallery/04Apr/bof/corner%20of%20cbloc%204ft%20wall418.jpg

  • Pedant (unregistered)

    Regarding all the comments about putting comments in your code/cvs. I recently finished working for a client, where you were never supposed to remove code, even for major changes, instead, just comment it out with a defect number, description & date.
    This just about worked in the proc, except for where I had to do major rewrites (nasty with the lack of highlighting in vi), but absolutely horrific in the eGate editor. There would be huge swathes of collaboration that had been 'commented' out by putting in a code statement of '/' and somewhere much further down '*/'. The editor wasn't clever enough to realise this code was a comment, so the only way of finding what had been commented out was by scrolling up and down, hoping you didn't miss the closing comment.
    If I had to do a fix, or work out what was going on, I normally just copied the code into metapad and deleted the comments which made it a lot easier to read/modify. Then I'd have to make the changes back into the collaboration...

  • bullestock (unregistered) in reply to Kevan
    Anonymous:
    That's why I love that the Toroise SVN plug in names the compare with earlier version function "Blame"

    The TortoiseSVN folks did not invent that, they took it from the name of the command it invokes: "svn blame". Subversion, again, took it from "cvs blame" (which is a synonym for "cvs annotate").
  • me (unregistered) in reply to Bus Raker

    maybe he wasn't refering to such a harmless overflow. MAYBE he was talking about a stack or heap overflow!

  • JR (unregistered) in reply to xrT
    xrT:
    Anonymous:
    Anonymous:
    Alex Papadimoulis:
    <FONT color=#006600>  --   ------------------------- ---------- -------------------------------------------------   ==
      --   M. Bolton                 2003-06-09 Changed to DIV0 error instead of overflow error     ==
      --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==</FONT>


    Ah, got to love that comment... Fascinating that someone has actually looked at this, and then thought "Divide by zero would be a much prettier way to handle this"

    What do you expect from the guy? He is a singer, not a developer.

    :)



    lol...i was thinking the same thing..."he's a programmer? wtf?!" :p

    i guess they're thinking that one day datatypes will increase in size and the forced overflow error would not error out anymore...thus using the division by zero error..

    Until mathmeticians/compilers realize that divide by zero is both zero and infinity at the same time...

  • (cs) in reply to ammoQ
    ammoQ:
    foxyshadis:

    No one brought this up yet? How, exactly, do you get a COMMIT LOG from a set of STORED PROCEDURES? Unless you have a diabolical DBA who runs every update through source control before uploading it, how do you get people to not abuse it? Or has cvs/svn been extended inside databases while I wasn't looking? (I know a couple have proprietary code control.)

    I think it could somehow be done with Oracle's system triggers but the best and easiest way is to prevent programmers from creating/replacing stored procedures directly in the (staging / productive) database; instead of that, scripts to create/replace stored procedure are checked out from the CVS and run in a "build" process.

    For my personal needs, I have configured SlickEdit (my favourite PL/SQL editor) to load the previous version of a stored procedure from the database and append it to a save file before actually compiling the stored procedures. (Yes, that means 10 versions of the procedure if I need 10 attempts to fix all syntax errors, but who cares, disk space is cheap)
    This way, even if one of my undisciplined coworkers makes changes directly in the database, his version is saved so I can compare/merge it if the collission is detected. By far not perfect, but a life-saver anyway.


    Assuming you mean the development database (developers should not be in the production database), the canonical solution is to keep code in a separate schema whose password is only known by the CM tool. You would also give each developer a personal schema to play around in; Oracle's scope rules give precedence to code in the schema you log in from. In anything but personal schemas, the developer would not have the RESOURCE privilege.

    You can't do much about diabolical DBAs except figure out what they did after the fact.
  • (cs)

    I can't even think any possible way to even JUSTIFY this one! I mean, the author obviously knows what a stored proceedure is, but he thinks a good way to get out of running proceedure is to call another proceedure which causes the other one to abort with an error. Argh, its too early for this ... my mind, it can't take it this morning.

Leave a comment on “Insuring Proper Error Handling”

Log In or post as a guest

Replying to comment #74084:

« Return to Article