Delphi For Fun Newsletter #24

[Home]

 


 
Sunday January 27, 2002
 
Delphi For Fun Newsletter #24
 
Welcome to 2002! 
 
It's been six weeks since our last newsletter,  I guess time really does fly  when you're having fun.   First of all, let me apologize for the non-newsletter you probably received yesterday.  I was trying to fix up the subscriber list on a new mail server and hit the wrong key. 
 
A few program fix-ups have been posted since last time,  as well as a few new programs and a utility or two.  The MakeCaption utility  procedure displays a title bar in two pieces, left and right justified.    I'll be using it as a simple way to add copyright notices to programs. 
 
We now host three schools with free online book search pages for their "Accelerated Reader" and "Reading Counts"  reading programs - using our Delphi search program of course.  I think we could have lots more if the word gets around (that's a hint).  
 
I was trying to get  the "RushHour"  puzzle documented  and posted before sending this, but it's one of those 5-year old sparsely documented programs.  So I  guess it will be a few more days. 
 
 
In the meantime, here are the   "What's New"  details since last time:

December 10, 2001:  Today's programming project was my second Delphi CGI program, one  to automatically handle newsletter subscribe/unsubscribe requests.   It actually just takes the information you supply on the Newsletter page and submits an email request  in a  format that the list-server  can understand.  (The "list-server" is the guy that reads the list of email addresses and sends out newsletters when  I send him one.)    The program even seems to be working!  If you try to subscribe (or unsubscribe) and have any problems, let me know.    

December 14, 2001:  I ran across this problem in a Donald Knuth paper the other day and thought it would make a logical addition to our "T-Shirt" series.  (T-shirts with "interesting" numbers on the front and the reason that they are interesting printed on the back.  Or should it be the other way around?   We'll let the marketing guys decide.)    The question for T-Shirt #2 is "The smallest 3 digit number equal to the sum of the cubes of its digits".  As usual, a simple problem can lead to not-so-simple investigations.  But there are less than  50 lines of code in the "Brute Force" solution which will get us started.    

 

December 17, 2001: We're starting a project to  revisit existing programs with the goal of adding usability features.  A number of interesting  puzzles are posted as versions that show computer solutions but do not allow user play.  (That's not the most fun part for programmers.)    It recently occurred to me that many of these would be of interest to non-programmers, specifically teachers looking for innovative ways to use technology in the classroom.   A number are usable in their current form - I've listed some in the Notes for Teachers section.  Here's the first re-posting of a puzzle that previously lacked user play  but now has it , the Seven Coins Puzzle.   


December 20, 2001:  A second school has been added to our Reading Program search site, Saint Ann School in Bridgeport CT.    I've learned that there are a number of reading programs available;  Saint Ann School has  "Reading Counts"  from Scholastic.  Here's a link to the new book search index page in case you want to check it out. 

I finally got around to tabulating the results of the "Future Postings" voting page.  I've browsed the results periodically I during our first year online, usually just to see if anyone had voted for something I felt like working on anyway.    I have the program written to tabulate the results now, so I may be running it more frequently.   Several of the most requested will also require the most effort to document, a necessary but not so fun part of the job.   But I need to do it, just to see if I can still figure how they work. :>)    

December 21, 2001:  I just posted a MakeCaption procedure over in the Delphi Techniques section.  It displays titlebar captions in two pieces, left and right justified.   Harder than one would expect since windows makes it difficult to get at that titlebar information.  

December 22, 2001:  Well, we're off to the Virginia grandkids to find Santa, then we're bringing them back to the mountain for a few days - so I believe I'm  booked for the rest of the  year. Lot's of good things waiting in the wings though.  

December 30, 2001:: If you downloaded the MakeCaption routine posted a week or so ago, you may want to do it again.  I discovered today that the width effect of italic font style in captions was not accounted for.  It is now.      

January 2, 2002:   It looks like the holidays are winding down - we plan a trip to Alabama this coming weekend to help granddaughter Sarah celebrate her 8th birthday then we'll get going on DFF projects again.  Spent a pleasant few days working with Chris (7) on his Pinewood Derby car, practicing trumpet duets with Kaitlin (10), and working with both on the "Logical Journey of the Zoombinis"  - still one of the best games around.   They are getting better than me at solving the puzzles there though - scary!.

While browsing DFF the other day, I ran across a note in the Scientific Grapher program write-up that promised more information on converting from Polar to Cartesian coordinate systems; necessary in order to display some graphs.   Today I  posted this graphical demo of  Polar-Cartesian coordinate conversion  over in Math-Topics. 

January 11, 2002:  We're back!  Here's version 1 of a Doodler program which let's you scribble on a screen area  and optionally have lines reflected at 90 or 45 degree increments.      Version 2 in the works will add additional drawing features as well as ability to print and save images.

 
 

Numbered T-Shirts  

January 14, 2002:  A month or so ago we introduced the T-Shirts 2 problem - find N digit numbers that are equal to the sum of the Nth powers of their digits.  For example, 153= 13+53+33,  1634=14+64+34+44,  etc.    Numbers with this characteristic are called Armstrong numbers or Pluperfect Digital Invariants.  In base 10, it turns out that there are 88 of them, the largest containing 39 digits!  Calculating these numbers is non-trivial once we get over 10 digits or so - more of the kind of stuff that those lucky PhD's get paid to play with.   Here's the version I call T-Shirts2  XXL, that will do them all  (although  I haven't done it yet).   

In the process I found and fixed a small error in the "Add" operator in the  Big Integers unit.  If you have previously downloaded the unit, do it again. (Or if you download T-Shrts2 XXL source, the new version is included) 

January 15, 2002:  T-Shirts2 XXL just completed finding all 88 Armstrong numbers (see above if you don't know what they are).   Here's a link to the program output page, in case you  want to check them  manually  <g>.  The program ran for a day and a half - surely we could reduce  that time by at least 50%....

January 17,2002:   Sliding Coins:  The problem is to get from Start position   to     End position  by sliding big/small or small/big coin pairs without changing their orientation.  Here's a minor update to the previously posted Sliding Coins puzzle - it improves colors and the dragging of coins. Not really very significant, just one of those "30 minute"  changes that took a week to do.   Good programmers, bulldogs, and other overachievers share one characteristic - we don't give up.  

Making ChangeJanuary 20, 2002:   How many ways can we make change for $1 using the six coin values ($1, 50c, 25c, 10c, 5c, 1c)?   The answer is well known, but here's a Making Change program that will show you the solutions, plus solve a couple of additional change making problems.  Now available in Beginners and Intermediate versions, take your choice.
 
 
______________________
Gary
http://delphiforfun.org
______________________

"The difference between the impossible and the possible lies in a man's determination." -- Tommy Lasorda
 
"It's kind of fun to do the impossible." -- Walt Disney

 
To subscribe or unsubscribe from this newsletter, visit http://delphiforfun.org/newsletter.htm
 
13,045 home page visitors!