Most mathematicians agree that e ** (πi) + 1 = 0. However, most floating point implementations disagree. How well can we settle this dispute?
I'm keen to hear about different languages and implementations, and various methods to make the result as close to zero as possible. Be creative!
...
As an example I offer this, which was used to clear the screen in COBOL.
DISPLAY SPACES UPON CRT
...
How long (in hours) have you coded in a single sitting (one session)?
...
I'm looking for some funny jokes and puns that occur in computer languages. I'll post an oldie to kick things off... What are some others?
update: Especially looking for code-related jokes... the ones that only make sense to programmers reading code.
...
I'm constantly amazed by the power of the regex. What I'm looking for here is:
Regexs that are more cleverly badass than ridiculously badass
Regex replacements are acceptable as well if you've had some cool usage of them
Refactored code to use a regex and make it more efficient
Refactored a large regex with a smaller one
Humorous rege...
Whenever I'm explaining what I do for a living (software developer, for example on a party and they had to ask), people tend to make a strange neuro-link:
He does something with computers I do not understand --> I have a computer --> My computer is broken --> I do not understand why --> He should be able to FIX IT.
When did I say I fix...
I've searched around for different challenge sites, and most of them seem to be geared towards difficulty in problem solving logically, rather than trying to use your language of choice to do something you haven't used it for. Their center is around mathematics rather than function design.
Some kind of point system for correctly solvin...
I wrote an O(n!) sort for my amusement that can't be trivially optimized to run faster without replacing it entirely. [And no, I didn't just randomize the items until they were sorted].
How might I write an even worse Big-O sort, without just adding extraneous junk that could be pulled out to reduce the time complexity?
http://en.wi...
If you can remember that far back, what did the first computer program you ever wrote do (once you had finished debugging it)?
...
I'd like to produce a fun AJAX-driven "Reputation Index" taking from Cory Doctorow's book "Down an Out in the Magic Kingdom" where "Whuffie" is a measurement of reputation/currency.
I'd like to allow people to create accounts, login, see other people and assign positive or negative amounts of "whuffie" to them. There would then be an "o...
There are a lot of great programming quotes out there. Which do you like?
Today (Sept 12, 2008) I heard a new one from a friend, Lars-Gunnar, he said "Gud finns i Emacs" (in Swedish). This basically means "God is in Emacs". Still laughing about it here :) What he meant was that a function "gud is grand-unified-debugger" is in Emacs.
A ...
To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome.
ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, and any solution which can be converted to an iterative solution relatively trivially by...
I recently bought a shirt with this great quote on
"There are 10 types of people in the world, those who can read binary, and those who can't."
Now I find myself having to explain it to everybody!
How would you explain this shirt to your grandmother, mother, kid, etc...
...
What are the best anti-code sites that people have found? What I mean by "anti-code" is websites, books, blogs, etc. that describe or explain bad code with the tongue-in-cheek goal of showing us what we should not do. (I made up the phase anti-code for lack of a better term.)
These are the sites I'm familiar with:
How to write unmaint...
Personally I like this one:
P.S. Do not hotlink the cartoon without the site's permission please.
...
sub foo {[$#{$_[!$||$|]}*@{$_[!!$_^!$_]}?@{$_[!$..!!$.]}[$_[@--@+]%
@{$_[$==~/(?=)//!$`]}..$#{$_[$??!!$?:!$?]},($)?!$):!!$))..$_[$--$-]%@{
$_[$]/$]]}-(!!$++!$+)]:@{$_[!!$^^^!$^^]}]}
update: I thought the word "puzzle" would imply this, but: I know what it does - I wrote it. If the puzzle doesn't interest you, please don't waste any ti...
In our office, we've got a bunch of finger blasters:
And nothing beats shooting the hell out of QA who are just located meters away.
One of our developers can consistently get "head shots" within a 10 meter range ..
List other fun things that you guys do!
...
At the moment I'm working on a project that has a lot of downtime. It takes 10 minutes to load the development environment, builds can take half an hour, loading the application for debugging sometimes takes 15 minutes. I would like to know what sort of productive work (besides contributing to StackOverflow) people do during these times ...
Do you have projects you work on in your spare time, just for the fun of it?
What do you do?
What techniques/technologies do you use? Is this a reason for the project?
Have you gained something? Has it become a real product you make money from?
...
I was supporting a product I had written and got a call from a frantic user. She said that the screen was going crazy and asked me to rush over to her office to see what was going on. I double stepped up two floors and hurried into her office. As soon as I got in I saw the problem and moved the notebook off her keyboard :)
What are some...