• David (unregistered) in reply to snoofle
    snoofle:
    Ok folks, simple grammar rule for who/m:

    Insert "he" or "him" at the first point after who/m where it makes sense. If "he" makes sense, use who; if "him" makes sense, use whom.

    Whom Should I Say is Calling? Whom [Should I Say (He/Him) is Calling]? --> he --> Who

    Whom is it? Whom [is it (he/him)]? -> him -> Whom

    Is it he ?' quoth one,Is this the man ? By him who died on cross, With his cruel bow he laid full low The harmless Albatross.

  • Marlon (unregistered) in reply to fraca7
    fraca7:
    We're pretty anal

    Yeah, I've seen "Last Tango In Paris"...

    Captcha: gravis (joystick eh?)

  • Fred Gabingus (unregistered)

    how is the code all that different from...

    #IF DEBUG do some stuff #ELSE do some other stuff #ENDIF

    ...which I have seen used in old school C++ everywhere?

    I know this is why C# and Java don't do conditional compilation but this sort of thing is a lot more common than some might wish or think.

    We should all be so lucky to work on a project where this problems is the biggest WTF!

  • (cs) in reply to Matt S.
    Matt S.:
    IF .. AND (p_program_name <> '[executable name].exe' || p_program_name <> '[executable name].vshost.exe') THEN

    RAISE invalid_calling_pgm;

    END IF;

    Problem solved. Just Do What It Takes.

    Actually:

    IF (lower(p_program_name) not in ('[executable_name].exe', '[executable_name].vshost.exe', 'etc.exe') then RAISE invalid_calling_pgm; END IF;

    Still a pretty crappy way to code, though

  • (cs)

    My high school had the same "security". Programs were blocked by filename. firefox.exe wouldn't run*, but rename it to iexplore.exe and hey, there you go.

    (*WTF #2: Blocking Firefox. WTF #3: Blocking Firefox, but not the Firefox installer.)

  • dave-o (unregistered) in reply to ih8u

    Uhh... OK, just what DO you show off while prancing around?

  • Fly (unregistered) in reply to fred
    fred:
    Voodoo Coder:
    but for chrissake...the grammar checks are getting a little ridiculous around here...

    How do you like the grammer in this:

    IF .. .AND. {p_program_name != '[executable name].exe')

    Seriously, a web site about programming, and you think that grammer checks are ridiculous?

    lucky you checked your grammar

  • rast (unregistered) in reply to Anonymous
    Anonymous:
    This thread now has more to do with one little grammatical error than it does with the actual content of the article. I hope you sad little nitpicking losers are happy.

    But hey, at least T0pcod3r is still banned!

  • Jeremy Friesner (unregistered) in reply to pvr
    pvr:
    This is not actually uncommon. I have a plethora of Access databases (ugh) that connect to Oracle (ugh again) and the "security" is to actually check if the login is coming from Acess.exe.

    It took me nearly 2 days to figure out why I couldn't login via SQL*Plus (ugh!!@#!@#!@#!@#!) but could through the "Application".

    And no, they won't let me change that.

    That seems easy enough to fix... just have your SQL*Plus copy its own executable to a new file named "Access.exe", spawn a sub-process by executing that file, have the sub-process do the database calls, and pass the results back up to the parent process. (Deleting the Access.exe file you created is optional)

    You'll receive my bill for consulting fees in due course. :^)

    Jeremy

  • anonymous coward (unregistered)

    So- In the interest of not making this mistake myself, what IS the correct way to go about solving this problem?

  • Rene (unregistered) in reply to ih8u

    Isn't that the point of this website?

  • chris (unregistered) in reply to anonymous coward

    "What is the proper way to do this?"

    Well there are lots of ways with merits and demerits but here are a couple...

    Probably depends on the original intent. I'd guess it was security.

    The app name is an easily circumvented security measure since it can be changed easily in most cases. A better solution is to solve the problem directly: Use database security features to make the stored procedure callable by only those users with the proper credentials. Since all programs run under some OS user, system or Database account with associated permissions, only allow users logged in user with the proper permissions to call the stored procedure.

  • (cs) in reply to Fred Gabingus
    Fred Gabingus:
    how is the code all that different from...

    #IF DEBUG do some stuff #ELSE do some other stuff #ENDIF

    ...which I have seen used in old school C++ everywhere?

    I know this is why C# and Java don't do conditional compilation but this sort of thing is a lot more common than some might wish or think.

    We should all be so lucky to work on a project where this problems is the biggest WTF!

    We'd be luckier if we worked with developers who understood the language and the compiler environment...

    C# DOES have conditional compilation, and it's useful if done correctly.

    For example, I use it to debug windows services:

    #if (DEBUG) Service service = new Service(); service.OnStart(new string[] {}); Thread.Sleep(Timeout.Infinite); #else ServiceBase[] ServicesToRun = new ServiceBase[] { new Service() }; Run(ServicesToRun); #endif

    This way, you can debug a service directly from the VS IDE, without having to install it first, run it, and THEN attach a debugger.

    The point to this is that this doesn't rely on any externals, it just relies on the DEBUG constant being set.

  • Jrsus Loves Cookies (unregistered)

    Very funny, Wish I could do something like that, LOL. WTF I SAY, WTF my good man/woman. Shall we party amigo, because I just JIZZED IN MY PANTS

  • Joao Marcus (unregistered)

    I've seen good developers do things like that, mainly because some stupid manager from some stupid department get desperate: "OMG What am I going to do? Your business depends on this software, and this bug makes it useless! I need this fixed for yesterday!?" And then, when you work your ass off and deliver exactly what the idiot expected, the guys responsible for the tests take WEEKS to do the tests. After all, the bug was 4 years old and everybody always worked around it anyway, so, it was not a priority.

  • Mr Smith (unregistered) in reply to Anonymous
    Anonymous:
    This thread now has more to do with one little grammatical error than it does with the actual content of the article. I hope you sad little nitpicking losers are happy.

    I'm a happy sad little loser, which makes me a big winner! :)

  • Mr Smith (unregistered) in reply to Fred Gabingus
    Fred Gabingus:
    how is the code all that different from...

    #IF DEBUG do some stuff #ELSE do some other stuff #ENDIF

    ...which I have seen used in old school C++ everywhere?

    I know this is why C# and Java don't do conditional compilation but this sort of thing is a lot more common than some might wish or think.

    We should all be so lucky to work on a project where this problems is the biggest WTF!

    Actually, you can have conditional compilation in C#. But don't take my word for it. Try it.

  • Grammar Nazi (unregistered) in reply to ThomsonsPier
    ThomsonsPier:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.
    Would you care to expand UPON that?

    ftfy

  • Paolo G (unregistered)

    OK, two suggestions for preventing threads descending into grammar Nazidom in future...

    • Proof-read articles before posting.
    • If you include a deliberate error (such as the telephonist's erroneous "Whom should I say is calling?", put [sic] after it.

    Problem solved!

  • Paolo G (unregistered)

    Oops, I left out the closing parenthesis... I didn't proof-read my message before posting.

  • Cristian (unregistered) in reply to Anon Ymous
    Anon Ymous:
    snoofle:
    Ok folks, simple grammar rule for who/m:

    Insert "he" or "him" at the first point after who/m where it makes sense. If "he" makes sense, use who; if "him" makes sense, use whom.

    Whom Should I Say is Calling? Whom [Should I Say (He/Him) is Calling]? --> he --> Who

    Whom is it? Whom [is it (he/him)]? -> him -> Whom

    Your second example is incorrect.

    Correct: Who is it? He is it. It is who? It is he.

    While your example is still correct, that doesn't make the original point incorrect. It's just a different type of question. While you're thinking of something like 'who is that guy at the door?', the original point was 'whom is that abandoned book on the desk?'...

  • IMSoP (unregistered)

    Several comments have compared this to argv[0] being checked by busybox, g[un]zip, etc.

    But that's not what this code is doing at all - it's not checking how the stored proc was invoked, it's checking how its parent process was invoked.

    If you think of the stored proc as an executable in its own right, it's more like gzip saying "ah, I see you're running bash, I'll adopt this behaviour", which would be voodoo enough.

    But since this is (or should be) a library function, not a standalone call, it's actually like zlib exporting a function called compress_or_uncompress_depending_what_you_call_your_executable - which would just be a true WTF!

  • Da' Man (unregistered) in reply to j
    j:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.
    Who or whom gives a $!#%?
    Leonard Cohen, maybe? (http://lyricwiki.org/Leonard_Cohen:Who_By_Fire)
  • (cs) in reply to anonymous coward
    anonymous coward:
    So- In the interest of not making this mistake myself, what IS the correct way to go about solving this problem?
    Well, I'd recommend just asking "Who is that calling?" when you answer the phone, without going into detail about how it's so you can say who or whom is calling. The caller will figure that out anyway, and you save yourself all the confusing grammar issues.
  • Uhh (unregistered) in reply to pvr
    pvr:
    This is not actually uncommon. I have a plethora of Access databases (ugh) that connect to Oracle (ugh again) and the "security" is to actually check if the login is coming from Acess.exe.

    It took me nearly 2 days to figure out why I couldn't login via SQL*Plus (ugh!!@#!@#!@#!@#!) but could through the "Application".

    And no, they won't let me change that.

    Can't you rename the SQL*Plus executable to 'access.exe' ?

  • ÃÆâ€â„ (unregistered)

    LAST

Leave a comment on “Whom Should I Say is Calling?”

Log In or post as a guest

Replying to comment #:

« Return to Article