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. The Lounge
  3. The Anti-If Campaign

The Anti-If Campaign

Scheduled Pinned Locked Moved The Lounge
csharpc++comannouncement
46 Posts 27 Posters 2 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.
  • N Nemanja Trifunovic

    harold aptroot wrote:

    So instead of if (something) { ... } We now write switch (something) { case true: ... break; default: break; } Or something like that?

    Worse than that - they advocate using polymorphism instead of control structures.

    utf8-cpp

    C Offline
    C Offline
    CPallini
    wrote on last edited by
    #13

    Nemanja Trifunovic wrote:

    Worse than that - they advocate using polymorphism instead of control structures.

    There's nothing wrong: Microsoft is doing it since '92, with MFC, ...oooops :-D On the serious side, (IMHO) there's really nothing wrong in using polymorphism instead of control structures when the OOP nature of the project naturally leads to. :)

    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
    [My articles]

    1 Reply Last reply
    0
    • N Nemanja Trifunovic

      Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

      utf8-cpp

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #14

      Most developers have no understanding of Object Oriented programming beyond the text book definition. There are some great things you can do with correctly designed OO. One really neat pattern is the Null object pattern so instead of checking for null when you call a method you have a predefined action already established on null. But then I am a dreamer.

      Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      C B U M P 5 Replies Last reply
      0
      • N Nemanja Trifunovic

        Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

        utf8-cpp

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #15

        soon, the only people who knows how computers actually work will be the people who write compilers.

        image processing toolkits | batch image processing

        C 1 Reply Last reply
        0
        • N Nemanja Trifunovic

          Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

          utf8-cpp

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #16

          [quote] The perfect gift for programmers who decide to quit using IFs Price: € 20.00 (+20% VAT) + Shipping Minimum quantity: 5 T-Shirts ... Quantity (one size) [/quote]

          If (size != yourSize)
          { you_have_110€+_less = true;
          you_are_fucked_up = true;
          ]

          :laugh: :laugh: EDIT: I just saw the slogan at the bottom of this part[^]: "Anti-If Campaign you can quit if you want to join us" :doh: :doh: :doh:

          Regards. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpfull answers is nice, but saying thanks can be even nicer.

          modified on Monday, January 4, 2010 3:28 PM

          B 1 Reply Last reply
          0
          • C Christopher Duncan

            :omg: They exploit shape shifting parrots? Does PETA know about this?

            Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services

            J Offline
            J Offline
            Jim Crafton
            wrote on last edited by
            #17

            Rumor has it that the parrots are kept in the same bunker that Dick Cheney is staying in and that both receive a healthy supply of crackers for good behavior.

            ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

            R 1 Reply Last reply
            0
            • realJSOPR realJSOP

              Nemanja Trifunovic wrote:

              Now, I am thinking of starting an "anti-for" one;

              How about just starting with an anti-absurdity movement?

              .45 ACP - because shooting twice is just silly
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

              J Offline
              J Offline
              Jim Crafton
              wrote on last edited by
              #18

              That would cause the internet to implode. Too bad, it's a good idea! :)

              ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

              1 Reply Last reply
              0
              • S Single Step Debugger

                Nemanja Trifunovic wrote:

                Worse than that - they advocate using polymorphism instead of control structures.

                WTF? Ask them to implement a simple calculator using their polymorphism. Apart from been stupid this is not something new, we have predicates and the PROLOG from decades and if the memory serves, there is no conditional statements in this language.

                The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

                OriginalGriffO Offline
                OriginalGriffO Offline
                OriginalGriff
                wrote on last edited by
                #19

                Never mind a calculator - implement a coin toss simulator for who goes first in a football match!

                All those who believe in psycho kinesis, raise my hand.

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                B 1 Reply Last reply
                0
                • C Chris Losinger

                  soon, the only people who knows how computers actually work will be the people who write compilers.

                  image processing toolkits | batch image processing

                  C Offline
                  C Offline
                  CPallini
                  wrote on last edited by
                  #20

                  Come in here, dear boy, have a cigar: you don't need to know how the machine actually works to write a compiler for our managed language. :-D

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  1 Reply Last reply
                  0
                  • E Ennis Ray Lynch Jr

                    Most developers have no understanding of Object Oriented programming beyond the text book definition. There are some great things you can do with correctly designed OO. One really neat pattern is the Null object pattern so instead of checking for null when you call a method you have a predefined action already established on null. But then I am a dreamer.

                    Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                    C Offline
                    C Offline
                    CPallini
                    wrote on last edited by
                    #21

                    Ennis Ray Lynch, Jr. wrote:

                    One really neat pattern is the Null object pattern so instead of checking for null when you call a method you have a predefined action already established on null.

                    Arguing the usefulness of such an object in OOP looks like arguing about the empty-set in set theory. However it really depends on the (project) context if you really need an Object Oriented approach or not. :)

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                    [My articles]

                    1 Reply Last reply
                    0
                    • N Nemanja Trifunovic

                      Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

                      utf8-cpp

                      T Offline
                      T Offline
                      thrakazog
                      wrote on last edited by
                      #22

                      Yeah, and I'm sick of seeing those variables all over the code like they run the place. Let's get rid of those also. :~

                      P 1 Reply Last reply
                      0
                      • T thrakazog

                        Yeah, and I'm sick of seeing those variables all over the code like they run the place. Let's get rid of those also. :~

                        P Offline
                        P Offline
                        Pete OHanlon
                        wrote on last edited by
                        #23

                        While you're at it, will you get rid of those stinking operators and loops? They're just noise.

                        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                        My blog | My articles | MoXAML PowerToys | Onyx

                        C 1 Reply Last reply
                        0
                        • P Pete OHanlon

                          While you're at it, will you get rid of those stinking operators and loops? They're just noise.

                          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                          My blog | My articles | MoXAML PowerToys | Onyx

                          C Offline
                          C Offline
                          Chris Losinger
                          wrote on last edited by
                          #24

                          sounds like you're ready for a nice functional language! the results just ... happen. poof!

                          image processing toolkits | batch image processing

                          P 1 Reply Last reply
                          0
                          • C Chris Losinger

                            sounds like you're ready for a nice functional language! the results just ... happen. poof!

                            image processing toolkits | batch image processing

                            P Offline
                            P Offline
                            Pete OHanlon
                            wrote on last edited by
                            #25

                            To be honest, I'll be happy if all those alphanumerics, symbols and punctuation characters go as well. Whitespace is just so beautiful - that's all I want to see, and no need to comment it.

                            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                            My blog | My articles | MoXAML PowerToys | Onyx

                            1 Reply Last reply
                            0
                            • realJSOPR realJSOP

                              Nemanja Trifunovic wrote:

                              Now, I am thinking of starting an "anti-for" one;

                              How about just starting with an anti-absurdity movement?

                              .45 ACP - because shooting twice is just silly
                              -----
                              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                              -----
                              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                              M Offline
                              M Offline
                              Marc Clifton
                              wrote on last edited by
                              #26

                              John Simmons / outlaw programmer wrote:

                              How about just starting with an anti-absurdity movement?

                              Nah, that would be absurd! Marc

                              Will work for food. Interacx

                              I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner

                              1 Reply Last reply
                              0
                              • N Nemanja Trifunovic

                                Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

                                utf8-cpp

                                M Offline
                                M Offline
                                Marc Clifton
                                wrote on last edited by
                                #27

                                Nemanja Trifunovic wrote:

                                Just in case you haven't noticed, there is an "anti-if campaign[^] out there.

                                Actually, it makes sense. I've seen a lot of code where if statements could be replaced, and the code much more robust, by proper OOP. In fact, I'm guilty of that! Marc

                                Will work for food. Interacx

                                I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner

                                1 Reply Last reply
                                0
                                • N Nemanja Trifunovic

                                  Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

                                  utf8-cpp

                                  B Offline
                                  B Offline
                                  Brady Kelly
                                  wrote on last edited by
                                  #28

                                  Anti-increment? No more confusing i++ or ++i, just i += 1; until i etc;

                                  1 Reply Last reply
                                  0
                                  • OriginalGriffO OriginalGriff

                                    Never mind a calculator - implement a coin toss simulator for who goes first in a football match!

                                    All those who believe in psycho kinesis, raise my hand.

                                    B Offline
                                    B Offline
                                    Brady Kelly
                                    wrote on last edited by
                                    #29

                                    Surely you could use any tosser for that, without specially implementing one? As long as it bares the caveat "This code was generated by a tool"

                                    1 Reply Last reply
                                    0
                                    • E Ennis Ray Lynch Jr

                                      Most developers have no understanding of Object Oriented programming beyond the text book definition. There are some great things you can do with correctly designed OO. One really neat pattern is the Null object pattern so instead of checking for null when you call a method you have a predefined action already established on null. But then I am a dreamer.

                                      Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                                      B Offline
                                      B Offline
                                      Brady Kelly
                                      wrote on last edited by
                                      #30

                                      Ennis Ray Lynch, Jr. wrote:

                                      instead of checking for null when you call a method you have a predefined action already established on null.

                                      I was doing that before I really knew what OO was. Maybe I should write a book. No, a doctoral Thesis, two degrees in advance.

                                      1 Reply Last reply
                                      0
                                      • N Nelek

                                        [quote] The perfect gift for programmers who decide to quit using IFs Price: € 20.00 (+20% VAT) + Shipping Minimum quantity: 5 T-Shirts ... Quantity (one size) [/quote]

                                        If (size != yourSize)
                                        { you_have_110€+_less = true;
                                        you_are_fucked_up = true;
                                        ]

                                        :laugh: :laugh: EDIT: I just saw the slogan at the bottom of this part[^]: "Anti-If Campaign you can quit if you want to join us" :doh: :doh: :doh:

                                        Regards. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpfull answers is nice, but saying thanks can be even nicer.

                                        modified on Monday, January 4, 2010 3:28 PM

                                        B Offline
                                        B Offline
                                        Brady Kelly
                                        wrote on last edited by
                                        #31

                                        Nelek wrote:

                                        EDIT: I just saw the slogan at the bottom of this part[^]: "Anti-If Campaign you can quit if you want to join us"

                                        That's actually a subtle NLP embedded command feed: "You can quit if" + "you want to join us".

                                        1 Reply Last reply
                                        0
                                        • N Nemanja Trifunovic

                                          Just in case you haven't noticed, there is an "anti-if campaign[^] out there. Now, I am thinking of starting an "anti-for" one; and "anti-switch" one; and - well you get the picture. Too bad anti-goto is an old news.

                                          utf8-cpp

                                          R Offline
                                          R Offline
                                          Rajesh R Subramanian
                                          wrote on last edited by
                                          #32

                                          Unbelievably stupid! :wtf:

                                          “Follow your bliss.” – Joseph Campbell

                                          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