• Norman D. Landing (unregistered) in reply to frits
    frits:
    The_Assimilator:
    TRWTF is not using System.Diagnostics.Stopwatch.
    Check that out! Thanks. I learned something new today. :)
    Sorry 'bout that. Learning is not appreciated here at TDWTF.
  • (cs) in reply to jb

    Combining the comment to two comments on my original comment:

    Severity One:
    You mean, like Java? This
        if( x!=0 & 4/x>1 )
    is perfectly valid Java. It will also throw an exception if x=0.

    Possibly, there are instances where this comes in useful, but I can't think of any.

    Boog said:

    boog:
    Isn't & a bitwise operator in Java? I don't think it was ever intended to be used as a non-short-cut boolean "AND".

    Or were you joking?

    I didn't know it either until a few weeks ago, but Java has five Boolean operators: &&, ||, &, | and ^.

    Then JB said:

    jb:
    you can't think of any instances where it is useful to have both logical and bitwise 'AND' as programming constructs?

    this was about the only comment in this thread which looked interesting.. so I'm curious to actually understand what you are meaning here.

    & in Java is a Boolean operator when used with two Boolean expressions, and a bit-wise operator when used with integral types (byte, short, int, long). As I said, I didn't know either until a few weeks ago.

    The & and | Boolean operators always evaluate both parts of the expression, similar to the ^ (exclusive-or) operator.

    There's a bit of a story about how this came along. We have an API to send SMS messages, but you don't want to send a message to a customer in the middle of the night, so there's a 'daytime only' flag.

    Now, you would imagine that night time starts somewhere in the evening, and ends somewhere in the morning of the next day. Not so according to our support people: they insisted that we, developers, program in the option that begin and end times of 'night time' are during the same day. Obviously, this will muck up any code that incorrecty assumes that the start time of 'night time' on a 24 hour clock is later than end time.

    So a piece of code was written, with nested if-statements, and when I was maintaining the code, I decided it could be made more efficient. So this is what came out of that:

         boolean isNightTime = ( start <= hour ^ hour < end ) ^ ( start < end );
         boolean advanceDate = start <= hour && end < start;

    (In this example, 'hour' is the current hour of the day; 'start' and 'end' are start and end times of night time.)

    One could argue that this is far from readable, and one would be absolutely right. But is is an interesting use of operators that you would normally hardly ever use.

    Despite some shortcomings, Java is a nifty little language.

  • dargor17 (unregistered) in reply to Severity One

    Isn't it easier to check if it is daytime, where "start" and "end" time are in the same day etc, and then say isNightTime = !isDayTime? Or am I missing something?

  • (cs) in reply to Severity One
    Severity One:

    So a piece of code was written, with nested if-statements, and when I was maintaining the code, I decided it could be made more efficient. So this is what came out of that:

         boolean isNightTime = ( start <= hour ^ hour < end ) ^ ( start < end );
         boolean advanceDate = start <= hour && end < start;

    (In this example, 'hour' is the current hour of the day; 'start' and 'end' are start and end times of night time.)

    One could argue that this is far from readable, and one would be absolutely right. But is is an interesting use of operators that you would normally hardly ever use.

    Despite some shortcomings, Java is a nifty little language.

    I wouldn't surprise myself by ending up with statements like that either, except I would have used != instead of ^.

  • (cs) in reply to dargor17
    dargor17:
    Isn't it easier to check if it is daytime, where "start" and "end" time are in the same day etc, and then say isNightTime = !isDayTime? Or am I missing something?
    Start and end times are just hours on a 24 hour clock. They don't carry any date information.

    It's best to write a truth table to figure out how it works; that's what I had to do.

    Watson:
    I wouldn't surprise myself by ending up with statements like that either, except I would have used != instead of ^.
    Yep, works just as well.
  • Obsessive Comment Reader (unregistered) in reply to Anon
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

  • Anon (unregistered) in reply to Obsessive Comment Reader
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.

  • Anon (unregistered) in reply to Bu Wai....
    Bu Wai....:
    Obsessive Comment Reader:
    Reading comments gets blocked by my company.
    If ReadingThemGetsBlocked Then HowTheHellDoYouManageToPost EndIf
    You must be stupid too.
  • Anon (unregistered) in reply to Anon
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

  • (cs) in reply to Dave
    Dave:
    Extra bonus:

    Most people don't know that, but the comma ("," in the US) is a ";" instead in Germany.

    (according to Excel)

    In European languages (except English obviously), "," is used as decimal separator. If you have such a locale, Excel uses ";" as argument separator.

    Most of the time, this works transparent and if you switch between different versions of Excel, it does the right thing.

    It gets annoying when you're working with CVS files: Excel expects either ',' or ';' as field separator and there is no easy way to switch.

  • Obsessive Comment Reader (unregistered) in reply to Anon
    Anon:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

    I can't edit history, so here goes:

    Anon:
    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.

    I didn't read the other post that you posted, but the fact that you posted both makes you look even dumber than you thought before. Lets see if I can make it MORE obvious your fail. What server am I using? The companies? Clearly no, or I wouldn't have access.

    Also, where did I say you were wasting time?

    Do you believe in aliens?

  • ted (unregistered) in reply to Coyne
    Coyne:
    My favorite line avoids calling Trim; instead using two calls to do the same thing:
    trimmedStr = LTrim(RTrim(StrVal))
    Whoever wrote this must have been being paid per function call.

    This is called "what happens when DBAs try to write VB," since SQL Server only has RTrim/LTrim and not Trim.

  • Anon (unregistered) in reply to Obsessive Comment Reader
    Obsessive Comment Reader:
    What server am I using? The companies? Clearly no, or I wouldn't have access.

    Yeah, I know.

  • (cs) in reply to Someone who can't be bothered to login from work
    Someone who can't be bothered to login from work:
    Yazeran:
    K:
    Bonus:

    Most people don't know that, but the numeric separator ("." in the US) is a "," instead in Germany. Oh how much fun this is!

    Actually, quite a few applications do not know that the meaning of , and . is swapped in German (and in Danish by the way), that's why I always set my computers to use US numeric system . for decimal point as opposed to , as is the 'official' Danish way....

    Yazeran

    Plan: To go to Mars one day with a hammer.

    Fortunately .NET does know this. Although it still requires the developer to write their code in such a way as to to take advantage of this.

    In the case of Decimal.Parse() or Decimal.TryParse() it requires you to use an overload that takes an IFormatProvider that contains the culture specific formatting rules - which if you're lucky will be CultureInfo.CurrentCulture or CultureInfo.CurrentUICulture, otherwise you need to use CultureInfo.GetCultureInfoByIetfLanguageTag()to grab it.

    Sure, and so does C++, but the problem is not the development platform/language, but the programmers. They apparently only thinks that their programs will ever be used in the US....

    Yazeran

    Plan: To go to Mars one day with a hammer

    Addendum (2011-06-21 10:01): Slight error, it should have been: they apparently thinks that their programs will only be used in the US..

  • HP PhaserJet (unregistered) in reply to Obsessive Comment Reader
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait. Let's see if I understand - do you get every (almost every, not the Darth Vader one apparently) but almost every comment emailed to you? Don't you have an inbox or a folder with hundreds of items in it?

    I didn't know you could sign up for that, but then again, why would you?

  • Pr0gramm3r (unregistered) in reply to Obsessive Comment Reader
    Obsessive Comment Reader:
    Anon:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

    I can't edit history, so here goes:

    Anon:
    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.

    I didn't read the other post that you posted, but the fact that you posted both makes you look even dumber than you thought before. Lets see if I can make it MORE obvious your fail. What server am I using? The companies? Clearly no, or I wouldn't have access.

    Also, where did I say you were wasting time?

    Do you believe in aliens?

    [image]
  • HP PhaserJet (unregistered) in reply to Pr0gramm3r
    Pr0gramm3r:
    Obsessive Comment Reader:
    Anon:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

    I can't edit history, so here goes:

    Anon:
    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.

    I didn't read the other post that you posted, but the fact that you posted both makes you look even dumber than you thought before. Lets see if I can make it MORE obvious your fail. What server am I using? The companies? Clearly no, or I wouldn't have access.

    Also, where did I say you were wasting time?

    Do you believe in aliens?

    [image]

    TRWTF is no one else figured out it out either. At least 2 other guys I read were wondering how he was posting. Amazing.

  • (cs) in reply to HP PhaserJet
    HP PhaserJet:
    TRWTF is no one else figured out it out either. At least 2 other guys I read were wondering how he was posting. Amazing.

    They're called trolls. They are usually bored, stupid children living at home with access to the internets. Like their own parents and loved ones have discovered, if you ignore them enough, eventually they stop bothering you.

    Don't feed the tards.

  • HP PhaserJet (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    HP PhaserJet:
    TRWTF is no one else figured out it out either. At least 2 other guys I read were wondering how he was posting. Amazing.

    They're called trolls. They are usually bored, stupid children living at home with access to the internets. Like their own parents and loved ones have discovered, if you ignore them enough, eventually they stop bothering you.

    Don't feed the tards.

    That's the problem I have with the internet. How do you tell tards from trolls from normal people? They all sound the same.

  • (cs) in reply to HP PhaserJet
    HP PhaserJet:
    C-Octothorpe:
    HP PhaserJet:
    TRWTF is no one else figured out it out either. At least 2 other guys I read were wondering how he was posting. Amazing.

    They're called trolls. They are usually bored, stupid children living at home with access to the internets. Like their own parents and loved ones have discovered, if you ignore them enough, eventually they stop bothering you.

    Don't feed the tards.

    That's the problem I have with the internet. How do you tell tards from trolls from normal people? They are same.

    FTFY

    :)

  • (cs) in reply to Severity One
    Severity One:
    I didn't know it either until a few weeks ago, but Java has five Boolean operators: &&, ||, &, | and ^.

    & in Java is a Boolean operator when used with two Boolean expressions, and a bit-wise operator when used with integral types (byte, short, int, long).

    Interesting. I thought maybe Java was coercing booleans to ints in order to perform the bitwise operations. Nope, turns out Java doesn't coerce booleans to ints; it just has boolean support for bitwise operators (essentially making them logical operators). Good to know.

    Thanks!

  • no u (unregistered) in reply to Severity One
    Severity One:
    & in Java is a Boolean operator when used with two Boolean expressions, and a bit-wise operator when used with integral types (byte, short, int, long). As I said, I didn't know either until a few weeks ago.

    This makes perfect sense when considering that java is built on a 'C' style background where false = zero and true = non-zero. Where this is the case, it would be a bitwise AND.

  • (cs) in reply to dargor17
    dargor17:
    Isn't it easier to check if it is daytime, where "start" and "end" time are in the same day etc, and then say isNightTime = !isDayTime? Or am I missing something?
    Take a look at it again:
    boolean isNightTime = ( start <= hour ^ hour < end ) ^ ( start < end );
    Notice the comparison between start and end on the right. This means it's coded to handle either situation (with start in the evening and end the next morning, or with start and end in the same 24 hour period).

    So you could define "isDayTime", but it wouldn't be any easier.

  • ted (unregistered) in reply to Pr0gramm3r
    Pr0gramm3r:
    Obsessive Comment Reader:
    Anon:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

    I can't edit history, so here goes:

    Anon:
    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.

    I didn't read the other post that you posted, but the fact that you posted both makes you look even dumber than you thought before. Lets see if I can make it MORE obvious your fail. What server am I using? The companies? Clearly no, or I wouldn't have access.

    Also, where did I say you were wasting time?

    Do you believe in aliens?

    [image]

    I didn't even read the text on the image and knew it was some fag linking the special olympics poster. It's not clever. It's not funny. Just the word "retard" with an image under it and the short, useless, one sentence post was all I needed to know that you were linking the image where the athletes iteratively one-up each other on how they win the special olympics.

    These comments were to read when this site came out. It's even funny when clicking on the Random Article button on this site and reading them. It's NOT funny when someone links to an image in a one-sentence post and thinks they're so fucking clever to have discovered the special olympics.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Fuck off. You're not clever.

  • Pr0gramm3r (unregistered) in reply to ted
    ted:
    Pr0gramm3r:
    Obsessive Comment Reader:
    Anon:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

    I can't edit history, so here goes:

    Anon:
    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.

    I didn't read the other post that you posted, but the fact that you posted both makes you look even dumber than you thought before. Lets see if I can make it MORE obvious your fail. What server am I using? The companies? Clearly no, or I wouldn't have access.

    Also, where did I say you were wasting time?

    Do you believe in aliens?

    [image]

    I didn't even read the text on the image and knew it was some fag linking the special olympics poster. It's not clever. It's not funny. Just the word "retard" with an image under it and the short, useless, one sentence post was all I needed to know that you were linking the image where the athletes iteratively one-up each other on how they win the special olympics.

    These comments were to read when this site came out. It's even funny when clicking on the Random Article button on this site and reading them. It's NOT funny when someone links to an image in a one-sentence post and thinks they're so fucking clever to have discovered the special olympics.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Fuck off. You're not clever.

    You try that same troll every time someone posts a picture, it didn't work then it won't work now.

  • (cs) in reply to Pr0gramm3r
    Pr0gramm3r:
    You try that same troll every time someone posts a picture, it didn't work then it won't work now.

    Um, it just worked... Dummy.

  • Marvin the Martian (unregistered) in reply to Meep
    Meep:
    Marvin the Martian:
    What's next? "Canonical Ruby-on-rails"? "Ancient Python"?
    Python was first released in '94, is not old school. Perl is getting there, released in '87. Ruby, by comparison, first became public in '93.
    Ruby On Rails is from 2005.
  • (cs) in reply to Marvin the Martian

    Ruby is a programming language that appeared in '95, RoR is a framework for ruby which reared it's ugly head in 2005... Google is your friend.

  • QJo (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Ruby is a programming language that appeared in '95, RoR is a framework for ruby which reared it's ugly head in 2005... Google is your friend.

    No quack.

  • Joe (unregistered) in reply to Anon

    Wait, you have to read the comments in order to spout off some silly nonsense in reply?

    I'm sorry, I thought this was the internet. I'll move along.

    --Joe

  • Jay (unregistered) in reply to trtrwtf
    trtrwtf:
    Jay:
    trtrwtf:
    You know, I've never known a joke that was improved by arguing over whether it was funny or not.

    If you tell a joke and the other person doesn't laugh, and then you explain to them why it's funny, logically, now they should laugh. Retroactively.

    Does that ever work for you? Anyway, they're not explaining the joke, they're arguing about whether it was funny. Pure Td, if you ask me.

    My comment was intended to be a joke. You see, it's funny because I calmly state as true something that is obviously false. Of course in real life no one is going to laugh at a joke that needs to be explained. This introduces irony, and irony is one form of humor.

    So now that I've explained the joke, you're laughing. Right?

  • (cs) in reply to Jay

    I'm laughing my arse off, but thats because I suffer from a condition.

  • Dan (unregistered)

    I don't know if this has been mentioned (I haven't read all the comments), but SeiginoRaikou is completely wrong. Double.TryParse does not just use Parse with a try/catch. Just reading the documentation for Double.TryParse makes that pretty clear, but also if you open up the code in .NET Reflector, you can see how it actually works and notice that at no time is there any try/catch code or any code that throws an exception.

    So, basically SeiginoRaikou, you've reinvented the wheel for no reason and completely misunderstood why Microsoft included TryParse in the first place.

  • Zebedee (unregistered) in reply to Pr0gramm3r
    Pr0gramm3r:
    Obsessive Comment Reader:
    Anon:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Anon:
    Obsessive Comment Reader:
    Double Vader:
    boog:
    Aether:
    WC:
    If you're going to Doubleize something, you have to do it twice. Duh.
    Wouldn't that Quadrupleize it?
    Obviously they need to quadrupleize it.
    I am doubling the size. Pray I do not double any further.
    I get these comments sent to my email automatically, and this one got sent to spam :(
    Wait a minute - you get all comments sent to your email or just Darth Vader one's?

    Either way - WTF?

    Reading comments gets blocked by my company.

    'nuff said.

    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.
    Wow. Major IT fail. I don't know how your twisted little mind came to the conclusion that I did not have browser access to the comments but I somehow magically had access through programmatic means. You obviously believe in magic. I don't post comments much, but man, how dumb do you have to be?

    Don't answer that. Back away from the computer and never touch a keyboard again.

    I don't know why I said that. If you can read the comments, why have them e-mailed? If you can't read the comments, how are you posting? If you are posting, you're doing it somehow... I have no idea how.
    I said this earlier: "More likely he can get to the Post Comments-page but, not the View Comments page.

    Or he can reply to comments by e-mail. "

    I think you have constructed a strawman, you imagined my thought process as something incredibly stupid and then castigated me for it. It doesn't at all reflect on my competence, more so on your ability to evaluate it.

    I hope you don't do interviews.

    I can't edit history, so here goes:

    Anon:
    Awesome - so instead of letting you look at comments, you get emailed every single one causing unnecessary server use and then come one here to talk to me about it wasting time.

    I didn't read the other post that you posted, but the fact that you posted both makes you look even dumber than you thought before. Lets see if I can make it MORE obvious your fail. What server am I using? The companies? Clearly no, or I wouldn't have access.

    Also, where did I say you were wasting time?

    Do you believe in aliens?

    [image]

    Why do inane frist posts and banal trolling get deleted when something as offensive as this survive the censor?

  • Anon (unregistered) in reply to You don't say!!!

    I'd agree with all of the above: VB seems to have tied itself up in knots maintaining backwards compatibility whilst adding useful features from other languages.

    Lazy evaluation can be very useful, not just for avoiding unnecessary expensive evaluations, but also for avoiding illegal evaluations, e.g.:

    if (p == NULL || *p == '\0')

    On the whole, I'm not sure that introducing lazy evaluation to VB was sensible. Most of the time, lazy evaluation is appropriate, and where it isn't, code is usually more readable if refactored anyway. The problem is that VB code then ends up littered with OrElse and AndAlso, which is hardly readable, especially when it starts getting mixed with Or and And as a result of different programmers, and you have to start deciding whether the non-lazy version was a deliberate choice, or just an accident.

    I've not used VB for quite some time, finding C or Perl very well suited to my needs, and I've certainly not missed it!

  • (cs) in reply to SeiginoRaikou
    SeiginoRaikou:
    HP PhaserJet:
    Maybe I was confused, the function doesn't look like
    if(myString.IsNumeric())
        double d = Double.Parse(myString);
    
    - the use case does.

    But then aren't you parsing the double twice? One pass to validate it for parsing and then another to actually parse it.

    Was showing how we do it- the use case is a little different from the WTF, but taking 2 passes on the string is still faster than catching a FormatException from Double.Parse

    Others have expressed doubt about that, but even if mathematically it's true, doesn't it matter what context it's run in? If it executes on 100000 "inputs" and only, say, 5 throw an error, are you still better off having done 2 parses 99995 times? (IOW, if you have reasonable expectation of clean input that's one thing. If it's part of an app to clean up data from a known often-dirty source, that's another thing, amirite?)

  • (cs) in reply to trtrwtf
    trtrwtf:
    Marvin the Martian:
    "Classic ASP"?

    Pff... I'm getting old. What's next? "Canonical Ruby-on-rails"? "Ancient Python"?

    I was just called "old-school" this morning because I asked my boss to put perl or python onto the svn server so I can autogenerate the documents on a commit. Perl, I could sort of understand, but python? Yeah, python's old-school to him...

    My brother-in-law's going to The New School. Python is very definitely not new school. While they don't have a computer school, per se, it's quite clear they have a definite policy against any computer stuff that works reliably. As such, both perl and python are clearly right out.

Leave a comment on “Doubleizing”

Log In or post as a guest

Replying to comment #:

« Return to Article