The Anti-If Campaign
-
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, 2001John Simmons / outlaw programmer wrote:
How about just starting with an anti-absurdity movement?
Nah, that would be absurd! Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
-
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.
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
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
-
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.
Anti-increment? No more confusing i++ or ++i, just i += 1; until i etc;
-
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.
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"
-
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
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.
-
[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
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".
-
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.
Unbelievably stupid! :wtf:
“Follow your bliss.” – Joseph Campbell
-
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.
-
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.
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!
-
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
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:
-
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!
-
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
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
-
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!
You could use the same argument against separating code into functions so clearly something is wrong.
-
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
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 -
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
Your OO professor should have covered it. What the site is in favor of is not complete elimination of if's but complete overuse of if's when data structures are the more appropriate solution.
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
-
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.
F*ck you, dude - switch statements are OVER 9000!!!! You rocksed teh rest, though - DO WANT!!
---"Don't tase me, bro!"
-
You could use the same argument against separating code into functions so clearly something is wrong.
CurtainDog wrote:
You could use the same argument against separating code into functions
Not really; functions have unique names. You don't have to work your way through three-line parameter lists of overloaded methods to see what they do to see what parameters they have (a parameter list itself doesn't tell you anything other than the parameters a method takes). What methods mostly do in Java is declare that
this <object> = <object>
That is so incredibly useful, when trying to figure out what the Hell was in the original coder's head when he wrote it. OO has become a vipers' nest of technique for technique's sake (i.e. not for the sake of the end product or the people who have to maintain the code), as the article ably demonstrates -- what it really says is "Using if statements isn't the technique flavour, this month".I wanna be a eunuchs developer! Pass me a bread knife!
-
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.
Tim Yen wrote:
Simplify the whole lot I say, try and avoid large spaghetti messes.
... And document each step clearly, so the next person to pick it up doesn't have to spend three days trying to figure out why something's not working.
I wanna be a eunuchs developer! Pass me a bread knife!
-
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.
Once again, some moron has discovered a bright shiny tool: the hammer. They think everything requires the hammer, and that screwdrivers, wrenches, and other tools for dealing with specific types of fasteners are not only old-fashioned but wrong. Now, if we could only get them to apply the hammer to their own thick skull, we would be free to continue on our merry way.
Software Zen:
delete this;
-
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.
You know a campaign is pathetic IF there simplest example is so contrived one is tempted scream at them through their monitor. An example of an if/else block with dependencies upon type! What a fine example of typical usage. Readability is the key: but the caveat is that if your readability is because you've essentially hyperlinked your code with objects, you've simply spread your mess: Myself? I prefer a solid and practical poop to their conceptual diarrhea.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert"It's a sad state of affairs, indeed, when you start reading my tag lines for some sort of enlightenment. Sadder still, if that's where you need to find it." - Balboos HaGadol