fun

What is your best/funniest/annoying performance tuning experience?

Often we find changing a few lines of code makes n-fold performance increases in applications. One such experience for me was fixing an issue in the configuration library. The library was based on XML configuration file and XPath was used to access the configuration. During profiling, I found an enormous number of XPath objects and call...

How do I check if a number is a palindrome?

Any language. Any algorithm (except making the number a string and then reversing the string). Also, I actually have to do this, and I'll be posting my solution too. ...

Punishment for breaking the build

I'm sitting here frustrated that a team member broke the build and then goes on a long-weekend vacation. What happens on other teams when someone breaks the build? What would you consider a fair punishment? ...

What's the most unsound program you've had to maintain?

I periodically am called upon to do maintenance work on a system that was built by a real rocket surgeon. There's so much wrong with it that it's hard to know where to start. No, wait, I'll start at the beginning: in the early days of the project, the designer was told that the system would need to scale, and he'd read that a source...

Did any of the apps you worked on had a "famous error message" among the user base?

I remember one of the first applications I worked with, at the beginning of my career was built using Clipper (for those who have not been on the area for long, here's a pointer to the Clipper language, pretty cutting-edge at the time :) ). Clipper used the same database architecture as dBase did, and databases were stored on regular f...

What is the best commit message you have ever encountered?

Following this topic, what is the best (as in witty and/or funny) commit message you have ever encountered? For example, here's the message for a commit I made a few minutes ago: This change should have never been made. It kills little children. NOTE TO SELF: Don't do everything [the boss] tells you immediately. ...

What was the strangest coding standard rule that you were forced to follow?

When I asked this question I got almost always a definite yes you should have coding standards. What was the strangest coding standard rule that you were ever forced to follow? And by strangest I mean funniest, or worst, or just plain odd. In each answer, please mention which language, what your team size was, and which ill effects ...

Amazing programming achievements

I recently found this article about how some guy managed to write a super mario game in just 14k of javascript code. Ok, it's not a full game, it's not even a full level, but still - 14k of javascript, without any external graphics files... I, for one, congratulate the person that managed to do that.. Then I found this article about Wolf...

What to do when you're bored?

I love this place. I rarely have anything to do and when I do, it's still not much. I literally waste a lot of time at the office (when I have tons of stuff to do at home). My problem is, I've been watching a lot of websites, like SO, Slashdot, XKCD or TDWTF, I've also started reading design patterns and learning C# (eventually got bored...

Changes to the C standard for a modern world

Having just answered a question on what the #pragma direction does in C, and had some fun with it, I was thinking of what other useful directives we could add to the language to keep pace with the stresses faced by todays developer. My first one was #dogma, basically there to counteract all the pragmatic stuff creeping into modern C an...

Fibonacci Code Golf

Generate the Fibonacci sequence in the fewest amount of characters possible. Any language is OK, except for one that you define with one operator, f, which prints the Fibonacci numbers. Starting point: 25 characters in Haskell: f=0:1:zipWith(+)f(tail f) ...

What is your best programmer joke?

When I teach introductory computer science courses, I like to lighten the mood with some humor. Having a sense of fun about the material makes it less frustrating and more memorable, and it's even motivating if the joke requires some technical understanding to 'get it'! I'll start off with a couple of my favorites: Q: How do you tel...

Games that teach Programming Fundamentals

Can anybody recommend games that teach programming fundamentals? I've personally found that Magic: The Gathering and Robo Rally (both designed by Richard Garfield) are excellent for developing early programming skills. I used to toy around with Logo on a TRS-80 as a kid and Robo Rally reminds me of that (here's a similar Flash game tha...

Is there an MD5 Fixed Point where md5(x) == x?

Is there a fixed point in the MD5 transformation, i.e. does there exist x such that md5(x) == x? ...

What is the most questionable bug report you ever received from QA?

Once in a while you get a bug report, usually from someone new in QA who may not fully understand the product yet, that makes you raise an eyebrow. I'll start off with one which my team (both dev & QA) still laugh about years after it happened. The product I was working on had a toolbar with a set of buttons which toggled certain aspec...

Funny or weird error messages from a development environment/application

What is the funniest or weirdest error message you've got from a development environment/application? For example: Catastrophic failure 'null' is null or not an object ...

What are terms used to describe the act of solving a bug?

Hi, What are terms/slangs used to describe the act of solving a bug? e.g. squashed the bug Others? ...

Etymology of linux commands

Just for fun ... I tend to keep myself alert by looking for serendipitous puzzles throughout the day. One of the things I love about linux is the never-ending amount of cleverness it embodies, from its elegant simplicity all the way to the comments in its manual pages. Can you articulate the unwritten rules that dictate how new command...

What are your favorite "yak shaving" euphemisms?

Noun yak shaving (uncountable) (idiomatic) Any apparently useless activity which, by allowing you to overcome >intermediate difficulties, allows you to solve a larger problem. I was doing a bit of yak shaving this morning, and it looks like it might have paid off. So I'm after phrases like "yak shaving" that m...

What should I do while I'm waiting for the build / the tests / the database migrations to run?

As best-behaved as I try to be about keeping my unit tests disconnected from the database, etc. etc, it still seems inevitable that my day will be interrupted by small regular enforced breaks while I wait for my machine to do something boring. I personally find swordfighting makes me lose my train of thought. I'm often 'in the zone' w...