• (cs) in reply to Nemo
    Nemo:
    Of course it depends -- 1 is prime when it's followed by a vowel.

    Or if it's followed by a detective. Then it's a prime suspect.

  • rd (unregistered) in reply to John
    John:
    The Prime Number [WTF] doesn't mention what type of company the startup was. Quite possibly the CEO was the kind of person that knows Primes inside-out.
    I would guess that the company was a publisher of 19th century mathematics texts.
  • strNickname (unregistered) in reply to Sam B
    Sam B:
    Eam:
    What about the point where one fails to detect satire or sarcasm, consistently?

    There was no indication that what "Top Cod3r" said was sarcastic or satiric. None whatsoever. There are plenty of idiots on the Internet, and some of them are probaby on this site. WTFs also happen on Daily WTF.

    Also, I have not seen any of his other posts.

    So based on my observations (and I suppose all the others who took "Top Cod3r"'s idiocy as true), I would say that he failed miserably at being satiric.

    No, he didn't. And if "proper use of On Error Resume Next" isn't a good enough indication for you, you fail.

    Eam:

    But quote honestly, who cares, right?

    I certainly don't.

  • SomeName (unregistered) in reply to El Duderino
    El Duderino:
    A Wizard a True Star:
    So, in which languages do you think Hungarian Notation would actually be useful?
    pI advActually vLove adjHungarian nNotation advSo adjMuch, pI vUse pIt advAll artThe nTime! pIt advSure vMakes nEnglish adjEasier prepTo vUnderstand. vImagine cIf pYou vHad prepTo vRead pThis prepWithout pIt. pYou vWould vHave adjNo nClue advWhat pThese nWords vMeant prepWithout pTheir nParts prepOf nSpeech!

    I lol'd. Thanks ;o)

  • panzi (unregistered) in reply to Franz Kafka
    Franz Kafka:
    wee:
    Top Cod3r:
    the importance of naming your variables with a prefix that tells you what type it is.

    You need to get yourself a more loosely-typed language, son. And declench in any case.

    loosely typed languages need real HN even more - how are you supposed to know what variable x is supposed to be unless you tag it with something like name or amount?

    Ok, then lets take python. You have a int variable iValue which has the value 2147483647. Now you add 1. What do you get? Right 2147483648L, a variable of the type long. So I don't care what type the variable is, it is some kind of integer. Something that can be used as a integer number. It could even be a complex object, if it emulates integers right. I don't care.

  • strNickname (unregistered) in reply to strNickname

    oops, misquoted.

    BTW, does anyone realize that there is a limited dictionary for CAPTCHA and by posting your tests and marking them all very clearly, you make it quite possible to extract many of the words for a nice spam script? I know, the chances are slim, but still.

    The funny thing is, if I just try submitting with no CAPTCHA, i get the same word again. :)

  • panzi (unregistered) in reply to El Duderino
    El Duderino:
    A Wizard a True Star:
    So, in which languages do you think Hungarian Notation would actually be useful?
    pI advActually vLove adjHungarian nNotation advSo adjMuch, pI vUse pIt advAll artThe nTime! pIt advSure vMakes nEnglish adjEasier prepTo vUnderstand. vImagine cIf pYou vHad prepTo vRead pThis prepWithout pIt. pYou vWould vHave adjNo nClue advWhat pThese nWords vMeant prepWithout pTheir nParts prepOf nSpeech!
    roflol! :)
  • Doog (unregistered) in reply to Vroomfundel
    Vroomfundel:
    PS I might be hard on John if he is a high school student, but thinking twice - what will a high school student be doing here. Anyway, if we had a "go away if you are < 18" here on TDWTF i would be much more at ease.

    I'm under 18, I just know to keep my mouth shut and not look like a stupid little kid. No one will ever know the difference.

  • (cs) in reply to Sam B
    Sam B:
    But quote honestly, who cares, right?
    honestly
  • Adam (unregistered) in reply to John
    John:
    btw. What's with people saying what the captchas were?

    Don't encourage it. The more you point it out, the more they do it out of spite.

    Uhhh....

    Captcha: genitus. WTF is that? A super-hero with super-genital powers? Or Genitus, the God and Overlord of All Genitals!

  • Franz Kafka (unregistered) in reply to panzi
    panzi:
    Ok, then lets take python. You have a int variable iValue which has the value 2147483647. Now you add 1. What do you get? Right 2147483648L, a variable of the type long. So I don't care what type the variable is, it is some kind of integer. Something that can be used as a integer number. It could even be a complex object, if it emulates integers right. I don't care.

    Why would you call your variable something stupid like iValue? That means nothing. Call it count or amount, or countMsec - that's app-level HN, and it doesn't change when your datatype changes. The whole point of HN is a fairly consistent of naming variables semantically.

  • silent d (unregistered) in reply to Ville
    Ville:
    Sorry, I meant OERN, not ORNE

    This whole thing is just making me ORNEry.

  • oldfraud (unregistered)

    as the old fraud in house m.d. said:

    i'm 21 ... unless it's relevant.

  • (cs) in reply to Adam
    Adam:

    Captcha: genitus. WTF is that? A super-hero with super-genital powers? Or Genitus, the God and Overlord of All Genitals!

    Can I just be god and overlord of all female genitals?

  • Max (unregistered) in reply to Top Cod3r
    Top Cod3r:
    That test reminds me of the test that I personally designed for our department. I purposely tried to make it complex so we could weed out developers who think they know everything but don't. I like to start off with simple questions like the proper use of On Error Resume Next, and the importance of naming your variables with a prefix that tells you what type it is. Then I move on to more complex questions about theory, such as choosing between different application designs, 2-tier, 3-tier, 4-tier and 5-tier (with and without a facade). I then ask them other theory questions, such as "Name 3 disadvantages of the MVC design pattern".

    The last couple years, we have had problems with new developers questioning the code and methodology we use, so I decided to add some real-life questions with some actual code examples from our apps to make sure that they are willing to learn from my code and not think that they know it all.

    WOW. So basically, you know it all, and you hire based on whether or not applicants both agree with you on all things, and are willing to defer to you in all things.

    And you wonder why you have a "problem" with new dev questioning things...

    I'd run screaming from your shop, whether or not you are doing things right.

  • (cs) in reply to Top Cod3r

    So when someone questions your methodologies, you throw some more of your code at them and impart some more of your knowledge? That sounds like a great way to weed out those pesky "know-it-alls"

  • John (unregistered) in reply to mdkess

    1 is the only odd prime number, the rest are just regular primes ... ... ...

  • (cs) in reply to Sam B
    Sam B:

    So, in which languages do you think Hungarian Notation would actually be useful?

    I'd be able to excuse its use in something like C or C++, where even Visual Studio fails in several areas to provide consistent Intellisense.

    Yes but that is a Visual Studio (at least 2005 and prior. Haven't used 2008 so I can't say if MS did anything to improve things) problem not a C/C++ problem. The latest Eclipse has very excellent intellisense for C/C++ projects and very nice refactoring capabilities as well.

  • (cs) in reply to KattMan
    KattMan:
    Can I just be god and overlord of all female genitals?
    Not if you have to ask.
  • Anonymous Cow-orker (unregistered) in reply to Ville
    Ville:
    Or alternatively use a proper programming language where you always know the type and the proper use of "On Error Resume Next" is to never use it.
    So you refer to some language that doesn't have typed variables and doesn't support try catch style semantics?

    BASIC ?

  • (cs) in reply to John
    John:
    1 is the only odd prime number, the rest are just regular primes ... ... ...
    I'm thinking of restarting the debate on the finally keyword. It's not so much a debate, more a matter of me being bashed repeatedly over the head; but I can handle that better than this endless wittering about primes.

    C'mon, people, where's the meat? Access, XML, wooden tables ... there's so much more to life than fucking primes. Or even taking OERN seriously:

    Ville:
    It's interesting to see how many here thinks ORNE is only suitable for hiding errors.

    The only times I've used ORNE are basically something like the following

    On Error Resume Next Open FileToRead for Input as #FileId If Err Then ReturnValue = FAILED_FILE_INACCESSIBLE Exit Sub End If On Error Goto 0

    Sheesh. Man can't even spell FILE_NOT_FOUND properly.

    "Only suitable...?"

    And I'm still trying to get my head around the concept of a weakly-typed language that allows several (presumably distinct) variables with the same name (presumably in the same scope). Brainf*ck has nothing on this.

  • Kev (unregistered)

    I was taking a college class in high school and the professor did all the tests and exams online. He used some 3rd party site that let him make the exam and send give him the results.

    I took a peek at the source and one of the hidden fields had his email address as the place the results should go to. I made some changes to a local copy to include a junk email address of mine and hit submit.

    Not only did it send the results to me, it also told me why I missed each question and gave the correct value. I shared that trick with the students 2 years behind me and it worked for them too.

  • Kev (unregistered) in reply to Kev
    Kev:
    ... He used some 3rd party site that let him make the exam and send give him the results...

    I should have mentioned that it was an english class. Not one of my strong subjects.

  • demon (unregistered) in reply to SNF
    SNF:
    Top Cod3r:
    That test reminds me of the test that I personally designed for our department.

    Truly sir, you are a god among men.

    nah.. he's just "Top Cod3r" :-)

  • Ville (unregistered) in reply to real_aardvark
    real_aardvark:
    Sheesh. Man can't even spell FILE_NOT_FOUND properly.
    Who might you be referring to. And if you don't understand what you read, maybe you shouldn't comment on that particular message.
  • (cs) in reply to Ville
    Ville:
    real_aardvark:
    Sheesh. Man can't even spell FILE_NOT_FOUND properly.
    Who might you be referring to. And if you don't understand what you read, maybe you shouldn't comment on that particular message.
    POINT_NOT_GRASPED
  • Ben (unregistered) in reply to Top Cod3r

    OK, at first I thought this was complete idiocy as well, but reading over it again, I think it is great. Not only is it a good tongue in cheek post for TDWTF, but the trick questions would do a great job at weeding out poor candidates. Here are what I would expect to be the correct response to some of those questions:

    1. Describe the proper use of On Error Resume Next. Answer: Only use it if it is your first VB program ever, and you are just copying and pasting code from a tutorial.

    2. Why is it important to name your variables with a prefix that tells you what type it is? Answer: It's not! Hungarian notation is sloppy and bad coding style.

    3. Some question about a 5-tier design without a facade that should have a facade. Answer: You should probably use a facade. [Code example of improvement]

    I would guess that they had problems with people questioning the methodology they use since the applicants didn't realize these are trick questions and think that they actually use OERN, Hungarian notation, and complex 5-tier designs that should have facades but don't.

  • Andy L. (unregistered)

    "When would you use 'On Error Resume Next'?" "About three in the morning."

  • (cs) in reply to El Duderino
    El Duderino:
    A Wizard a True Star:
    So, in which languages do you think Hungarian Notation would actually be useful?
    pI advActually vLove adjHungarian nNotation advSo adjMuch, pI vUse pIt advAll artThe nTime! pIt advSure vMakes nEnglish adjEasier prepTo vUnderstand. vImagine cIf pYou vHad prepTo vRead pThis prepWithout pIt. pYou vWould vHave adjNo nClue advWhat pThese nWords vMeant prepWithout pTheir nParts prepOf nSpeech!

    nThat vIs advAwesome.

  • Dan (unregistered)

    Sometimes this is a comment and sometimes it's not.

  • Lyle (unregistered)

    Lyle would have scored 100%.

  • (cs) in reply to Ville
    Ville:
    real_aardvark:
    Sheesh. Man can't even spell FILE_NOT_FOUND properly.
    Who might you be referring to. And if you don't understand what you read, maybe you shouldn't comment on that particular message.
    To whom might you be referring? Up with ignorance I will not put.

    FTFY.

    /Grammar Nazi

    PS Can we get back to finally now?

  • (cs) in reply to Code Dependent
    Code Dependent:
    Ville:
    real_aardvark:
    Sheesh. Man can't even spell FILE_NOT_FOUND properly.
    Who might you be referring to. And if you don't understand what you read, maybe you shouldn't comment on that particular message.
    POINT_NOT_GRASPED
    Agreed!

    The ONE time where fnf would have actually made great sense and a great pun...

    sigh

  • (cs)

    Sorry, I guess after all other angles have been depleted I'll come in from the grammar angle...

    "Perusing through it"

    You meant "leafing through it" or "reading through it", in the $3 word category, just stick with "perusing it".

  • (cs) in reply to Mr.J

    I'm already sorry I posted the rant. It's late. Pre-apologies?

  • (cs) in reply to nikki9696
    nikki9696:
    El Duderino:
    A Wizard a True Star:
    So, in which languages do you think Hungarian Notation would actually be useful?
    pI advActually vLove adjHungarian nNotation advSo adjMuch, pI vUse pIt advAll artThe nTime! pIt advSure vMakes nEnglish adjEasier prepTo vUnderstand. vImagine cIf pYou vHad prepTo vRead pThis prepWithout pIt. pYou vWould vHave adjNo nClue advWhat pThese nWords vMeant prepWithout pTheir nParts prepOf nSpeech!

    nThat vIs adv^HjAwesome.

    FTFY also.

    Incidentally, Hungarian Notation would be a seriously bad idea for Magyar. And the only advantage to the damn language is that it's trivial to pronounce (much like Turkish, if I may be permitted to start a small and obscure flame war over asiatic languages).

    I'm sure that nCharles_ pnSimonyi would agree with me on this one.

  • Dice (unregistered) in reply to John

    e^(pi*i) = -1

    It drops right out of Euler's formula. It freaked me out too when I first saw it when I was 17, coming across it in an essay by Arthur C. Clarke (IIRC). By the time I was 19, taking a 2nd year linear algebra course, it was blindingly straightforward. Wikipedia has a really good page on it, actually.

    Cheers!

  • (cs)

    Has anybody else spotted the error in logic that those who are defending Hungarian notation are using? They argue that Hungarian notation is required because that there are IDEs that do not allow you to mouse over a variable and see what type it is. Another user then mentioned that there is a name renaming dilemma that arises when you change the variable's type. In response, they state that any good IDE will allow you to quickly and easily rename all instances of that variable within seconds. In order for this to be a valid argument, they would have to assume that anybody using Hungarian notation does not have access to an IDE that will tell you the variable's type upon mouse over, but which tracks each instance of the variable nonetheless, so that it can easily be changed to a different name should it be required.

    This brings your number of possible uses of Hungarian notation down to an extreme niche market, in only those who are using IDEs that are of a very exact specification, one which is extremely unlikely to exist.

  • (cs) in reply to zip
    zip:
    Top Cod3r:
    I like to start off with simple questions like the proper use of On Error Resume Next, and the importance of naming your variables with a prefix that tells you what type it is.

    This might be the best troll I've ever seen here.

    Yes, it was awesome! I almost started pointing out the flaws when I realized... it's too bad to be true, and then read a few comments.

    Nice job!

  • (cs) in reply to pyro789x
    pyro789x:
    Has anybody else spotted the error in logic that those who are defending Hungarian notation are using? *snip*
    Pass that bowl.
  • Dan (unregistered)

    Not to pick on anyone, but the point of Hungarian notation is NOT to tell you the type of a variable, such as int, long, unsigned, etc. It is to identify some other aspect of the use of that variable. For example, you could have an unsafe variable (string, int, whatever) identified by uVar1. This would let you know, by looking right at it, that setting safe variable sVar1 = uVar1 is wrong because you haven't done anything to make it safe, regardless of what it means to be safe.

    It seems that most here are referring to MS Apps Hungarian Notation, which is wrong because it has you identify the explicit type and there really isn't any need for that.

  • Sann B (unregistered) in reply to Sam B
    Sam B:
    Eam:
    What about the point where one fails to detect satire or sarcasm, consistently?

    Well, this being the Internet, where it's already difficult to detect satire or sarcasm, one must make an "extra effort", as it were, to ensure that people get your point.

    Would I be right in saying that you, and anyone else, who failed to notice the sarcasm are American? Or some other breed of dumbass? The ideas that he's espousing are so obviously ridiculous that I am embarassed for you. Please try harder next time. The internet is not such serious business.

  • Franz Kafka (unregistered) in reply to pyro789x
    pyro789x:
    Has anybody else spotted the error in logic that those who are defending Hungarian notation are using? They argue that Hungarian notation is required because that there are IDEs that do not allow you to mouse over a variable and see what type it is.

    That would be all of them. Sure, that variable is an int, but so what? Proper HN is about conveying what it represents, and that's something semantic, not 'int'.

  • A Wizard a True Star (unregistered) in reply to nikki9696
    nikki9696:
    El Duderino:
    A Wizard a True Star:
    So, in which languages do you think Hungarian Notation would actually be useful?
    pI advActually vLove adjHungarian nNotation advSo adjMuch, pI vUse pIt advAll artThe nTime! pIt advSure vMakes nEnglish adjEasier prepTo vUnderstand. vImagine cIf pYou vHad prepTo vRead pThis prepWithout pIt. pYou vWould vHave adjNo nClue advWhat pThese nWords vMeant prepWithout pTheir nParts prepOf nSpeech!

    nThat vIs advAwesome.

    Sorry, but just because you can abuse a programming practice doesn't make it useless.

  • pong (unregistered)

    i love all the people who want a programmer who doesn't know how to program. go ahead. Hire your 'out of the box thinker'. i'd ask for someone who's not a self-admitted novice.

  • Bob (unregistered)

    And here I was thinking we were going to get a story about diapers. That would have been a treat.

  • A Wizard a True Star (unregistered) in reply to Dan
    Dan:
    Not to pick on anyone, but the point of Hungarian notation is NOT to tell you the type of a variable, such as int, long, unsigned, etc. It is to identify some other aspect of the use of that variable. For example, you could have an unsafe variable (string, int, whatever) identified by uVar1. This would let you know, by looking right at it, that setting safe variable sVar1 = uVar1 is wrong because you haven't done anything to make it safe, regardless of what it means to be safe.

    I think there's one article on the net that recommends using Hungarian for the safe/unsafe notation. I've read it too. Problem is, no one has actually implemented that in the real world, as far as I've seen. So prefixing your variables with "u" and "s" are more likely to cause your co-workers to go WTF, because they'll have no clue what it means unless you explain it. You'd be better off calling your variables "SafeVar1" and "UnsafeVar1".

    On the other hand, prefixing variables with the data type is a pretty common practice. Other programmers are far more likely to intuitively know that a variable called "sXml" contains an XML string. Sure, you could call it "XmlString" instead of "sXml" but the latter is at least closer to some sort of standard.

  • Hungarian (unregistered) in reply to A Wizard a True Star
    A Wizard a True Star:
    On the other hand, prefixing variables with the data type is a pretty common practice. Other programmers are far more likely to intuitively know that a variable called "sXml" contains an XML string. Sure, you could call it "XmlString" instead of "sXml" but the latter is at least closer to some sort of standard.

    Or, call it s because it's a string. If s us used, move on to t, or s1, etc.

  • A Gould (unregistered) in reply to Sam B
    Sam B:
    Well, I assume since you talk about On Error Resume Next, you're talking about VB. While I can't ever think of a situation you'd use "OERN" in VB (after all, ignoring errors is not the way to solve the problem),

    Not saying this is a Good Idea or not, but I generally see it recommended for primitive error-catching

    On Error Resume Next (do something questionable here) If (err.number) Then (bail yourself out) End If

    I've used the construct a few times, but then, I'm using VBA in a non-programming environment (read: hack macros together as time-savers, not Professional Software Development), so take it as you will.

  • (cs) in reply to Dan
    Dan:
    Not to pick on anyone, but the point of Hungarian notation is NOT to tell you the type of a variable, such as int, long, unsigned, etc. It is to identify some other aspect of the use of that variable. For example, you could have an unsafe variable (string, int, whatever) identified by uVar1. This would let you know, by looking right at it, that setting safe variable sVar1 = uVar1 is wrong because you haven't done anything to make it safe, regardless of what it means to be safe.

    It seems that most here are referring to MS Apps Hungarian Notation, which is wrong because it has you identify the explicit type and there really isn't any need for that.

    Aw, go on. Pick on someone, or somebody.

    What was your point, again?

Leave a comment on “It Depends & Too Good To Be True”

Log In or post as a guest

Replying to comment #:

« Return to Article