Delphi For Fun Newsletter #85

July 10, 2017

Busy, busy, summer here.  Programming has taken a back seat to family and outdoor activities.  At age 78, that's probably the way it should be both for health and happiness reasons.  Last week we had 16 of the 17 children, grandchildren, and spouses visiting for the week including a surprise birthday party for my wife.  (17 of 18 family members attended if we count the unborn great-grandchild JJ).  We deeply appreciate the planning and effort it took, especially since the families span from Rhode Island to Alabama.   The grandson who didn't visit is playing gigs in Alaska, but plans to claim a piece of his inheritance and move here next spring.  I'm looking into acquiring a sawmill so we can build a cabin for him somewhere on the property.   I'll admit that the sawmill is partly to satisfy a "big boy's toy" wish on my part, but how often do you get a good excuse to buy an expensive toy?. 

I did spend some time in the quarter doing contract work on a "Flight Time Prediction" program and posted an update to the Latitude-Longitude distance units as a result, cleaning up and correcting a bug or two.  I know a lot more about "winds aloft" data now and how to collect wind data for historical study purposes.

Switching internet hosts to regain easy access for website updates is planned in the next month .  Hopefully the transition will be transparent to viewers.

Here's the best of the rest for the 2nd quarter:

--------------------------------------------------------------------------------------

April 21, 2017: Here's a Delphi demo, HeapsPermute, of an algorithm developed by J.R. Heap in 1963 which generates permutations of arbitrary data items. It is quite efficient because it swaps only 2 elements for each permutation generated. The disadvantage may be that that there is no apparent order in the generated permutations.  Search "Heap's algorithm" on Wikipedia for more information.  I plan to use the algorithm in a future "Made from scratch" puzzle solver which doesn't use the existing DFF Library. 

May 14, 2017:  Here's a  puzzle that required a 25 line program to solve (at least for me). If you want to try it on you own, here it is:

We have two normal 12 hour clocks that start running at 12:00.   One loses two minutes every hour and the other gains two minutes every hour. How many hours will elapse  before both clocks again show the same time?

Program FastSlowClocks simulates the two clocks by incrementing the times by 62 minutes (Clock 1) or 58 minutes (Clock 2) for each real hour interval. Starting at time 12:00  (00:00 really), clock times are displayed for every "real" hour until they again match.  The link above points to a Beginners page with 2 dozen simple programs described for beginning Delphi programmers, so scroll to the bottom of the page to see the entry for this one.  Viewing  the program results showed that I should have been able to reason my way to the solution, (but I didn't L).  If you just want to download the executable file to check your answer, clicking this link is a simpler way. 

May 23 2017:   I recently needed to extract information about a particular location collected over time and buried in many large files.  This was a one-time study, not worth writing a separate program.   In order to assemble the needed data  from several files, I modified our Text Search program to append selected records into an single text file  Text Search 2.2 posted today, now allows appending as  an alternative to overwriting an existing file with the same name. 

June 8, 2017: FrontPage, the website builder used here at DFF is on life-support and options for recovery seem to be limited.  Long time viewers have heard this song before; the basic problem is that there is no easy way to convert to any other product.  Best advice seems to be "save the text and convert each page manually"; a job that sounds like weeks or months  of "not-so-fun" time to get back to what I have now.     Currently, the only way to update the site is to edit a local copy and upload the revisions via the FTP transfer protocol. This approach has introduced a whole new set of problems for a newbie like me.    

In any event, these are my problems, not yours - just be patient while I learn and search for solutions.  I do have a couple of changes to post - the first is an expansion of our Latitude-Longitude Distance unit and the test program for it,  If you're interested in that sort of thing, here's the link to the  LatLonDistanceTest page with more information.

June 12. 2017: Brute Force is my "go-to" puzzle solver for an amazing number of puzzle types (50 sample puzzles included in the downloads).  It solves by exhaustive search ("trial and error") if they can be described with a set of integer equations with a limited range of solution values.  I recently checked to see if it could solve the "Matchstick" puzzle for which I posted a user-play version a couple of years ago.  It turns that it could, even though I had to add two additional operators to describe partially burned matchsticks.  Brute Force Version 3.5 has the details and download links.

------------------------------------------------------------------------------------------------------------

Quotes on Aging: 

  • Age is an issue of mind over matter. If you don't mind, it doesn't matter. ~Mark Twain

  • Growing old is mandatory; growing up is optional. ~Chili Davis

  •  Men do not quit playing because they grow old; they grow old because they quit playing. ~Oliver Wendell Holmes

  • The true way to render age vigorous is to prolong the youth of the mind. ~Mortimer Collins

  • Growing old isn't for sissies ~Daughter's father-in-law

------------------------------------------------------------------------------------------------------------

Click to subscribe or unsubscribe or to provide Feedback.

357,500 site visits by 233,000 unique visitors with 411,000 program downloads in the last 365 days!