Please read this through before voting to close. There's method in my madness....

April 1st is rapidly approaching, and I suspect many Stack Overflow regulars will have been considering what to ask as a "prank" question. I have nothing against good humour, but I think it makes sense to concentrate it in one place, rather than seeing SO turn into the white noise that Slashdot usually becomes on April 1st. (I'm sure it won't completely eradicate prank questions, but every little bit helps.)

So, what question would you have asked on April 1st? Or rather, what question would you have liked to ask as an April Fool? (I'm sure many people would have restrained themselves... no need here!)

Silly answers to the questions can take the form of comments, of course.

I'll accept the highest voted "answer" at the end of April 1st (or rather, at about 5.15am UTC on April 2nd when I get up).

share|improve this question
1  
Thanks for moving this, Jeff - I can't believe it was actually deleted on SO (and nobody but me wanted to undelete it). –  Kyle Cronin Jul 24 '09 at 4:57
1  
@Jon skeet you have never followed through with "I'll accept the highest voted "answer" at the end of April 1st (or rather, at about 5.15am UTC on April 2nd when I get up).".... I guess that was your April Fool's joke ;) –  Andrei Aug 17 '09 at 11:18
show 3 more comments

migrated from stackoverflow.com Jul 24 '09 at 4:54

This question came from our site for professional and enthusiast programmers.

closed as not constructive by Lance Roberts, mmyers Feb 11 '11 at 18:03

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

87 Answers

up vote 212 down vote accepted

problem help please pleee plsea help uregnt

in java how can I DO POINTERS PLS EMAIL ME AS I DO NOT CHECK HTIS SITE OFEN andersh@microsoft.com

share|improve this answer
3  
ROTFL!!! Here is some filler. –  karim79 Mar 30 '09 at 20:54
42  
+1 for andersh@microsoft.com. Friggin funny stuff! –  asp316 Mar 31 '09 at 13:18
1  
+1 for andersh@microsoft.com –  karim79 Apr 1 '09 at 13:41
9  
+1 for people whining about email addr –  Daniel Apr 1 '09 at 13:58
5  
just mailed andresh the answer. Andresh did say thanks and promised to buy me beer. –  AB Kolan Apr 1 '09 at 17:54
8  
@AB Kolan: I'm guessing you didn't get the andersh reference. It's a (plausible) email address for Anders Hejlsberg, who is probably one of the most brilliant programmers alive. (see en.wikipedia.org/wiki/Anders_Hejlsberg) –  mmyers Apr 1 '09 at 18:14
6  
@mmyers Of course I did.. I was just playing along.. –  AB Kolan Apr 1 '09 at 18:37
5  
I'd like to thank my mother, the director, my writers, make-up, all the little people who voted for me, etc. –  Earwicker Apr 2 '09 at 8:20
3  
What the hell, my monitor needed washing anyway. Teach me to click on something potentially funny while drinking water. –  Tim Post Nov 18 '09 at 12:05
14  
you forgot "plz email me teh codez" –  bobobobo Dec 14 '09 at 16:17
show 7 more comments

¡dn ʇǝƃ ʇ,uɐɔ ı puɐ uǝllɐɟ ǝʌɐɥ ı `dlǝɥ

share|improve this answer
123  
Would you like me to upvote or downvote it, HWB? –  Andrew Grimm Apr 1 '09 at 2:11
9  
Reading that just earned me some funny looks from others in the office. –  pipTheGeek Nov 2 '09 at 12:44
23  
It's easier to read it if you relocate to Australia. –  Donal Fellows Apr 1 '10 at 10:42
4  
As I type this, the answer has 86 votes. Which, next to the text of the answer, I wasn't sure if they managed to get 98 to display as 86, and it all looked so wrong. Plus either number would fit between the 2 answers on either side, so I'm still having my mind blown. I blame the CSS issue I've been striving against all day. –  Matt Dawdy Apr 1 '10 at 20:31
show 6 more comments

Dear Friend Stack Overflow,

I am Barrister Idris Garba, The Attorney to Mr.Karimi Husseini, a British National, who was murdered in the land dispute in Zimbabwe, in early 2007.You can read more on this on: www.zimbabwenews.net

He owned Diary Farms Limited in Cashel, Zimbabwe. He also owned three Tobacco Farms in Chipinge, and also a majority owner of Glendevon Farm also situated in Chipinge, in Zimbabwe.

However before his death, Mr.Karimi Husseini was able to secure with a very good diplomatic contact, A Family Consignment (in the form of Gold and Diamond) valued at Four Point Seven Million United States Dollars (US$4.7m), in safe deposit Security Company in Durban, South Africa, with hope of transferring same to your country when he met his untimely death.

Since his death I have made several frantic enquiries through your embassy to locate any of my client’s extended relatives has also unsuccessful.

After these several unsuccessful attempts, I decided to trace his name through a business directory I got from the world trade center in Johanesburg, in order to get somebody bearing same name in your country as my client’s who will stand in as proxy to clear this consignment.

A notice has been long issued to me by this company to provide my client's next of kin or else, the consignment will be declared as “unserviceable” and therefore confiscated by the Deposit Company.

This is a proposal for you to consider this as a matter of urgency and pay priority attention to it. If this mail appeals to you, kindly give me your urgent response. I am ready to share this consignment with you on a very good negotiable percentage to each party if successfully completed.

In your response, please may I have your contact details such as: Full Names, address, phone and fax numbers, and nature of business activity. The information will assist me in preparing relevant documents needed to change the consignment ownership to your name. For confidentiality purpose,. pls do respond to the alternative email as: idrisgarba@post.ro

I highly regret all inconveniences. Thanks in anticipation of your kind cooperation.

Yours Barrister Idris

share|improve this answer
4  
Why, of course I'll help you out! In fact, just give me your account number and contact details and I'll make the arrangements myself! –  mmyers Mar 31 '09 at 16:04
4  
We can do so much better, rewriting this in a hi-tech / programming flavor, no? –  gbarry Apr 1 '09 at 0:57
2  
I ain't sending money until the Prince of Nigeria contacts me. Lawyers! Bah! –  James Schek Apr 1 '09 at 14:52
2  
Very similar to a lot of frequently-sent entries in my spam folder. –  Galilyou Apr 8 '09 at 17:50
36  
should have said dear Mr Stack Overflow –  Simon Apr 23 '09 at 19:05
2  
I opened an account, what's next, do you contact me here?? –  Tim Post Nov 18 '09 at 12:06
1  
Getting these messages by snail mail is even better. –  Maxim Zaslavsky Aug 17 '10 at 5:55
12  
-1 for using a signature, which the FAQ explicitly asks you not to do. If I can't trust you to read the FAQ, how can I trust you'll follow through on my millions? –  corsiKa Mar 25 '11 at 23:56
1  
@glowcoder - Your loss. You could have been rich. Yours Barrister, Idris. –  karim79 Jun 16 '11 at 16:27
show 4 more comments

How do I ask a question here?

share|improve this answer
116  
Not sure. I'm still trying to work out how to add a comment. –  Jon Skeet Mar 31 '09 at 8:37
8  
!derewsna eb lliw esrever ni deksa snoitseuq ylnO –  Charles Bretana Apr 1 '09 at 15:17
2  
And the answer would be: I would tell you but I still can't find out how to answer a question. –  totymedli Apr 18 '13 at 20:34
add comment

Date-Related Problem with C# Artificial Intelligence App


I inherited an application that uses artificial intelligence and Google's spare resources to answer questions on Stack Overflow. So far it's been working pretty well (it has earned almost 50K reputation at this point).

However, I think that there must be a bug somewhere in it, because it recently started to post non-programming-related questions.

I think I've narrowed it down to the following code:

namespace JS.AI
{
    public class QuestionModel
    {
        // ...

        public bool IsProgrammingRelated
        {
            get
            {
                DateTime afd = new DateTime(DateTime.Now.Year, 4, 1);
                DateTime now = DateTime.Now;

                return
                    Math.Abs(afd.Subtract(now).TotalDays) < 2 ||
                    // ...
            }
        }

        // ...

        static private int thisAlgorithmBecomingSkynetCost = 
            unchecked((int)0xFFFFFFFF); // CA0534
    }
}

If I remove that line from the IsProgrammingRelated return statement, the problem seems to go away; any idea what that code is supposed to do, or why it's there?

Also, I'm a little nervous about that unchecked thing; is that working the way that it's supposed to?

Tags: [c#] [datetime] [ai] [jon-skeetnet] [plzsendtehcodez]

share|improve this answer
3  
Such a shame, the name Eliza was already taken. –  Gamecat Mar 30 '09 at 20:14
5  
Have your tried your app on this question? –  mouviciel Apr 1 '09 at 9:23
5  
I tried; it said it will answer "5:15 UTC on April 2nd when [it] gets up" ... whatever that means... –  Daniel LeCheminant Apr 1 '09 at 12:49
show 3 more comments

Hi,

I currently have a program that's about 40k lines of code. It's stable and efficient, but I don't like so many lines of code. Is there any way I can put all my logic into a single regular expression?

share|improve this answer
2  
Yes, remove all odd lines. Repeat procedure until satisfied –  Gamecat Mar 30 '09 at 20:16
17  
Answer: Yes, but then you'll have two problems. :-) –  RobH Mar 31 '09 at 18:26
29  
I see your problem. You are using assembler. You have to use Perl. –  J S Apr 4 '09 at 9:22
8  
The <center> cannot hold it is too late. –  Andrew Grimm Jan 1 '10 at 9:50
show 3 more comments

Help with Singleton Factory

I've been running into trouble with my Singleton SingletonFactory (from which I make all of my singletons). Whenever I initiate it, I get caught in a loop - I've tried using a sendHelp() to catch the errors, but I am unable to find them.

Long story short, is there an existing example of a Singleton Factory so I can see where I'm going wrong?

share|improve this answer
1  
How was the Singleton Factory initialized? –  Potatoswatter May 9 '10 at 0:57
2  
@Potatoswatter: See Gen 0:0 - "Before the beginning God created the Singleton Factory." –  Piskvor Mar 30 '11 at 15:33
show 2 more comments

I'd have asked this question.

share|improve this answer
25  
I think there's a recursion joke in here somewhere. –  George Stocker Mar 30 '09 at 18:29
6  
c-c-c-combo breaker! –  Alister Bulman Mar 30 '09 at 19:44
8  
Infinite recursion causes StackOverflow... Indeed :) –  Milan Babuškov Mar 30 '09 at 20:21
show 21 more comments

Python is not working! I plugged in my printer but when I do

print("Hello world!")

nothing comes out!

share|improve this answer
44  
You have to initiate communications with the printer properly. Try 'print("Hello printer!")' –  Anonymous Apr 1 '09 at 8:01
3  
Could it be the missing "? Too bad I don't have a printer to try it myself. –  Firas Assaad Apr 1 '09 at 15:21
55  
When you say "nothing comes out", do you mean that nothing happens, or that the concept of nothingness comes out of it? –  Daniel Daranas Apr 1 '09 at 20:10
1  
LMAO! Answer-Unplug the printer. Step away from the keyboard. –  Todd Apr 22 '09 at 17:36
show 1 more comment

Hey Stackoverflow,

I would like to write a program that examines an other program and determines if the other program terminates or not. Unfortunately my program keeps getting stuck in mysterious infinite loops. I would appreciate any advice.

share|improve this answer
5  
HALT! Do not ask this question! It is madness! –  Adam Davis Mar 30 '09 at 18:28
21  
I had that same problem with a compiler I wrote - turned out the solution was to make it give up after about 17 iterations -- signed, B. Stroustrup. –  Earwicker Mar 30 '09 at 21:06
20  
I'm still working on it. - A. Turing –  GoatRider Mar 30 '09 at 21:29
2  
Jon Sheet thought about writing such a program but dismissed it because he already knows if it ends or not. –  epochwolf Apr 1 '09 at 18:54
2  
Duplicate: stackoverflow.com/questions/235984/… –  David Schmitt Apr 4 '09 at 14:42
2  
STOP! Hammertime! –  Piskvor Mar 30 '11 at 15:36
show 2 more comments

"How explain what is binary to my dog?... is very smart dog."

share|improve this answer
38  
Biscuit vs. no biscuit - is very easy! –  Earwicker Mar 30 '09 at 21:03
5  
Not as smart as my dog: goatrider.com/images/001211-chess.jpg –  GoatRider Mar 30 '09 at 21:29
7  
Seeing as how they are dead and wheelchair-bound, respectively, then no they can't do that. –  gnostradamus Apr 1 '09 at 17:34
show 10 more comments

"What is it about Java that makes it so much faster than C?"

share|improve this answer
12  
Imagination / Stupidity –  Brad Gilbert Mar 31 '09 at 15:38
2  
Laugh you C monkies! But Java really is faster than C at doing nothing. javaspecialists.eu/archive/Issue158.html –  James Schek Apr 1 '09 at 14:55
1  
well I´m java programmer myself. Maybe your humor is just returning a NullPointerException today. :) –  Decio Lira May 7 '09 at 14:15
show 2 more comments

How do I write a program to prove a program is bug free?

Could I run this program against itself to make sure I wrote it right?

share|improve this answer
11  
"No" - K. Godel. –  Earwicker Mar 30 '09 at 20:22
24  
int main() { printf("I looked at your code, it's fine, trust me.\n"); } –  Earwicker Mar 30 '09 at 21:07
3  
stackoverflow.com –  GoatRider Mar 30 '09 at 21:31
show 2 more comments

Trying to get Clanne Stewart Tartan out of my Jacquard loom.

I'm punching in

........ ..............
. . . ... ... . . . .. 
.. ..... ..... .. ... .
.... . ...... .........
.......... ... ..  ....
.  ...... .......... ..
.. .. .. .. ...........
... .......... . . . .

but seem to be missing a red stripe.

Help!!

share|improve this answer
18  
I turns out that looms made before v4.1.09 put the red stripe on the bottom. Did you check for updates? –  gbarry Apr 1 '09 at 1:07
add comment

Which is better, VI or Emacs?

share|improve this answer
15  
Yes. . –  Brian Postow Mar 31 '09 at 21:35
6  
nano I say... HA! –  GameFreak May 13 '09 at 23:11
3  
ed, of course. –  progo Feb 11 '11 at 17:35
add comment

Kind sirs,

I need to put a JIT JAVA in my C# MONO, so I can code while I code.

Please send me the module.

Regards,

-Xzibit

share|improve this answer
3  
best question ever, ill send you the module ASAP –  DFectuoso Mar 30 '09 at 21:15
1  
VMKit (llvm.org) –  Jared Updike Jul 29 '09 at 23:11
add comment

I just finished re-implenting the Linux kernel in Emacs Lisp, and I have about 700 pages of closing parentheses at the end of my source file. Obviously, this needs some refactoring; ideally, I'd like to get it down to no more than 500 pages of closing parentheses. What's the emacs keystroke to do that?

share|improve this answer
6  
It's not bound to a keystroke. The function is text-scale-decrease. –  Ryan Thompson Oct 14 '09 at 6:36
show 1 more comment

I'm writing some socket polling code, and select() isn't working right. Can anyone tell me where I can go to report a bug in select()?

share|improve this answer
4  
Select isn't broken :-) –  Pete Mar 31 '09 at 15:04
6  
Wow, that's an obscure reference to "The Pragmatic Programmer" –  Mark Lindell May 13 '09 at 0:55
2  
I like obscure. +1. –  bobobobo Dec 14 '09 at 16:21
show 2 more comments

share|improve this answer
1  
PH.D?? Meh, everyone knows "4" is somehow the answer to everything. –  rism Mar 31 '09 at 21:59
7  
@rism - uhmm, it is "42" –  ldigas Mar 31 '09 at 22:19
6  
ph.d = Passed with High Difficulty –  AB Kolan Apr 1 '09 at 18:12
show 4 more comments

So lets say you have a treadmill as large as an airplane runway. The treadmill is designed to match the speed of a plane on top, essentially holding it in place.

Can the plane take off?

share|improve this answer
10  
Stop watching Mythbusters! =P –  gnostradamus Mar 30 '09 at 18:40
9  
Yes, the plane can take off. The plane doesn't care about what's happening under it's wheels, it cares about the wind blowing past the wings. If the engines are going, there's wind blowing past the wings, therefore the wings gain lift. QED. –  Adam Davis Mar 30 '09 at 18:44
1  
Adam- the answer is not the point. The point is that this is a very contentious question, filling pages of forums online. A fun April fools question! –  BradC Mar 30 '09 at 18:46
3  
If the treadmill matches the speed of the plane, the only thing moving is the wheels. No takey-offy. –  Dave Mar 30 '09 at 18:54
1  
The treadmill doesn't "hold it in place" at all. A car moves because its wheels turn. A plane doesn't move because its wheels turn unless it's taxiing. It moves because its engines are going. It would still move if it had no wheels and was skidding along the ground. –  Kyralessa Mar 30 '09 at 19:01
13  
If I flap my arms while I'm walking on the treadmill, will I take off? –  mmyers Mar 30 '09 at 19:09
13  
I posit that it wouldn't take off because it would bump into the controls in front of the treadmill. –  belgariontheking Mar 30 '09 at 19:10
1  
@mmyers - I can answer that positively. Yes, you will. In the direction of the trash can right behind the treadmill :-) –  ldigas Mar 30 '09 at 19:22
28  
What colour is the plane? –  rism Mar 31 '09 at 4:17
3  
Boundary layer is very small. Speed is relative, Speed relative to treadmill has nothing to do with lift... Speed of air relative to wing produces lift.. Put fan in front of aurplane blow 200mph wind at wing and airplane will take off withOUT moving... –  Charles Bretana Apr 1 '09 at 15:23
31  
Is it an African or a European plane? –  butterchicken Sep 3 '09 at 10:54
show 20 more comments

I had this question that answered '42', but I forgot what the question was. Does anybody know the question?

share|improve this answer
6  
No, but I saw some plans for a computer that can come up with the question. Might be a bit involved, though. –  gbarry Apr 1 '09 at 1:00
3  
How many roads must a man walk down before you call him a man? –  Allain Lalonde May 5 '09 at 18:02
show 6 more comments

Help with a revolutionary compression algorithm

I have implemented a new compression algorithm working on any kind of data: text, image, sound, video, executables, ... The compression ratio is huge. Here it is:

  • Step 1: '0' are null values, so they are removed.
  • Step 2: count the number of remaining '1'
  • Step 3: That's all.

Compression works very well. Nevertheless, one little problem remains with the uncompression part, and I don't know what is wrong. Any help would be appreciated.

share|improve this answer
15  
You forgot to count the zeroes before removing them. –  Ryan Thompson Oct 14 '09 at 6:39
4  
Great! I won't forget to mention your name on the patent. –  mouviciel Oct 14 '09 at 9:48
11  
Remember, you can apply this algorithm repeatedly to get even greater levels of compression! –  Donal Fellows Apr 1 '10 at 10:50
add comment

I was going to post:

Affordable You Tube Type Site Needed: Original or Clone Site Is Acceptable.

You Tube type site where people can post videos, and view videos. The videos should be able to be organized by categories. The site will be made into an adult you tube site. Using a clone of a you tube type site will be best because I do not have a lot of money for this project. The site must have a feature where videos can be embed into other sites like wordpress blogs, etc with a simple copy and paste of generated code.

share|improve this answer
show 1 more comment

Programatically, how would I increase my Stackoverflow points score?

share|improve this answer
7  
Apparently all you have to do is make recursion jokes? –  PeterAllenWebb Mar 30 '09 at 20:41
5  
Actually, it's well known that StackOverflow is written in COBOL, so you have to use ADD 1 TO REP GIVING REP –  Super Long Names are Hilarious Sep 23 '09 at 18:22
show 3 more comments

Places to waste time online?

The internet's great n' all, but I'm struggling to find anywhere online where I can simply pass the time whilst deriving little or no personal value.

Does anyone have any recommendations?

share|improve this answer
3  
...programmatically, of course. –  mmyers Mar 31 '09 at 15:41
12  
stackoverflow.com –  Benson Apr 2 '09 at 18:53
add comment

Suppose you're on a game show, and one of the doors on stage has a new car, the other two have goats.

You choose door 1. Monty Hall shows you a goat behind door 2.

Should you switch to door 3, or stick with your original choice, door 1?

share|improve this answer
1  
Switch to increase your odds from 33% to 50%! –  Instantsoup Mar 30 '09 at 18:40
3  
Eric is right, it's 2/3. billthelizard.com/2008/12/monty-hall-problem_20.html –  Bill the Lizard Mar 30 '09 at 19:57
1  
@Beska: He always opens a door to show you where one of the goats is. –  Bill the Lizard Mar 30 '09 at 23:23
5  
I already have a car, but no goat so I rather stick to my choice. –  Gamecat Mar 31 '09 at 21:09
7  
+1 for goats. Not enough goats in software development these days. –  geofftnz Apr 2 '09 at 4:20
2  
@Beska: that would even be better: If Monty would behave thusly, you should never switch if he opens a door and always stay if he doesn't, leading to 100% wins. –  David Schmitt Apr 4 '09 at 15:04
3  
A goat would be more convenient for moving around London than a car and would avoid the congestion charge. –  pjp Sep 3 '09 at 10:53
show 9 more comments

My floating point arithmetic algorithm is broken. When I execute the following line of code I don't get 20!

e ** pi - pi

What do I do?

share|improve this answer
add comment

As a homework assignment I have been given a 2048-bit integer, how can I determine all of the prime factors of this number?

share|improve this answer
3  
Write a couple for loops. :) and wait... –  LeakyCode Mar 30 '09 at 20:16
2  
Dude, I checked, it's a trick question! It's a prime number! Just write it down, and you're golden. –  beska Mar 30 '09 at 21:00
1  
Every body knows that any number over 255 is a prime number. –  Brad Gilbert Mar 31 '09 at 15:47
1  
All prime numbers are odd. –  Les Apr 1 '09 at 12:52
4  
All odd numbers are odd –  tafa Apr 1 '09 at 14:55
4  
@Les 2 is a prime number. –  Wedge Apr 1 '09 at 22:58
16  
@Wedge Agreed, but it is the only prime number that is even. Isn't that odd? –  Les Apr 2 '09 at 12:16
2  
count the bits that are set, subtract the square root of the number of bits that are not set, and then add 42 –  Charles Bretana Apr 2 '09 at 16:17
show 1 more comment

Hello!

I am an Italian student who studies Computer Science at Pisa University, and I am developing some project in Java using Java 2 Standard Edition (J2SE) and Java 2 Micro Edition (J2ME, for MIDP 1.0 compliant devices). I need to know if there are some Java API (for J2SE and J2ME) to send SMS to a mobile phone. I know Java Mail API but it doesn't let me to send SMS to a mobile phone but only e-mail.

How can I send SMS to a mobile phone? Which steps must I follow?

Is there someone who can help me?

How is babby formed?

Plz email me teh codez.

share|improve this answer
show 1 more comment

Can anyone explain this comic to me? http://www.xkcd.com I don't understand this.

share|improve this answer
16  
xkcdexplained.com –  GSto Nov 4 '09 at 22:11
1  
@GSto: OMG this is awesome. Thanks. –  the_drow Dec 15 '09 at 22:41
show 3 more comments

protected by Lance Roberts Feb 11 '11 at 17:54

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .