Advertisement

Favorite Computer Joke

Started by August 10, 2009 11:22 PM
37 comments, last by Krokhin 15 years, 3 months ago
Quote: Original post by Programmer One
There are 10 types of people in this world. Those who understand binary, and those who don't.


There are 10 kinds of people in the world — those who understand ternary, those who don't understand ternary and those who mistake it for binary.
Dev:
" Hey, Reg, you know C++ right? What does:
".\src\Cont.cpp(52) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(392): could be 'std::_Vector_iterator<_Ty, _Alloc> &std::_Vector_iterator<_Ty, _Alloc>::operator =(const std::_Vector_iterator<_Ty, _Alloc> &)' with _Ty=Main::Cont, _Alloc=std::allocator<Main::Cont> while trying to match the argument list '(std::_Vector_iterator<_Ty, _Alloc>, int)' with _Ty=Main::Cont, _Alloc=std::allocator<Main::Cont> " mean?'

Reg: "You missed a semicolon at the end of the line."



#include<iostream>using namespace std;int main(){boozeType beerBrand;if(cash)buy_beer(beerBrand);elsebum_beer_off_buddies();do{beer++;}while(sober);return 0;} 


Both pulled from UrbanDictionary
Advertisement
The optimist says the glass is half full, the pessimist says the glass is half empty, the programmer says the glass is twice as big as it needs to be
How three programmers can make money? Its very easy.
The first make viruses,second make antiviruses,third make operation systems...
I started counting hexadecimal when I was A.
A waiter comes up to a table of computer programmers and asks, "do any of you like any water?"

The first programmer says, "I don't know."
The second programmer says, "I don't know."
...this goes on around the table until finally, the last programmer at the table says, "No."



A byte walks into a bar and orders a drink, looking very sad. The bartender says "What's wrong?". The byte responds "Parity error...". Bartender says "Yeah, I thought you looked a bit off."

An SQL query walks into a bar, and notices two tables in one of the corners. It approaches them and says "Hey, mind if I join you?".

Google Joke:
Recursion

[Edited by - Programmer One on August 14, 2009 5:00:43 AM]
Advertisement
Quote: Original post by Programmer One
A waiter comes up to a table of computer programmers and asks, "do any of you like any water?"

The first programmer says, "I don't know."
The second programmer says, "I don't know."
...this goes on around the table until finally, the last programmer at the table says, "No."


But the last programmer seems to access violate his synapserie or has an off by one error in his mouth. How can he know the answer, if the others only gave undefined answers regarding the boolean datatype of the original question?
Quote: Original post by phresnel
Quote: Original post by Programmer One
A waiter comes up to a table of computer programmers and asks, "do any of you like any water?"

The first programmer says, "I don't know."
The second programmer says, "I don't know."
...this goes on around the table until finally, the last programmer at the table says, "No."


But the last programmer seems to access violate his synapserie or has an off by one error in his mouth. How can he know the answer, if the others only gave undefined answers regarding the boolean datatype of the original question?


It assumes that all the programmers are truthful and that all the programmers know wheter or not they like water.
Then, if the first programmer said "Yes," it is solved, because the programmers translate the question as
"return (programmer1likeswater OR programmer2likeswater OR ...)".
He cannot say "No" since he only knows he doesn't like water but he has no information about the others.
If he says "I don't know", the programmers assume (correctly) that he doesn't like water because he didn't respond Yes. The question is now
"return (false OR programmer2likeswater OR ...)".
And it finally resolves as:
"return (false OR false OR ... OR false) = return false)"
Quote: Original post by Lesan
He cannot say "No" since he only knows he doesn't like water but he has no information about the others.

But everything the last programmer knows is that the others don't know.

Quote: If he says "I don't know", the programmers assume (correctly) that he doesn't like water because he didn't respond Yes.

But why is assuming "Yes" more correct then assuming "Don't Know" or "No"?


enum Meh {    yes, no, dunno};Meh doesAnyoneOfYouLikeWater() {    for (list<Programmer>::iterator it = programmers.begin();         it != programmers.end();         ++it    ) {        switch (it->likesWater()) {        case yes:            return yes;        case no:            if (it->knowsThatOthersDontLikeWater()) {                return no;            } else {                // just a claim, can't know                throw logic_error();            }        case dunno:            break;        };    }    return dunno;}


I can only answer "no" if I know that all others don't like water, too, otherwise it would just be a claim. If I like water, I can answer "yes", because I know that at least one of the programmers likes water.

Or what? [looksaround]
A given programmer knows whether or not he likes water. If he likes water then he will say "yes". If he doesn't like water then his possible answers are "no" or "don't know". So the last programmer knows that since no one answered "yes" then everyone else must not like water, so the answer is "no".

This topic is closed to new replies.

Advertisement