• Walleye (unregistered)

    A crude attempt at security?

  • Paul Berry (unregistered) in reply to Walleye

    Heisenbug!

  • Apostrophe'Man (unregistered)

    How long had this been a problem? Not very wtf; you hard code something like that you'll always have IDE to Release compile issues, as well as speed. I compile my computational simulations to run outside the IDE, get ~20% speed boost.

  • (cs)

    I can't wait to see how people try to defend this one.

  • mbv (unregistered) in reply to joelkatz
    joelkatz:
    I can't wait to see how people try to defend this one.
    Too late...
  • (cs)

    The Real WTF is the misuse of 'whom' in the title.

  • kerokeroppy (unregistered) in reply to Apostrophe'Man

    is this an attempt to let us know that you develop computational simulations?

    Somthing on the line of "hey guys, i develop computational simulations" would have been better.

  • B (unregistered) in reply to joelkatz

    I'd defend it via the many programs on the typical hard drive that have some sort of "if (!strcmp(argv[0], "something"))" magic going on. For example, vi, vim, ex, and view are the same program that behaves differently depending on invocation. tex, latex, pdflatex, and a half-dozen other programs are all just different paths in the pdftex executable.

    As for having an IDE that arbitrarily changes argv[0], wtf?

  • Mike (unregistered)

    It's not a completely crazy bit of code... busybox, anyone?

    Great software package, emulates just about any linux program that you'd need in an embedded/lightweight device, and works (in the main mode) by checking the calling name.

    $ make busybox ... $ ln -s busybox less $ ln -s busybox vim $ ln -s busybox login $ ln -s busybox grep

    etc....

  • (cs)

    whoa. whose idea was THAT?! it reminds me of a few programs I've seen that act different if you run them via a symlink or directly... making your app decide how to behave based on argv[0] considered harmful.

  • (cs) in reply to NSCoder
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.
    Would you care to expand on that?
  • notme (unregistered)

    TRWTF is the article's headline. It should read "Who Should I Say is Calling?". The word "whom" is only for indirect objects, as in "Whom can you trust?", or "Whom should I tell you called?".

  • Grammarian (unregistered)

    Who should I say is calling; not whom. Don't use $10 words if you don't know what they mean. God!

  • ih8u (unregistered) in reply to NSCoder
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.

    Can we drop the grammar check? I do this too -- quietly. I think it's fun to constantly be testing my mad grammar skillz. It's like the interweb is Cato to my Inspector Clouseau.

    However, I don't prance around showing off my knowledge.

  • Anonymous (unregistered)

    Anyone that develops in Visual Studio should have a full understanding of the Visual Studio host process and when and how it should be used (and I hope you realise that it does a lot more than just add 'vshost' to the filename!). Accordingly, any good VS user should understand that their executable will have a different name when running through the IDE, and possibly under other circumstances as well. The WTF here is that some moron hard-coded a value that could change at runtime. That's not a WTF, it's just a fact of life when working with crap developers (you may detect that I speak from experience here).

  • Eric (unregistered) in reply to ThomsonsPier
    ThomsonsPier:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.
    Would you care to expand on that?
    "Whom" is an object. The word "Whom" in the title is being used as the subject of the object clause "whom is calling." Still sound right? Try turning it into a sentence by replying to the question and using an object pronoun: "I should say him is calling."
  • Mikkel Ovesen (unregistered)

    He he...

    Maybe this is a very clever attempt to execute development sql when running from the IDE, instead of live sql... or...not ;)

  • Monday (unregistered) in reply to notme
    notme:
    TRWTF is the article's headline. It should read "Who Should I Say is Calling?". The word "whom" is only for indirect objects, as in "Whom can you trust?", or "Whom should I tell you called?".

    Hey I learned something! Guess I'm done for the day.

  • Matt S. (unregistered)
    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.

  • Dave (unregistered) in reply to joelkatz
    joelkatz:
    I can't wait to see how people try to defend this one.
    Hang on, surely you're the one who always tries to defend retarded and non-sensical principles? You know, like all your forum replies.
  • Anonymous (unregistered)
    ...the client wanted that particular stored procedure to do something completely different when called from a different source.

    Uhh... why? Is there some good reason to not split this into two separate stored procedures?

  • Charles Manson (unregistered) 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.
    Your link has blown away my sarcasm shields. In other words, I could totally buy into FAD right now. Bad way to start a week.

  • (cs) in reply to ih8u
    ih8u:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.

    Can we drop the grammar check? I do this too -- quietly. I think it's fun to constantly be testing my mad grammar skillz. It's like the interweb is Cato to my Inspector Clouseau.

    However, I don't prance around showing off my knowledge.

    Seriously...as soon as I read the title of this article I thought "Well crap...whether it's correct or not, there will be a group of insufferable know-it-alls who will point and laugh to show how sharp and witty they are"

    Seriously, ya social mutants: It is intrinsically rude to point out grammatical errors. I am aware that the internet is not at the apex of courtesy, but for chrissake...the grammar checks are getting a little ridiculous around here...

  • pvr (unregistered)

    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.

  • Leo (unregistered) in reply to Voodoo Coder
    Voodoo Coder:
    ih8u:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.

    Can we drop the grammar check? I do this too -- quietly. I think it's fun to constantly be testing my mad grammar skillz. It's like the interweb is Cato to my Inspector Clouseau.

    However, I don't prance around showing off my knowledge.

    Seriously...as soon as I read the title of this article I thought "Well crap...whether it's correct or not, there will be a group of insufferable know-it-alls who will point and laugh to show how sharp and witty they are"

    Seriously, ya social mutants: It is intrinsically rude to point out grammatical errors. I am aware that the internet is not at the apex of courtesy, but for chrissake...the grammar checks are getting a little ridiculous around here...

    I'd say it's intrinsically rude to use terrible grammar, myself.

  • (cs)

    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

  • (cs) in reply to Leo
    Leo:
    Voodoo Coder:
    ih8u:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.

    Can we drop the grammar check? I do this too -- quietly. I think it's fun to constantly be testing my mad grammar skillz. It's like the interweb is Cato to my Inspector Clouseau.

    However, I don't prance around showing off my knowledge.

    Seriously...as soon as I read the title of this article I thought "Well crap...whether it's correct or not, there will be a group of insufferable know-it-alls who will point and laugh to show how sharp and witty they are"

    Seriously, ya social mutants: It is intrinsically rude to point out grammatical errors. I am aware that the internet is not at the apex of courtesy, but for chrissake...the grammar checks are getting a little ridiculous around here...

    I'd say it's intrinsically rude to use terrible grammar, myself.

    You're right. If I presented an article in a forum such as this, where the readers are notorious for their knowledge of syntax, it would be incredibly rude of me to not at least attempt some semblance of proper usage and spelling.

    However...it is just plain wrong to go on about correcting trivial and common errors. This is as bad as correcting a fragmented sentence or a split infinitive in everyday conversation.

    Moreover, the corrections are not being done to educate, or save the writer from embarrassment. They are made with a smug tone to make the correcter feel a little better than the writer.

    It is becoming an annoying cliche around here, not unlike the CAPTCHA at the bottom of a comment.

  • (cs) 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

    Your second example is incorrect.

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

    This is an example of predicate nominative, in which the nouns on both sides of the verb are nominative.

    A problem can sometimes arise when the two nominatives each take a different form of the verb. In these cases, the verb should agree with the subject (who or what the sentence is directly about).

    Correct: It am I. I am it.

    Incorrect: It is I. I is it.

  • Anonymous (unregistered)

    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.

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

    And what if, like in this case, it is 'it' (the calling exe)?

    Whom [Should I Say (It) is Calling]? -->

    Who/Whom? What/Wham?

    </NonEnglishSpeakingProgrammerMonkey>
  • (cs) in reply to OutWithTheTroll
    OutWithTheTroll:
    snoofle:
    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

    And what if, like in this case, it is 'it' (the calling exe)?

    Whom [Should I Say (It) is Calling]? -->

    Who/Whom? What/Wham?

    </NonEnglishSpeakingProgrammerMonkey>

    http://en.wikipedia.org/wiki/Declension

  • Beldar the Phantom Replier (unregistered)
    ...the exe name is prepended by .vshost.exe...
    You keep using that word. I do not think it means what you think it means.
  • AT (unregistered) in reply to Voodoo Coder
    Voodoo Coder:
    Leo:
    Voodoo Coder:
    ih8u:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.

    Can we drop the grammar check? I do this too -- quietly. I think it's fun to constantly be testing my mad grammar skillz. It's like the interweb is Cato to my Inspector Clouseau.

    However, I don't prance around showing off my knowledge.

    Seriously...as soon as I read the title of this article I thought "Well crap...whether it's correct or not, there will be a group of insufferable know-it-alls who will point and laugh to show how sharp and witty they are"

    Seriously, ya social mutants: It is intrinsically rude to point out grammatical errors. I am aware that the internet is not at the apex of courtesy, but for chrissake...the grammar checks are getting a little ridiculous around here...

    I'd say it's intrinsically rude to use terrible grammar, myself.

    You're right. If I presented an article in a forum such as this, where the readers are notorious for their knowledge of syntax, it would be incredibly rude of me to not at least attempt some semblance of proper usage and spelling.

    However...it is just plain wrong to go on about correcting trivial and common errors. This is as bad as correcting a fragmented sentence or a split infinitive in everyday conversation.

    Moreover, the corrections are not being done to educate, or save the writer from embarrassment. They are made with a smug tone to make the correcter feel a little better than the writer.

    It is becoming an annoying cliche around here, not unlike the CAPTCHA at the bottom of a comment.

    It may, perhaps, be rude to point out grammatical errors in an email or off-the-cuff forum posting. However, the comment here was directed at the author of an article posted for consumption by thousands of readers of a for-profit online publication. It's not unreasonable to expect the authors of these articles to comprehend and follow the basic grammar rules of their chosen language while mocking the language abuses of others.

  • Neil (unregistered)

    Did anyone notice that Whom was incorrect in the title? How about somebody give us a grammar lesson on the correct way to use who/whom?

    :P

  • Nitpicking Loser (unregistered) 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. JustDo What It Takes.
    You do realize that this code will now always raise the invalid_calling_pgm exception? Is that what you call "problem solved"?

  • Vizzini (unregistered) in reply to Beldar the Phantom Replier

    But that would be INCONCEIVABLE.

    captcha - tristique - triple the mystique

  • (cs) in reply to Grammarian
    Grammarian:
    Who should I say is calling; not whom. Don't use $10 words if you don't know what they mean. God!
    Is Alex really a god? I mean, he's really cool and all that, but a deity? Wow!

    Addendum (2009-01-26 11:09):

    Grammarian:
    Who should I say is calling; not whom. Don't use $10 words if you don't know what they mean. God!
    Is Alex really a god? I mean, he's really cool and all that, but a deity? Wow!

    (Snicker. And I didn't even get involved in the whole who/whom thing.)

  • Vizzini (unregistered) in reply to Beldar the Phantom Replier
    Beldar the Phantom Replier:
    ...the exe name is prepended by .vshost.exe...
    You keep using that word. I do not think it means what you think it means.

    But that would be INCONCEIVABLE.

    captcha - incassum - Incassum ade a mistake, I'll try again

  • Kevin (unregistered) in reply to Leo

    It is rude to make bodily noises in polite company, but it is also rude to comment on someone else's bodily noises. See where I'm going with this?

  • Apostrophe'Man (unregistered) in reply to kerokeroppy

    Application of a real world example.

  • The Trumpeter (unregistered) in reply to Kevin
    Kevin:
    It is rude to make bodily noises in polite company, but it is also rude to comment on someone else's bodily noises. See where I'm going with this?

    Make sure you're in impolite company??

  • (cs) in reply to Mike
    Mike:
    It's not a completely crazy bit of code... busybox, anyone?
    You're not exactly helping your argument there...
  • Lolcats (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'll try to tip the scales towards Lolcats

    [image]
  • not_a_real_name (unregistered) in reply to Beldar the Phantom Replier
    Beldar the Phantom Replier:
    ...the exe name is prepended by .vshost.exe...
    You keep using that word. I do not think it means what you think it means.
    I think you may not be aware it has two alternative meanings.

    http://en.wiktionary.org/wiki/prepend

  • (cs) in reply to Paul Berry
    Paul Berry:
    Heisenbug!
    I was about to say "needs more cat" - but I see someone beat me to it.
  • (cs) in reply to Anon Ymous
    Anon Ymous:
    Correct: It am I.
    I thought we were discussing English grammar here, not Lolcat.

    Addendum (2009-01-26 11:40): I see the poster three above me came to the same conclusion while I was writing my reply!

  • (cs) in reply to Grammarian

    Q: Knock, knock. A: Who's there? Q: Fuck. A: Fuck who? Q: Fuck WHOM!

  • (cs) in reply to Eric
    Eric:
    ThomsonsPier:
    NSCoder:
    The Real WTF is the misuse of 'whom' in the title.
    Would you care to expand on that?
    "Whom" is an object. The word "Whom" in the title is being used as the subject of the object clause "whom is calling." Still sound right? Try turning it into a sentence by replying to the question and using an object pronoun: "I should say him is calling."
    Ok, what's wrong with that?
    "Phone call for the Powerpuff girls!" "Ok, whom should I say is calling?" [image] "You should say Him is calling."
  • (cs) in reply to B
    B:
    I'd defend it via the many programs on the typical hard drive that have some sort of "if (!strcmp(argv[0], "something"))" magic going on. For example, vi, vim, ex, and view are the same program that behaves differently depending on invocation. tex, latex, pdflatex, and a half-dozen other programs are all just different paths in the pdftex executable.

    As for having an IDE that arbitrarily changes argv[0], wtf?

    It doesn't change it. Visual Studio executes code inside a host process; the host process is called ${ProjectName}.vhost.exe. I have no idea what voodoo the wrapper carries out. It's not part of the actual project and won't be included in the project files if you build an installer.

  • (cs) in reply to B
    B:
    I'd defend it via the many programs on the typical hard drive that have some sort of "if (!strcmp(argv[0], "something"))" magic going on. For example, vi, vim, ex, and view are the same program that behaves differently depending on invocation. tex, latex, pdflatex, and a half-dozen other programs are all just different paths in the pdftex executable.
    But this is not the same thing. This is a stored proc that changes its behaviour according to argv[0], which is more like a library function. It's as if the behaviour of tex/latex/etc. depended not on the name by which you invoked it, but on the name of the shell from which you invoked it.
    B:
    As for having an IDE that arbitrarily changes argv[0], wtf?
    Well, ...
    The requirement on a Strictly Conforming POSIX Application also states that the value passed as the first argument be a filename associated with the process being started. Although some existing applications pass a pathname rather than a filename in some circumstances, a filename is more generally useful, since the common usage of argv[0] is in printing diagnostics. In some cases the filename passed is not the actual filename of the file; for example, many implementations of the login utility use a convention of prefixing a hyphen ( '-' ) to the actual filename, which indicates to the command interpreter being invoked that it is a "login shell".
    So it's far from unprecedented that an app might tamper with argv[0] when launching another, and indeed it is far from unprecedented that it should be used as a cheap and crappy substitute for some sort of proper parent-child IPC...

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

Log In or post as a guest

Replying to comment #:

« Return to Article