Post-Christmas Resolution, Day 256 – A Simple Matter Of Programming

Salem Classical Fencing had an interesting scheduling problem which needed a little computer programming help.

“It is just a simple matter of programming.”

-ancient computer programming idiom

Imagine you are scheduling a fencing tournament for a non-profit organization. Each competitor must face off against all others. In order to make the tournament more efficient, a fencer must stay on the mat and face the next competitor. But no fencer can stay more than two consecutive matches. Now imagine you have twenty fencers and two concurrent matches.


That is the quandary that Salem Classical Fencing faces. A non-profit has only limited resources. With a challenge like this, should you spend your time trolling the web looking for a tournament scheduling program with these specific requirements? Should you invest your volunteers’ time to make the schedule by hand?

Both are possibilities, but Salem Classical Fencing took a different tact and decided to ask it’s question on

Since I program computers for a living, this was right in my virtual court.

The solution turned out to be a fairly straight-forward programming challenge. I started with a tournament object. Within the tournament is a pool of fencers who are ready to spar and the number of concurrent matches. When the tournament starts, each match then asks the pool for two fencers who have not faced each other before. When the match is done, one fencer stays and the other returns to the pool. Another fencer is selected. And so on.

On the computer, the tournament takes about a quarter of a second, producing a nice schedule of possible match-ups.

I wrote the code in about an hour last Friday then connected with Jill, the director of the organization, this morning. Shipping the code off, I’ll provide any tech support they need. With a little luck, I have saved them some volunteer hours.

And if they find a better solution? Great! My solution is just one of many made possible through a world wide web of volunteers.

After all, it was just a simple matter of programming.

About Eric Winger

Our perception of time is key to how we use our time. The most fundamental way to change that perception is to give our time. This opens us up to new opportunities and ideas from which we can build to really make a difference. ... Yes, we *do* have time to make a difference!
This entry was posted in In the world and tagged , . Bookmark the permalink.