January 5, 2013
Delphi For Fun Newsletter #66
Home safely from our 2-week September "scouting" trip to Switzerland. The wife and I had a great trip but didn't find anywhere that beats the Bernese Overland which we have visited as often as finances allowed for the past 40 years. If the idiots in Washington don't push us off of the fiscal cliff, we hope to return with the family next June. Here at home, winter has been slow in coming. I haven't shot this year's deer yet, at least partially because the warm temperatures wouldn't let it hang for more than a day or two. But the silver lining is that the winter firewood supply is holding up well.
Since I wrote the previous paragraph in November, we've moved on to 2013 and Congress has "kicked the can" again because the majority do not have to courage to stop spending more taxpayer money than they collect. On the positive side, this year's deer is in the freezer and plans for our family trip in June now include a week on the NCL Epic for a Mediterranean cruise followed by a week in Lauterbrunnen Switzerland.
The usual wide range of topics were visited in this quarter including a new release of our library file of common unit, DFFLIBV14, consolidating a number of unit changes since the previous release. Also , a new program that knows how to break words into syllables, one that calculates "Blue Moon" dates, and one that replays Chess games recorded in PGN notation. An update to help a fellow verify the accuracy of a "gun" used by law enforcement to shoot cutting slugs at potentially explosive devices was developed. That sounds like a worthwhile project! A couple of week's "work" in December with a "Geocacher" from Germany resulted in significant improvements to our Logic Puzzler Solver program as we tackled the toughest problem I've seen to date. Apparently there is an organization that combines combines physical Geocaching with logic puzzles providing clues. Fun for him and fun for me!
Here's the entire project list:---------------------------------------------------------------------------------
September 4, 2012:
PGN (Portable Game Notation) is a widely used format for recording chess
games for historical or study purposes. There are many playback
programs available and the world does not need another. However a DFF
viewer requested it, and I could not locate an existing one written in Delphi, and
it sounded like (and was) an interesting and challenging project. So here's the DFF
version of Chess PGN Player.
September 11, 2012: The first bug fix for Chess PGN was posted today. Chess PGN Player Version 5.1 fixes a couple of significant errors related to embedded comments in PGN files and the handling of the button which sets the default initial file and game when the program starts.
October 5, 2012: Home again after a 3 week trip to our 2nd favorite place on earth, (after our mountain home), Lauterbrunnen, Switzerland. We've been visiting every few years since discovering it in 1967. This time we added a few of the rail excursions (over-rated), Jungfraujoch "Top of Europe" rail trip to 11,000 feet (over-rated), and 3 days in Lucerne (view from Rigi Kulm is impressive).
Only 2 bug reports while we were gone and it turns out that both had already been fixed. But I did polish up an Intersecting Circle Centers program I had been working on before we left in response to a user's request. A previous version had explored the derivation of the math to determine the intersection points and the intersection area for two circles. This one solves the inverse problem;. given two circles and the area of their intersection, how far apart are the centers?
October 8, 2012: Oops! For Delphi programmers: On August 29 I announced a fix for a rounding error in our big floating point arithmetic unit. I had identified, fixed, and tested the changes. However, I forgot to upload the DFFLibV14 library unit which contained the fix! Library unit DFFLibV14 has been really re-posted today with the revised UBigFloatV3 unit.
October 15, 2012: Many integer arithmetic problems and puzzles require that the individual decimal digits be separated from or combined into multi-digit numbers. Here is a Digits and Numbers program in our Delphi Techniques section which illustrates the technique using a few problems adapted from the latest addition to my library, Challenging Mathematical Teasers (Dover Recreational Math) by J.A.H. Hunter.
October 22, 2012:
A user wrote a few weeks ago asking how to rotate JPEG clock hand images
to simulate an analog clock. That triggered another
learning/relearning experience figuring out how to do it. Delphi
Techniques program JPG Clock is
the result. Not that the world needs another analog clock but it did make an
interesting programming project with plenty of room left for future
October 27, 2012: Most of this week was in winter preparation mode; topping off the fire-wood piles, checking deer trails, harvesting apples that stubbornly hang on, setting up feeders to help our wild turkeys through the hard times ahead, etc. It looks like we may get our first real frost with "Sandy" tomorrow, the tropical storm the that decided to head north.
I did update to JPG Clock Version 2 which reduces processor time and improves accuracy. I have a "atomic" watch which synchronizes itself every night with the NIST (National Institute of Standards and Technology) radio signal. Most Windows systems synchronize their times weekly with the NIST time-server website. It still surprises me to see the wristwatch and computer clock second hands within a second of each other.
November 4, 2012:
I ran across a
Simple Slot Machine program in my Future
Projects folder the other day. It was submitted by a viewer several years
ago but got lost in the shuffle. The code uses some Delphi features that I
haven't used much and it gave me a chance to practice my probability skills by
calculating the theoretical odds compared to simulation results, so I cleaned it
up and posted it today.
November 8, 2012: I found another reason to modify Clear Blanks recently which led to posting Clear Blanks Version 4 today. One of the minor irritations of using Delphi 7 has been their final Help file update which included Kylix (a Delphi 7 Linux version) help items in the help table of contents file. This typically added extra time and an extra click to look up a Windows version VCL control. But every Kylix help entry in the table of contents contains and identifying string which Clear Blank Lines can now use to remove. Like magic, my Delphi help search no longer knows that Kylix ever existed and is much friendlier to use!
November 15, 2012: Probability Calculator was an attempt to present solutions for some basic and more advanced probability problems like coin tossing, dice throwing, drawing balls from bags or cords from decks, etc. The original version had a dozen or so sample problems for which one could determine the probability of single trial and for expected if an experiment is repeated multiple times (e.g. chance of 3 heads if 10 coins are tossed). Probability Calculator, Version 2, allows users to define, solve, and save additional problems.
November 23, 2012: I was bragging to my granddaughter today about hard problems I had solved. One of the hardest was Kirkman's Schoolgirl Problem; taking 4 years to develop a version which could find all 7 unique solutions. Today's review resulted in a small cosmetic upgrade to Version 3.2 of Kirkman's Schoolgirl Problem program in order to improve view-ability of the pages.
December 2, 2012: A viewer uncovered an infrequent error in our slot machine program when the results the program sees as the dials stop spinning doesn't match what the user sees. It turns out that it only happened when the third dial's run time expired during the few milliseconds that it was being updated. That has been corrected and a second slot machine with three payout conditions was added in Slot Machine, Version 2 posted today.
December 16, 2012: It has been a busy two weeks between deer hunting, family vacation planning for next June, and working on a problem that my Logic Solver program hasn't cracked yet. The deer is in the freezer, and the planning is down to filling in a few details so two out of three isn't bad. Logic Solver Version 5 posted today moves a step closer to solving a really hard "Geocaching" puzzle submitted by viewer Martin several weeks ago. Follow the link for more details but I'll probably post another update in January. For now, Christmas season has bubbled its way to the top of my "ToDo" list.
December 19, 2012: It didn't take long for user Martin, (known as xMRi to the GeoCaching world), to point out what wasn't working in my program. Logic Solver Version 5.1 has the fix that allows the program to solve the "Mystery Könige" puzzle previously described and fixes several additional problems. All in all, the hours spent by Martin finding and me fixing and enhancing the program has made a much improved product. Thanks for all your help Martin. It's been fun!
December 22, 2012: Merry Christmas!
Time for one more small update before heading out to spend Christmas with a daughter and her family. Nine year old Nathan is the youngest of our grandchildren, so Christmas at his house provides the best toys to play with! In the meantime Clear Blank Lines Version 4.1 fixes a couple of small issues when removing blank lines which have embedded Tab characters and also not saving removed blank lines to the "Deleted lines" file.
December 30, 2012: And a Happy New Year!
The flat tire is fixed, we have power back after a 4-day outage caused by a major ice storm here along the Blue Ridge, and Congress is pretending to avoid falling off the "fiscal cliff". All is almost right with the world again. Here's wishing that all of your (and my) problems in 2013 be no worse than these.
Quotes with advice for Congress
To subscribe or unsubscribe from this newsletter, visit http://delphiforfun.org/newsletter.htm
372,000 site visits and 328,300 program downloads in the past 12 months!
Copyright © 2000-2017, Gary Darby All rights reserved.