fun

Can you explain the concept of Recursion?

If you had to explain recursion to a novice how would you do it? ...

XKCD - Random Number

Could someone explain if and why the following random number function from XKCD works? I have never quite been able to understand it. I ask the question on SO hoping to find a more "human" explanation that could be understood by me. ...

Programmers' last words

What would be the last words of particular kinds of programmers? For example, a Perl programmer: I don't have to write documentation. The source is formatted so well, I can read it later... or I'm just going to write a regular expression to find this, then I'm done... ...

Correlation between verbosity and bondage-and-discipline

Is it just me or is there an almost perfect correlation between the level of bondage-and-discipline a language inflicts and the verbosity of the language? Ada, Java, and Pascal are horribly verbose, and have the reputation as extreme bondage-and-discipline languages. On the other hand, Perl and to a lesser extent C are pretty terse and...

Extending the parent-child relationship

Given the one-table design given below how would the following best be queried The set of extended family members given a folk id The set of common ancestors given two folk ids The set of descendants given a folk id *Bonus 1st cousins, twice removed given a folk id Table Folk FolkID (PK) MotherID (FK to folkid) FatherID (FK to...

If you could work in any programming-related technology/field of your choice, which would it be?

I'm interested to know which programming-related areas of technology people are most interested in. If you could work on any technology/field which would it be? Feel free to go all futuristic on me. :) For example, some areas I'd love to work on if I could would be artificial inteligence, real-world simulations, robotics, nano-technolo...

What language has the longest "Hello world" program?

In most scripting languages, a "Hello world!" application is very short: print "Hello world" In C++, it is a little more complicated, requiring at least 46 non-whitespace characters: #include <cstdio> int main() { puts("Hello world"); } Java, at 75 non-whitespace characters, is even more verbose: class A { public static void...

Programming License Plates: Any clever ones?

I'm curious if any Stack Overflowers have (or have seen) any clever programming-related vanity plates. Here are some I've found to start things off: ...

What do you want inscribed on your development-inspired headstone?

When we one day shed our mortal coil, what would you like inscribed on your headstone? I think mine would be: ___________ / \ / Ray Booysen \ | | | IDisposable | | | | 1982 2009 | | | ...

How do you know if you've been programming too long?

It happens to most of us, I'm sure. We've sat down to work on a problem, only to forget about dinner, then breakfast, and sometimes lunch. "Two minutes" often becomes "until 2 A.M." and then when we finally take a break and we find ourselves continuing to work on the same code, or worse. At what point do you know to stop and do someth...

Anyone know any programming related poetry?

Anyone know any programming related poetry? ...

Weird constants

I've seen these in real code: #define SCREEN_DIMENSIONS 2 #define THREE_THOUSAND_FIVE_HUNDRED_TWENTY_TWO 3522 What is the weirdest constant you've ever seen? P.S. And of course my favorite in JScript: bool b; switch (b.ToString().length) { case 4: // true ... break; case 5: // false ... break; ) ...

Have you ever recognized source code in a movie?

Sometimes source code is visible in a movie, have you ever recognized any? ...

How would you explain your job to a 5-year old?

Sometimes it's difficult to define programming to people. Especially too old or too young people can not understand what I do to earn money. They think that I repair computers, or they want to think that I (as an engineer) build computers at work. :) It's really hard to tell people that you produce something they can't touch. Here is a ...

What is the daftest standard you have ever had to follow?

I judging by the number of comments on a previous post, I thought this may dredge up a few stories... Corpotate IT departments often like to impose standards on developers, which are no bad thing in themselves, but sometimes they can be ill thought out, Duplicate of http://stackoverflow.com/questions/218123/what-was-the-strangest-codin...

What is the most impressive LINQ statement that you have come across?

I recently came across this raytracer in LINQ. Just wondering if anyone can top that? var pixelsQuery = from y in Enumerable.Range(0, screenHeight) let recenterY = -(y - (screenHeight / 2.0)) / (2.0 * screenHeight) select from x in Enumerable.Range(0, screenWidth) let recenterX = (x - (screenWidth / 2.0)) / (2.0 * screenWidth) ...

What's the result of the SQL statement "SELECT DATEADD(s,1234567890, '19700101')"?

For some reason, my SQL installation isn't working :) SELECT DATEADD(s,1234567890, '19700101') Maybe this site would help (link from Moose). ...

What is the most frustrating restriction your IT department has ever put on you or your machine?

I think we've all been there, your IT Support/ Infrastructure team inflict some meaningless, very frustrating, poorly explained "policy" on you and your team that irks you every time you are affected. My current fairly trivial issues are that the IT department have reverted to the old school Start Menu. I really didn't realise how much ...

The Agile Way: Integration Testing vs Functional Testing or both?

Hi, I would in an office which has been doing Agile for a while now. We use Scrum for project management and mix in the engineering practices of XP. It works well and we are constantly learning lessons and refining our processes. I would just like to tell you about our usual practices for testing and get feed back on how this could be ...

How to come up with a fun project name?

I was thinking, that all of my projects have boring names. For example, if making a math library, I'd call it math. Sometimes, I would add a prefix with my initials, so it'd become pmmath or *pm_math*. Boring, isn't it? How do people come up with fun or at least, less boring names? Like Apache, Python, Ruby... They're not boring. If you...