Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. if brainfart then loop

if brainfart then loop

Scheduled Pinned Locked Moved The Weird and The Wonderful
questionannouncement
8 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BotCar
    wrote on last edited by
    #1

    Just saw this in a colleague's code:

    for (int i = 0; i < 2; i++)
    {
    if (i < 1)
    {
    // Some code
    }
    else if (i > 0)
    {
    // Some code
    }
    }

    and a little further down:

    for (int i = 0; i < 2; i++)
    {
    if (i < 1)
    {
    // Some code
    }
    else
    // Some code
    }

    What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.

    D F C 3 Replies Last reply
    0
    • B BotCar

      Just saw this in a colleague's code:

      for (int i = 0; i < 2; i++)
      {
      if (i < 1)
      {
      // Some code
      }
      else if (i > 0)
      {
      // Some code
      }
      }

      and a little further down:

      for (int i = 0; i < 2; i++)
      {
      if (i < 1)
      {
      // Some code
      }
      else
      // Some code
      }

      What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Has he done some kind of operator overloading and is now laughing at your post?

      1 Reply Last reply
      0
      • B BotCar

        Just saw this in a colleague's code:

        for (int i = 0; i < 2; i++)
        {
        if (i < 1)
        {
        // Some code
        }
        else if (i > 0)
        {
        // Some code
        }
        }

        and a little further down:

        for (int i = 0; i < 2; i++)
        {
        if (i < 1)
        {
        // Some code
        }
        else
        // Some code
        }

        What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.

        F Offline
        F Offline
        Freak30
        wrote on last edited by
        #3

        And there is no code outside of the if/else construct that runs in both executions of the loop body? Maybe at some time there was such code and it was removed later.

        The good thing about pessimism is, that you are always either right or pleasently surprised.

        B 1 Reply Last reply
        0
        • B BotCar

          Just saw this in a colleague's code:

          for (int i = 0; i < 2; i++)
          {
          if (i < 1)
          {
          // Some code
          }
          else if (i > 0)
          {
          // Some code
          }
          }

          and a little further down:

          for (int i = 0; i < 2; i++)
          {
          if (i < 1)
          {
          // Some code
          }
          else
          // Some code
          }

          What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.

          C Offline
          C Offline
          Charan_Kumar
          wrote on last edited by
          #4

          without viewing his full code you cant judge him.. :omg:

          K P 2 Replies Last reply
          0
          • C Charan_Kumar

            without viewing his full code you cant judge him.. :omg:

            K Offline
            K Offline
            Keith Barrow
            wrote on last edited by
            #5

            I'm curious, under what circumstances would you find the code the OP posted reasonable?

            PB 369,783 wrote:

            I just find him very unlikeable, and I think the way he looks like a prettier version of his Mum is very disturbing.[^]

            I 1 Reply Last reply
            0
            • F Freak30

              And there is no code outside of the if/else construct that runs in both executions of the loop body? Maybe at some time there was such code and it was removed later.

              The good thing about pessimism is, that you are always either right or pleasently surprised.

              B Offline
              B Offline
              BotCar
              wrote on last edited by
              #6

              Maybe. The guy that wrote it told me that he was playing around with the code, testing out a few ideas to deal with a bug. It's quite possible that this weirdness is a leftover of that.

              What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.

              1 Reply Last reply
              0
              • K Keith Barrow

                I'm curious, under what circumstances would you find the code the OP posted reasonable?

                PB 369,783 wrote:

                I just find him very unlikeable, and I think the way he looks like a prettier version of his Mum is very disturbing.[^]

                I Offline
                I Offline
                irneb
                wrote on last edited by
                #7

                Keith Barrow wrote:

                I'm curious, under what circumstances would you find the code the OP posted reasonable?

                When the intent of the code is to find itself on Weird-and-Wonderful perhaps? ;P

                1 Reply Last reply
                0
                • C Charan_Kumar

                  without viewing his full code you cant judge him.. :omg:

                  P Offline
                  P Offline
                  phil o
                  wrote on last edited by
                  #8

                  Oh yes, we can :)

                  [Flags]
                  public enum Bool {
                  True,
                  False,
                  ForSure,
                  Maybe,
                  ProbablyNot,
                  Depends,
                  NotDecidedYet,
                  Undefined
                  }

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups