• Yo (unregistered)

    Holy crappola that is stupid

  • Carl (unregistered)

    Stuff like this makes my head hurt.

    The other WTF, assuming this is a good idea, is that it can only accept 3 arguments for any function.  Not very expandable, now is it?

  • GunslingerRR (unregistered)

    Wait, so this function takes a ton of arguments...only to perform several different functions in a switch/case?

    What is so hard about making a simple function "create()"?

  • (cs)

    I guess arrays are out of the question.

  • (cs)

    <font size="1">omg.

    I've seen this before. I worked with a guy who was asked to write a database access layer. He came back a month later with a single function that accepted a string parameter, did a massive switch/case, and executed whatever dynamic sql block the param was supposed to specify.


    </font>

  • (cs)

    Truely this person must be a master of the Dark Side of the Force,
    to take something good and pure and twist it into something so wrong. 

  • (cs) in reply to Carl

    <font size="1">

    Anonymous:

    The other WTF, assuming this is a good idea, is that it can only accept 3 arguments for any function.  Not very expandable, now is it?


    No, it accepts up to 9 args.

    I also like that he specified Variants and Objects. I thought Variants could also hold object references. (my VB is rusty, so I could be wrong on this).
    </font>
  • (cs) in reply to John Smallberries

    John Smallberries:
    <FONT size=1>omg.

    I've seen this before. I worked with a guy who was asked to write a database access layer. He came back a month later with a single function that accepted a string parameter, did a massive switch/case, and executed whatever dynamic sql block the param was supposed to specify.


    </FONT>

    Poor Giles Olaliberries. You've certainly seen horrible things.

    I think today's WTF is a GREAT example of overloading. I'm sure the whole JVM is implemented that way behind the scenes.

    [:|]

  • (cs)

    So, bascially, the equivalent of

        MyFunc(1,2,"Hello");

    would be

    ExpandableFunction("MyFunc", "HelloWorld",null, null, 1, 2, null, null, null, null);

     

    ?

  • (cs)

    What hapens when you call CInt on a String?

  • (cs)

    Matt should tell that predecessor of his about operator overloading. I shudder to think what that person would come up with for

    <FONT face="Courier New">String a = "stuff ";</FONT>

    <FONT face="Courier New">String b = "your face";</FONT>

    <FONT face="Courier New">String ab = a + b;</FONT>

     

  • (cs) in reply to Matt B

    And no optional parameters?  Yick.

  • (cs) in reply to JamesCurran

    he he .. this is too much.

    OK ...  Maybe he got tired of declaring variables and all those silly compile-time errors, so he turned off Option Explicit.  But even after doing that, the damn compiler STILL complained !  He then realized that apparently it still wanted him to declare all the functions and procedures as well !    How annoying!

    The ingenius solution (that I am sure he is quite proud of) : Make all function and procedure names TEXT STRINGS, all called through this one function, so that you NEVER get a compile time error !  And no annoying declaration statements in your code is needed ! Only 1 function name to spell correctly and remember !

    In fact, with this new model, no more errors will *ever* occurr at design time OR run-time !  This might be the best code this planet has ever seen, or ever will!

    Truly, a masterpiece !

  • (cs) in reply to Matt B
    Matt B:
    What hapens when you call CInt on a String?

    If the string is numeric, the converted (& truncated if decimal)  int is returned.
    If it's not, an exception is thrown (whoops...VB...) it blows up.
  • (cs)

    Alex Papadimoulis:
    Public Function ExpandableFunction...
       'Yadda-yadda
    End Sub

    Spot the bonus-WTF...

  • The asterisk is on the side I'm not looking at (unregistered)

    While the first line of the description is a little over "exposed", it does set up the horror beneath fairly well.

  • (cs) in reply to Voller
    Voller:

    Alex Papadimoulis:
    Public Function ExpandableFunction...
       'Yadda-yadda
    End Sub

    Spot the bonus-WTF...


    I'm guessing that's just a bug in Alex's transciption/anonymizer code...
  • (cs)

    Also, there's no return type for the function, so it defaults to Variant.
    The caller has to know that "CREATE" (or whatever function) is supposed to return an Object (or whatever type) so it can cast it. Makes it even harder to use.

    Maybe this is a misguided attempt to code anonymous methods or Lisp-style lambda functions in VB. Or maybe it's just a big,  fat, steaming WTF.

    ugh. Why do I keep looking at it?

  • (cs) in reply to John Smallberries
    John Smallberries:
    Voller:

    Alex Papadimoulis:
    Public Function ExpandableFunction...
       'Yadda-yadda
    End Sub

    Spot the bonus-WTF...


    I'm guessing that's just a bug in Alex's transciption/anonymizer code...

    I really need to get that fixed ;-)

  • (cs)

    there are legitimate times when control coupling makes sense (pick any number of GoF patterns - Factory, Command, Strategy, Decorator)...this is not one of them and this is certainly not a good way to implement it.

    I now not only have to write new code to consume the function, but at a new select statement and the new function itself.

    I think tomorrow we should teach this programmer about polymorphism. It'll be a duct tape moment for sure (wrap duct tape around their head so when it explodes, it keeps the pieces from flying everywhere -- we used to do the same thing for our computers during hurricaines using duct tape and garbage bags).

    If you're going to reinvent the wheel, try not to make it a triangle or a rectangle.

  • (cs)

    This is brilliant!  I've always wondered whether or not it would be possible to write a program that is completely recursive.  I'd never thought of doing anything this crazy though!  Awesome!!!

  • Carl (unregistered) in reply to John Smallberries
    John Smallberries:
    <font size="1">
    Anonymous:

    The other WTF, assuming this is a good idea, is that it can only accept 3 arguments for any function.  Not very expandable, now is it?


    No, it accepts up to 9 args.

    I also like that he specified Variants and Objects. I thought Variants could also hold object references. (my VB is rusty, so I could be wrong on this).
    </font>


    How would you pass 7 UDT's or COM objects?  Can't do it.  First 3 args are Strings.
  • Fregas (unregistered)

    Well, its in VB, which is loosely typed anyway.  So i don't really see what difference it makes.  [;)]

    hahahahahahahaha!!!!!!!!!!!!  What a knob gobbler...

  • (cs) in reply to Carl
    Anonymous:
    John Smallberries:
    <font size="1">
    Anonymous:

    The other WTF, assuming this is a good idea, is that it can only accept 3 arguments for any function.  Not very expandable, now is it?


    No, it accepts up to 9 args.

    I also like that he specified Variants and Objects. I thought Variants could also hold object references. (my VB is rusty, so I could be wrong on this).
    </font>


    How would you pass 7 UDT's or COM objects?  Can't do it.  First 3 args are Strings.

    I didn't say what types those 9 could be.
    If you wanted to pass 6 strings and 3 objects, no problem.
    Last I checked, 6+3 = 9.
  • (cs) in reply to John Smallberries
    Anonymous:
    <font size="1">
    </font>How would you pass 7 UDT's or COM objects?  Can't do it.  First 3 args are Strings.

    You could pass 9 COM objects.
    The first 3 strings would have to be ProgId's, which you would CreateObject() on.
    The other 6 could be references to object instances.
  • Carl (unregistered) in reply to John Smallberries
    John Smallberries:
    Anonymous:
    John Smallberries:
    <font size="1">
    Anonymous:

    The other WTF, assuming this is a good idea, is that it can only accept 3 arguments for any function.  Not very expandable, now is it?


    No, it accepts up to 9 args.

    I also like that he specified Variants and Objects. I thought Variants could also hold object references. (my VB is rusty, so I could be wrong on this).
    </font>


    How would you pass 7 UDT's or COM objects?  Can't do it.  First 3 args are Strings.

    I didn't say what types those 9 could be.
    If you wanted to pass 6 strings and 3 objects, no problem.
    Last I checked, 6+3 = 9.


    Nope, it's 11...this function goes to 11...
  • (cs)

    After a sound beating with the clue bat, Matt’s predecessor becomes enlightened on the True Meaning of functions! In a 48-hour coding marathon, he rewrites the entire code to a new and much improved form! Oh, it still has Function ExpandableFunction(), but now it’s written as:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    <FONT color=#000000>Public Function ExpandableFunction(ByVal strFunctionName As String, _
                  ByRef sArg1 As String, ByRef sArg2 As String, ByRef sArg3 As String, _
                  ByRef vArg1 As Variant, ByRef vArg2 As Variant, ByRef vArg3 As Variant, _
                  ByRef oArg1 As Object, ByRef oArg2 As Object, ByRef oArg3 As Object)
      Select Case strFunctionName
        </FONT><FONT color=#000000>Case "CREATE"
          </FONT><FONT size=2><FONT color=#000000>    ExpandableFunction = Create(sArg1, sArg2)<o:p></o:p></FONT></FONT>

    ...and so on.<o:p></o:p>

    Matt reaches for the bigger clue bat.

    --RA

    <o:p></o:p>

    "Do. Or do not. There is no try. Except in C#." –Yoda<o:p></o:p>

  • (cs) in reply to Carl

    Anonymous:
    John Smallberries:
    Anonymous:
    John Smallberries:
    <FONT size=1>
    Anonymous:

    The other WTF, assuming this is a good idea, is that it can only accept 3 arguments for any function.  Not very expandable, now is it?

    No, it accepts up to 9 args.

    I also like that he specified Variants and Objects. I thought Variants could also hold object references. (my VB is rusty, so I could be wrong on this).
    </FONT>


    How would you pass 7 UDT's or COM objects?  Can't do it.  First 3 args are Strings.

    I didn't say what types those 9 could be.
    If you wanted to pass 6 strings and 3 objects, no problem.
    Last I checked, 6+3 = 9.


    Nope, it's 11...this function goes to 11...

    Talk about mudflaps, this code's got 'em....

  • (cs) in reply to John Smallberries
    John Smallberries:
    You could pass 9 COM objects.
    The first 3 strings would have to be ProgId's, which you would CreateObject() on.

    You could pass unlimited parameters by converting them into XML and stuffing them into the first String parameter.  And that would work across the network... I think I'll call that... BORAX.  No... SOAP.

  • Hank Miller (unregistered)

    Granted I haven't done Basic since my Atari days.   (Must not make smart comment about how much better it was than the C64) but can't he eliminate that one function with a goto somehow?

    somethign like:

    call = "initialize"
    start:
        Switch Case call
            Case "initialize"
                ...
               call = "nextWhatever"
               goto start    

    Again, I have not used VB at all, but isn't there a syntax something like the above that would eliminate the need for even one function.     Afterall if you are going to write bad code, why not go all the way?

  • (cs) in reply to Hank Miller
    Anonymous:
    somethign like:

    call = "initialize"
    start:
        Switch Case call
            Case "initialize"
                ...
               call = "nextWhatever"
               goto start   

    This seems familiar somehow.

  • (cs)

    You know, the stuff I have to deal with here makes most of these posts look like nothin'.

    Here is one of the BEST segments of code I have seen in this system:
    <font size="2">
            var test= mainStr.split("|");
            for(var i=0; i<=4;i++)
            {
                    switch (i)
                    {
                        case 0:
                        {
                            sHTML += 'Affiliation' + '="' + test[i] + '" ';
                            break;
                        }
                        case 1:
                        {
                            sHTML += 'Product' + '="' + test[i] + '" ';
                            break;
                        }

                        case 2:
                        {
                            sHTML += 'Company' + '="'+ test[i]+ '" ';
                            break;
                        }
                        case 3:
                        {
                            sHTML += 'CompanyGroup' + '="'+ test[i]+ '" ';
                            break;
                        }
                        case 4:
                        {
                            sHTML += 'Persona' + '="' + test[i] + '" ';
                            break;
                        }
                        break;
                    }
            }
    </font>
    Obviously, this is a total wtf...why in the...

    But that's nothing!  Nothing I tell you.

    I run into stuff like this daily  Keep in mind the stuff in the CDATA sections is supposed to be perl, that the <iw_ tags="" get="" compiled="" into="" perl="" at="" runtime="" and="" eval'd="" (a="" really="" ugly="" system="" that="" comes="" from="" the="" vendor="" but="" wait="" until="" you="" see="" them="" actually="" use="" it=""><iw_iterate> is a for-each loop and "iter" is an optional index.  Key word in that statement is optional.  The dcr sections come from this really nasty mechanism called a "data capture record", and they are basically equivilent to records of input.

    <font size="2"><iw_iterate var="scroll" list="dcr.ScrollingDisclaimer" iter="count71"></iw_iterate>
    <iw_perl><!--[CDATA[</span><br style="font-family: courier new;"> <span style="font-family: courier new;"> if ($disclaimerflag < 0 || $disclaimerflag == 0) { $disclaimerflag = 1; }</span><br style="font-family: courier new;"> <span style="font-family: courier new;"> if (!defined $disclaimerflag || $disclaimerflag == "") { $disclaimerflag = 1; }</span><br style="font-family: courier new;"> <span style="font-family: courier new;"> ]]--></iw_perl>
    </font></iw_iterate><font size="2">
    <iw_iterate var="nonscroll" list="dcr.NonScrollingDisclaimer" iter="count72"></iw_iterate>
    <iw_perl><!--[CDATA[</span><br style="font-family: courier new;"> <span style="font-family: courier new;"> if ($disclaimerflag < 0 || $disclaimerflag == 0) { $disclaimerflag = 1; }</span><br style="font-family: courier new;"> <span style="font-family: courier new;"> if (!defined $disclaimerflag || $disclaimerflag == "") { $disclaimerflag = 1; }</span><br style="font-family: courier new;"> <span style="font-family: courier new;"> ]]--></iw_perl>
    </font></iw_><font size="2">
    <iw_iterate var="scrolldisclaimer" list="dcr.ScrollingDisclaimer" iter="count79"></iw_iterate>
    <iw_perl><!--[CDATA[</span><br style="font-family: courier new;"> <span style="font-family: courier new;">$disclaimer = iwpt_dcr_value("scrolldisclaimer.DisclaimerText");</span><br style="font-family: courier new;"> <span style="font-family: courier new;">if ($disclaimerflag gt "0" || $disclaimerflag != 0) {</span><br style="font-family: courier new;"> <span style="font-family: courier new;">    iwpt_output("</span><br style="font-family: courier new;"> <span style="font-family: courier new;"><div class=\"scrolldisclaimer\">$disclaimer</div></span><br style="font-family: courier new;"> <span style="font-family: courier new;">    ");</span><br style="font-family: courier new;"> <span style="font-family: courier new;">}</span><br style="font-family: courier new;"> <span style="font-family: courier new;">]]--></iw_perl>


    <iw_iterate var="nonscrolldisclaimer" list="dcr.NonScrollingDisclaimer" iter="count79"></iw_iterate>
    <iw_perl><!--[CDATA[
    $nondisclaimer = iwpt_dcr_value("nonscrolldisclaimer.DisclaimerText");
    if ($disclaimerflag gt "0" || $disclaimerflag != 0) {
        iwpt_output("

    $nondisclaimer

        ");
    }
    ]]--></iw_perl>


    </font>

    And if thats not bad enough for you, at the end of the template is this...

    <font size="2"><iw_perl><!--[CDATA[</span><br style="font-family: courier new;"> <span style="font-family: courier new;">if (iwpt_dcr_value("dcr.Option.PrinterFriendly") == true &&</span><br style="font-family: courier new;"> <span style="font-family: courier new;">    iwpt_dcr_value("dcr.Option.PrinterFriendly") != false) {</span><br style="font-family: courier new;"> <span style="font-family: courier new;">            $dcr_name = iwpt_get_dcr_name();</span><br style="font-family: courier new;"> <span style="font-family: courier new;">            $workarea   = iwpt_get_dcr_name();</span><br style="font-family: courier new;"> <span style="font-family: courier new;">            $iw_home = TeamSite::Config::iwgethome();</span><br style="font-family: courier new;"> <span style="font-family: courier new;">            $workarea   =~ s#\\#/#g;</span><br style="font-family: courier new;"> <span style="font-family: courier new;">            $workarea   =~ s#(/WORKAREA/[^/]-->
                my $pt_name = iwpt_get_pt_name();
                $pt_name =~ s{.tpl}{_p.tpl}g;

                my @args = ('C:/Interwoven/iw-home/local/bin/generate_pfile.ipl', "$workarea", "$dcr_name", "$pfile_name", "$pt_name");
                `@args`;
    }
    ]]></iw_perl>

    </font>

    And I've got thousands and thousands of lines of this crap to wade through.
    That's right, You remember correctly. == is a numerical comparison and there are no "true" or "false" boolean primitives in perl.

    All I have to say is, thank goodness this is a contract!
  • (cs)

    You know, the stuff I have to deal with here makes most of these posts look like nothin'.

    Here is one of the BEST segments of code I have seen in this system:
    <font size="2">
            var test= mainStr.split("|");
            for(var i=0; i<=4;i++)
            {
                    switch (i)
                    {
                        case 0:
                        {
                            sHTML += 'Affiliation' + '="' + test[i] + '" ';
                            break;
                        }
                        case 1:
                        {
                            sHTML += 'Product' + '="' + test[i] + '" ';
                            break;
                        }

                        case 2:
                        {
                            sHTML += 'Company' + '="'+ test[i]+ '" ';
                            break;
                        }
                        case 3:
                        {
                            sHTML += 'CompanyGroup' + '="'+ test[i]+ '" ';
                            break;
                        }
                        case 4:
                        {
                            sHTML += 'Persona' + '="' + test[i] + '" ';
                            break;
                        }
                        break;
                    }
            }
    </font>
    Obviously, this is a total wtf...why in the...

    But that's nothing!  Nothing I tell you.

    I run into stuff like this daily  Keep in mind the stuff in the CDATA sections is supposed to be perl, that the <iw_ tags get compiled into perl at runtime and eval'd (A really really ugly system that comes from the vendor, but wait until you see them actually use it).  <iw_iterate> is a for-each loop and "iter" is an optional index.  Key word in that statement is optional.  The dcr sections come from this really nasty mechanism called a "data capture record", and they are basically equivilent to records of input.

    <font size="2"><iw_iterate var="scroll" list="dcr.ScrollingDisclaimer" iter="count71">
    <iw_perl><![CDATA[
    if ($disclaimerflag < 0 || $disclaimerflag == 0) { $disclaimerflag = 1; }
    if (!defined $disclaimerflag || $disclaimerflag == "") { $disclaimerflag = 1; }
    ]]></iw_perl>
    </iw_iterate>
    <iw_iterate var="nonscroll" list="dcr.NonScrollingDisclaimer" iter="count72">
    <iw_perl><![CDATA[
    if ($disclaimerflag < 0 || $disclaimerflag == 0) { $disclaimerflag = 1; }
    if (!defined $disclaimerflag || $disclaimerflag == "") { $disclaimerflag = 1; }
    ]]></iw_perl>
    </iw_iterate>
    <iw_iterate var="scrolldisclaimer" list="dcr.ScrollingDisclaimer" iter="count79">
    <iw_perl><![CDATA[
    $disclaimer = iwpt_dcr_value("scrolldisclaimer.DisclaimerText");
    if ($disclaimerflag gt "0" || $disclaimerflag != 0) {
        iwpt_output("
    <div class="scrolldisclaimer">$disclaimer</div>
        ");
    }
    ]]>
    </iw_perl>
    </iw_iterate>
    <iw_iterate var="nonscrolldisclaimer" list="dcr.NonScrollingDisclaimer" iter="count79">
    <iw_perl><![CDATA[
    $nondisclaimer = iwpt_dcr_value("nonscrolldisclaimer.DisclaimerText");
    if ($disclaimerflag gt "0" || $disclaimerflag != 0) {
        iwpt_output("
    <div class="nonscrolldisclaimer">$nondisclaimer</div>
        ");
    }
    ]]>
    </iw_perl>
    </iw_iterate>
    </font>



    And if thats not bad enough for you, at the end of the template is this...

    <font size="2"><iw_perl><![CDATA[
    if (iwpt_dcr_value("dcr.Option.PrinterFriendly") == true &&
        iwpt_dcr_value("dcr.Option.PrinterFriendly") != false) {
                $dcr_name = iwpt_get_dcr_name();
                $workarea   = iwpt_get_dcr_name();
                $iw_home = TeamSite::Config::iwgethome();
                $workarea   =~ s#\\#/#g;
                $workarea   =~ s#(/WORKAREA/[^/]+)/.*#$1#;  # Strip off anything after "/WORKAREA/$WAName"
                my $pt_name = iwpt_get_pt_name();
                $pt_name =~ s{.tpl}{_p.tpl}g;

                my @args = ('C:/Interwoven/iw-home/local/bin/generate_pfile.ipl', "$workarea", "$dcr_name", "$pfile_name", "$pt_name");
                `@args`;
    }
    ]]></iw_perl>
    </font>
    That's right, You remember correctly. == is a numerical comparison and there are no "true" or "false" boolean primitives in perl.
  • (cs) in reply to Fregas
    Anonymous:

    Well, its in VB, which is loosely typed anyway.  So i don't really see what difference it makes.  [;)]

    hahahahahahahaha!!!!!!!!!!!!  What a knob gobbler...



    You mean dynamically typed.
  • (cs) in reply to tag

    You guys are morons, this is a part of a scripting engine.

    It takes a function with tokenized parameters.

    Lamers, bashing without a clue.

  • (cs)

    Uhh... guys... I've got a brilliant idea for how to re-implement this!

    OK, here goes:

    1. Put all the functions you could possibly want to call into a separate source file. All functions accept nine parameters. Compile it with debugging turned on (MUST be turned on!)
    2. Write a script that pulls the symbol table from the debugging info and writes an XML file with the name of each function and its address.
    3. When you want to call a function, you call a dispatcher function which...
    4. invokes a JavaScript engine which...
    5. runs a JS file which parses the XML file and...
    6. returns the address of the function, which is then...
    7. called by the original dispatcher function, with the 9 parameters.

    There you go! No need for complicated dependencies! It actually makes your program compile faster, because changing the set of exported functions doesn't break existing binary objects so they don't have to be recompiled... because you just add a new call to the dispatch... wait... they wouldn't be recompiled anyway because they're already exported... I mean... wait... screw it I can't defend it, but... IT USES JAVASCRIPT AND XML SO IT MUST BE GOOD!!!

    ;)
  • (cs)

    What about the fact every parameter is passed by REFERENCE !!!!!!!!

  • Tim Hall (unregistered) in reply to Otac0n

    "this is a part of a scripting engine."

    That was the first thing i thought of, infact i started ti write something like that (i knew it was bad but i couldnt find any other way), then i came across the brilliant CallByName function which made it a lot nicer.

  • Konijn (unregistered) in reply to Otac0n

    >You guys are morons, this is a part of a scripting engine.
    >It takes a function with tokenized parameters.
    >Lamers, bashing without a clue.

    Maybe us morons and lamers have heard of Eval before ?

    T.

  • (cs) in reply to Konijn
    Anonymous:

    >You guys are morons, this is a part of a scripting engine.
    >It takes a function with tokenized parameters.
    >Lamers, bashing without a clue.

    Maybe us morons and lamers have heard of Eval before ?

    T.

     

    sure, but that could potentially lead to serious security holes.

  • (cs)

    I always wondered how you can do aspect oriented programming in VB... now I know the answer ;-)

  • (cs) in reply to ammoQ

    This is great! It's like that time when the Adam West Batman poured alphabet soup unto the Bat Computer to solve The Riddler's riddle!

  • Sten (unregistered)

    The linux kernel code for socketcall() looks remarkably like this.  Just why they didn't implement one system call per socket function is beyond me.

    Fun,

    Sten

  • Mario (unregistered) in reply to Hank Miller

    Anonymous:
    Granted I haven't done Basic since my Atari days.   (Must not make smart comment about how much better it was than the C64) but can't he eliminate that one function with a goto somehow?

    But you did anyway, didn't you? There is nothing better than a C64. Up to today, the Information Technology industry is struggling to make a system as innovating as our beloved Commodore 64.

  • anon (unregistered)

    Been there, called that; with XML documents passed as strings for bonus points.
    It was a CORBA server (also in a COM edition); the excuse for inflicting users a single method interface was reducing coupling and binary dependencies.

  • (cs) in reply to anon

    Just look at IDispatch::Invoke in COM. Any function you like called through that.

    But that is an early-bound function enabling a late-bound interface, so it's got good reasons for its existence.

  • (cs)

    How un-fecking-believable...Really...
    ....Must go sit in my quiet place now....

  • (cs) in reply to Mario
    Anonymous:

    Anonymous:
    Granted I haven't done Basic since my Atari days.   (Must not make smart comment about how much better it was than the C64) but can't he eliminate that one function with a goto somehow?

    But you did anyway, didn't you? There is nothing better than a C64. Up to today, the Information Technology industry is struggling to make a system as innovating as our beloved Commodore 64.



    I think you made a slight spelling mistake

    s/Commodore 64/BBC Micro/
    s/C64/Beeb/

    There - all better now!
  • boohiss (unregistered) in reply to John Smallberries
    If the string is numeric, the converted (& truncated if decimal) int is returned. If it's not, an exception is thrown (whoops...VB...) it blows up.

    Incorrect. If the string is not numeric, CInt returns a 0.

  • Not Alone (unregistered)

    At least it's only ONE function.

    The SQL DB I inherited uses the same "logic" in all the stored procedures, only using a passed in "function" parameter instead of the strFunctionName and a series of IF statements in the SP. The same set of additional parameters is used in every stored procedure.

    Each proc can return various result sets and/or perform various updates to the database. And every proc is called exactly the same as every other except for the name of the proc.

    Maintenance is a NIGHTMARE!

     

    But at least I'm not the only one to have to deal with this madness - as today's WTF shows...

Leave a comment on “Scaling Expandable Extensibility”

Log In or post as a guest

Replying to comment #:

« Return to Article