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.
  • 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
                            • 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

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #33

                              what abt anti-VB campaign altogether :laugh:

                              Ravie Busie Coding is my birth-right and bugs are part of feature my code has!

                              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
                                Mark_Wallace
                                wrote on last edited by
                                #34

                                I love the statement that using if statements "reduces legibility". Yup, browsing through hundreds of polymorphic object definitions to try to find out wtf the code does is much easier. They're right, though -- why use a simple branching system, when a hideously complex, unreadable one will do?

                                I wanna be a eunuchs developer! Pass me a bread knife!

                                T C 2 Replies 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

                                  U Offline
                                  U Offline
                                  User 4223959
                                  wrote on last edited by
                                  #35

                                  Despite all this looking like a joke, I agree too. I should add that most programmers do not have enough experience to realise how a complex state (like 10 boolean flags) can create an IF-ELSE hell, where one guy after another fixes one bug after another for a year, and still it never actually works... Just take a big "C" program (or a C++ program written by a C programmer)... :laugh:

                                  1 Reply Last reply
                                  0
                                  • M Mark_Wallace

                                    I love the statement that using if statements "reduces legibility". Yup, browsing through hundreds of polymorphic object definitions to try to find out wtf the code does is much easier. They're right, though -- why use a simple branching system, when a hideously complex, unreadable one will do?

                                    I wanna be a eunuchs developer! Pass me a bread knife!

                                    T Offline
                                    T Offline
                                    Tim Yen
                                    wrote on last edited by
                                    #36

                                    I agree, polymorphism is useful but can be indecipherable. Saying that large collections of if statements can be bad too. Simplify the whole lot I say, try and avoid large spaghetti messes.

                                    M 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

                                      M Offline
                                      M Offline
                                      Member 3964543
                                      wrote on last edited by
                                      #37

                                      i might get shot down for this but as I have been taught by 'books'. Is there a site/tutorial or recomended book to learn some of these things? Stephen

                                      E 1 Reply Last reply
                                      0
                                      • M Mark_Wallace

                                        I love the statement that using if statements "reduces legibility". Yup, browsing through hundreds of polymorphic object definitions to try to find out wtf the code does is much easier. They're right, though -- why use a simple branching system, when a hideously complex, unreadable one will do?

                                        I wanna be a eunuchs developer! Pass me a bread knife!

                                        C Offline
                                        C Offline
                                        CurtainDog
                                        wrote on last edited by
                                        #38

                                        You could use the same argument against separating code into functions so clearly something is wrong.

                                        M 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

                                          P Offline
                                          P Offline
                                          peterchen
                                          wrote on last edited by
                                          #39

                                          Ennis Ray Lynch, Jr. wrote:

                                          Most developers have no understanding of Object Oriented programming beyond the text book definition

                                          But Anti-If is dealing with that problem like an Anti-AIDS-campain handing out free thermometers.

                                          Personally, I love the idea that Raymond spends his nights posting bad regexs to mailing lists under the pseudonym of Jane Smith. He'd be like a super hero, only more nerdy and less useful. [Trevel]
                                          | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server

                                          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