|
This thread is locked; no one can reply to it. |
1
2
|
A little programmer's humour. |
Neil Roy
Member #2,229
April 2002
|
{"name":"610898","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/3\/4374f42a2710ab8f938a01dab5720263.jpg","w":480,"h":462,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/3\/4374f42a2710ab8f938a01dab5720263"} Post yours. --- |
Eric Johnson
Member #14,841
January 2013
|
Ha. RIP, Dennis Ritchie... One of my favorites: {"name":"how-users-see-programmers.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/3\/b36bbff17073125354a74505e65195dc.jpg","w":381,"h":374,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/3\/b36bbff17073125354a74505e65195dc"} Edit {"name":"pointers.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/e\/7ebb92dd0235d49eb2944e3b2512f376.png","w":360,"h":299,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/e\/7ebb92dd0235d49eb2944e3b2512f376"} {"name":"art-programming.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/6\/e6e80732416af90b7ec64213786affb1.jpg","w":350,"h":470,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/6\/e6e80732416af90b7ec64213786affb1"} {"name":"38a28b7916db2765df4409a2c00fa49e.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/d\/4d95d9b967d89a7ee197936103ddc984.jpg","w":360,"h":324,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/d\/4d95d9b967d89a7ee197936103ddc984"}
|
Gideon Weems
Member #3,925
October 2003
|
Neil Roy
Member #2,229
April 2002
|
Eric, those are great! This is definitely me. If it works, and I don't know why... And this is my most common error... Yup! --- |
Eric Johnson
Member #14,841
January 2013
|
Gideon Weems said:
1. Open vim.
{"name":"vim_smile.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/8\/4859ca821c980b1a574622b6f3756202.png","w":1600,"h":900,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/8\/4859ca821c980b1a574622b6f3756202"} @Neil: I don't get it--there ARE only three apples though... Zero apple, one apple, two apple, three apple!
|
Elias
Member #358
May 2000
|
This has always been my favorite, because it could literally be me: Quote: A programmer's wife says to her husband: "Please go to the store and buy a gallon of milk and if they have eggs, get six." He comes back with 6 gallons of milk. She asks: "Why the hell did you buy six gallons of milk?" His reply: "They had eggs"
-- |
bamccaig
Member #7,536
July 2006
|
The counting one above makes zero sense. A count is clearly distinct from an index. If you count 3 apples you're going to ignore the 4th! 1#include <iostream>
2
3typedef char apple_t;
4
5int main(int argc, char * argv[])
6{
7 apple_t apples[] = {'@', '@', '@', '@'};
8
9 for(int i=0; i<3; i++)
10 {
11 if(i) std::cout << ' ';
12 std::cout << apples[i];
13 }
14
15 return 0;
16}
Output: @ @ @
-- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
|
Way to ruin the spirit of things, bam. Here's a joke:
|
bamccaig
Member #7,536
July 2006
|
This site appears to be about 2/3 amusing: -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
|
bamccaig said: This site appears to be about 2/3 amusing: That first one gave me a good chuckle Quote: Hide and seek champion... ; since 1985
|
Bob Keane
Member #7,342
June 2006
|
Not funny. Not because my name is Bob, but because I did something similar recently. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Felix-The-Ghost
Member #9,729
April 2008
|
Gideon Weems
Member #3,925
October 2003
|
As mentioned, the counting apples joke would only be funny to someone with a poor grasp of key concepts. The six-gallons-of-milk joke is classic, though. Here's another: Quote: Here's a problem that sounded impossible... I almost regret posting the story to a wide audience, because it makes a great tale over drinks at a conference. :-) The story is slightly altered in order to protect the guilty, elide over irrelevant and boring details, and generally make the whole thing more entertaining. I was working in a job running the campus email system some years ago when I got a call from the chairman of the statistics department. "We're having a problem sending email out of the department." "What's the problem?" I asked. "We can't send mail more than 500 miles," the chairman explained. I choked on my latte. "Come again?" "We can't send mail farther than 500 miles from here," he repeated. "A little bit more, actually. Call it 520 miles. But no farther." "Um... Email really doesn't work that way, generally," I said, trying to keep panic out of my voice. One doesn't display panic when speaking to a department chairman, even of a relatively impoverished department like statistics. "What makes you think you can't send mail more than 500 miles?" "It's not what I think," the chairman replied testily. "You see, when we first noticed this happening, a few days ago--" "You waited a few DAYS?" I interrupted, a tremor tinging my voice. "And you couldn't send email this whole time?" "We could send email. Just not more than--" "--500 miles, yes," I finished for him, "I got that. But why didn't you call earlier?" "Well, we hadn't collected enough data to be sure of what was going on until just now." Right. This is the chairman of statistics. "Anyway, I asked one of the geostatisticians to look into it--" "Geostatisticians..." "--yes, and she's produced a map showing the radius within which we can send email to be slightly more than 500 miles. There are a number of destinations within that radius that we can't reach, either, or reach sporadically, but we can never email farther than this radius." "I see," I said, and put my head in my hands. "When did this start? A few days ago, you said, but did anything change in your systems at that time?" "Well, the consultant came in and patched our server and rebooted it. But I called him, and he said he didn't touch the mail system." "Okay, let me take a look, and I'll call you back," I said, scarcely believing that I was playing along. It wasn't April Fool's Day. I tried to remember if someone owed me a practical joke. I logged into their department's server, and sent a few test mails. This was in the Research Triangle of North Carolina, and a test mail to my own account was delivered without a hitch. Ditto for one sent to Richmond, and Atlanta, and Washington. Another to Princeton (400 miles) worked. But then I tried to send an email to Memphis (600 miles). It failed. Boston, failed. Detroit, failed. I got out my address book and started trying to narrow this down. New York (420 miles) worked, but Providence (580 miles) failed. I was beginning to wonder if I had lost my sanity. I tried emailing a friend who lived in North Carolina, but whose ISP was in Seattle. Thankfully, it failed. If the problem had had to do with the geography of the human recipient and not his mail server, I think I would have broken down in tears. Having established that--unbelievably--the problem as reported was true, and repeatable, I took a look at the sendmail.cf file. It looked fairly normal. In fact, it looked familiar. I diffed it against the sendmail.cf in my home directory. It hadn't been altered--it was a sendmail.cf I had written. And I was fairly certain I hadn't enabled the "FAIL_MAIL_OVER_500_MILES" option. At a loss, I telnetted into the SMTP port. The server happily responded with a SunOS sendmail banner. Wait a minute... a SunOS sendmail banner? At the time, Sun was still shipping Sendmail 5 with its operating system, even though Sendmail 8 was fairly mature. Being a good system administrator, I had standardized on Sendmail 8. And also being a good system administrator, I had written a sendmail.cf that used the nice long self-documenting option and variable names available in Sendmail 8 rather than the cryptic punctuation-mark codes that had been used in Sendmail 5. The pieces fell into place, all at once, and I again choked on the dregs of my now-cold latte. When the consultant had "patched the server," he had apparently upgraded the version of SunOS, and in so doing downgraded Sendmail. The upgrade helpfully left the sendmail.cf alone, even though it was now the wrong version. It so happens that Sendmail 5--at least, the version that Sun shipped, which had some tweaks--could deal with the Sendmail 8 sendmail.cf, as most of the rules had at that point remained unaltered. But the new long configuration options--those it saw as junk, and skipped. And the sendmail binary had no defaults compiled in for most of these, so, finding no suitable settings in the sendmail.cf file, they were set to zero. One of the settings that was set to zero was the timeout to connect to the remote SMTP server. Some experimentation established that on this particular machine with its typical load, a zero timeout would abort a connect call in slightly over three milliseconds. An odd feature of our campus network at the time was that it was 100% switched. An outgoing packet wouldn't incur a router delay until hitting the POP and reaching a router on the far side. So time to connect to a lightly-loaded remote host on a nearby network would actually largely be governed by the speed of light distance to the destination rather than by incidental router delays. Feeling slightly giddy, I typed into my shell: $ units You have: 3 millilightseconds
/ 0.0017893979 "500 miles, or a little bit more."
|
Elias
Member #358
May 2000
|
Oh, the ancient times when email worked over local SMTP servers physically close to you... It reminds me a lot of the story about the engineer who had to fix a car that would break down whenever the owner bought vanilla ice cream instead of chocolate ice cream -- |
bamccaig
Member #7,536
July 2006
|
Those are fun problems because you logically conclude, this is impossible, the user is an idiot. Those are the most surprising bugs of all. Usually it's still not exactly the way the user described, but still you end up with a paradox to solve. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Andrei Ellman
Member #3,434
April 2003
|
-- |
bamccaig
Member #7,536
July 2006
|
I find it hard to read the IAQ. It's like, "Oh hey, I didn't know that... What's this [a]... You bastard. " -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Chris Katko
Member #1,881
January 2002
|
Quote: How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters? (((char)(*))((*)())(((*)((foo)))())([(N)])); WTF. Did a C programmer accidentally a LISP? -----sig: |
bamccaig
Member #7,536
July 2006
|
Lisp would have required spaces. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Chris Katko
Member #1,881
January 2002
|
C is like 90% more efficient than C. -----sig: |
OICW
Member #4,069
November 2003
|
I don't believe these didn't get posted here: {"name":"code_quality.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/c\/5c52dda614d799dcfff912957c4d9d15.png","w":740,"h":258,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/c\/5c52dda614d799dcfff912957c4d9d15"} {"name":"code_quality_2.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/8\/085d2234bd16dd2c419cf3f152df326e.png","w":531,"h":511,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/8\/085d2234bd16dd2c419cf3f152df326e"} {"name":"code_quality_3.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/1\/c1dffccce7cd5576a95f2ee58c471870.png","w":740,"h":259,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/1\/c1dffccce7cd5576a95f2ee58c471870"} [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
Neil Roy
Member #2,229
April 2002
|
And that is why I am afraid to show anyone my code! --- |
Chris Katko
Member #1,881
January 2002
|
I just realized now I made a typo.. like a month later. I was joking that C is like 90% more efficient than LISP because it doesn't require spaces. -----sig: |
bamccaig
Member #7,536
July 2006
|
OICW said: [xkcd comics] At this point I feel like xkcd was an elaborate hoax. It has since gone to shit, it seems, and looking back on the use of women and the pushing of Feminist ideals makes me feel betrayed about the entire ordeal. Chris Katko said: I was joking that C is like 90% more efficient than LISP because it doesn't require spaces. Only somebody that didn't know Lisp (and/or C) could imagine that funny. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Chris Katko
Member #1,881
January 2002
|
Yeah, but linking it directly in reply to your preceding comment was the joke. -----sig: |
|
1
2
|