One more entry to the Phaser challenge

Since I keep receiving entries to my programming challenge, I’ve compiled a list.  New entries will be added to that list as they are received.   Last Saturday (4/3/04) I received another C# solution from Frans Bouma.  In his own words:   “Hi,   This week I started my phraser solution in C#, and today…

4

Solutions to the Phraser programming challenge

On 3/29/04 I posted a programming challenge: given a telephone number, find all possible ways to represent it using English words and digits.   Several people have submitted their solutions.  This page contains a list of all the entries I received, in the order of submission.  It will be updated as I receive more solutions.   From…

8

My own solution to my programming challenge

I posted this programming puzzle on Monday this week, and have received a solution in Fox Pro from Calvin Hsia, one in C# from Justin Rodgers, and one in C++ from Michael Scholz.  So we have 3 players using 3 different languages.  Cool!   I promised to post my own solution, and here you go. …

19

Another entry to the phraser programming contest

I received another entry to my programming contest in email:   From: “Michael Scholz” Sent: Thursday, April 01, 2004 5:34 PM   I started working on your programming contest, but I quickly tired of optimizing for how-clear-the-code-is. But then, when you posted some clear code with the slow algorithm, I figured I’d finish what I’d…

4

Entries to my programming challenge

Calvin submitted the first entry to my programming challenge.  And (surprise!), it’s in Visual Fox Pro.  I didn’t know Fox Pro can do that!  It’s always nice to see unconventional ways to solve a problem.   Calvin’s post includes the source code, comments, and some anecdotes.  I suggest you check it out.   After studying…

3

Programming Challenge: Phraser

Want to prove that you are the best programmer money can buy?  (OK, I know you are not for sale, but your boss may need a friendly reminder that it’s time for your next big raise.)  Here’s your chance:   On a telephone keypad, the number keys 2 — 9 also carry letters on them…

44

Comments on an Answer to a Clearest Code Challenge

Jaybaz_MS posted this Clearest Code Challenge, and later provided his own answer.  I wrote some comments (and more) on it, which you might want to check out.


Using C++ Member Function Pointers

  I don’t know about you, but the C++ syntax for member function pointers always eludes me.  Every time I would spend half an hour or more deciphering MSDN to get the exact syntax, only to completely forget it the next time.  Oops.   I can think of three reasons why this is happening:  …

3

Using template specialization in C++

  We all know that C++ templates can be used to write generic code, e.g.   template <typename T> class Array { … };   Then we can use the same template to generate code for different template parameters.  This is called instantiation of the template.  e.g.   Array<int> x; Array<string> y;   However, sometimes…

1