Delphi For Fun Newsletter #83
January 6, 2017
Welcome to 2017! It looks like the first big snow storm to reach this far south will actually pass south of us here in SW Virginia. They're predicting more snow for Charlotte and even Atlanta than here. Fine with me. My tractor and snow blower are ready if needed but perfectly happy to wait. I shot my two deer during the first week of the season in mid-November, but they have been scarce since then. Not so of the bears. At least 5 decommissioned turkey feeders 4 times this fall until I adapted the Alaskan bear-proofing trick of points-out spikes in boards. Covering windows and doors works for the Alaskans; nailing them to the feeder's tree trunk is working for me,
So..... we will soon have a person who likely has serious mental health issues as our chief executive. I've adopted the prostate cancer patient's strategy of "watchful waiting" . Maybe there are enough sane people on his staff and in Congress to run the country while he Tweets self-congratulatory blurbs and insults to those who challenge or otherwise displease him. Emigration to Canada is being held as Plan B (or C or ... Z) K.
Even smart people often run afoul of the "Law of Unintended Consequences". For politicians, it is often from ignoring how capitalism (or nature) works.
Programmers are no strangers to the effect. Almost every problem I "fix" causes a new problem that I did not foresee. No simple illustrations come to mind, but programmers will appreciate the scenario. It's called debugging and is as satisfying as creating the original solution design model, especially if you are doing it "for fun" without a time deadline.
Here are the "What's New" items for the 4th quarter:
October 6, 2016: The fall quarter newsletter was sent to subscribers a couple of days ago. It's available here in case you missed it.
There is significant news that did not make the newsletter: The free "starter" version of Delphi has been extended by Embarcadero!. Thanks to viewer Mac for the heads up with the info. This is the first free release that I recall since Turbo Pascal became "abandonware" in 2002 and, according to Wikipedia, an Explorer version in 2005. I wasn't excited about these because they did not include the compiler source code which was (and is) a valuable learning resource. The new free release is at Delphi 10.1 Berlin Starter Edition and still has the "no commercial use" restriction but does include the source code! Mac also says that it is only available in the 32 bit version which is fine for most users, including me. They do say "Offer may be withdrawn at any time", so don't delay if you want to check it out.
October 15, 2016: EasyCGI, the host site for DFF, has modified something in their structure which is causing problems with accessing this website. It is erroneously asking for authentication (Username and Password) when browsing to a page. The problem seems worse with Internet Explorer and frequently goes away if you just click the "Cancel" button in the popup window several times. There may be a similar problem when attempting to download program executables or source code zip files. Google Chrome seems to work more often than Internet Explorer or Edge. All browsers seem to be missing embedded pictures on pages, at least in Windows 10. I'm going over now to check the situation on other computers to check Windows 7 and 8.1. I'll post again here as things develop or problem gets resolved .
October 21, 2016: Although I never learned the root cause of the authentication problem with the website, it seems only to have affected files uploaded during a period of two of three days around the 15th. Most files I could repair by deleting and re-uploading pictures or page data. A couple required intervention by EasyCGI support. If you have trouble accessing pages or files on this website, please let me know.
October 23, 2016:
Two programs were updated today based on today's Mensa Calendar puzzle asking for 3 and 6 letter synonyms using all 9 letters in the word CARPOOLED. My Unscramble program is part of my favorite word puzzle solver collection, Wordstuff3, and should have been able to solve it, but did not. It turns out that the three letter synonym is PRO which our dictionary categorizes as an abbreviation which are not searched by default. Whether it is may be debated, but Unscramble had a hard-to-find option to include abbreviations which led me to cheat and peek at the answer. Selecting non-standard words like abbreviations is now much simpler with Unscamble V2, In the process of researching the problem, I also corrected some text scaling problems in the DicMaint dictionary maintenance program which allows words to be categorized as Abbreviation, Capitalized, or Foreign words as well as performing other maintenance tasks. Downloads for both can be found on the WordStuff3 package description page.
October 24, 2016: A viewer reported today that our CPU Speed demo program is being flagged as a virus or malware by some systems (including mine when I checked). The timestamps and size on the site match my local version, so I'm quite sure that it is a false positive for the imported item. I've left the source download in place but removed the executable download link. The source can be recompiled and run locally with no problems. Non-Delphians will have to find another source. Increased security rarely makes everyday operations easier, but it is the price we pay to avoid the catastrophic.
October 30, 2016: What does it take to be a good problem solver? It's a question that has interested me for years, primarily because the world needs more of us J. Farmers, detectives, mechanics, doctors, scientists, artists, and programmers are just some of the occupations where success is closely related to problem solving skills. I'm sure of some of the common characteristics (fact gathering, planning, divide & conquer, persistence), but there must be others. I should add "welcoming constructive criticism" to the list. I find it difficult to think about problem solving while doing the problem solving. Today's program, Grid Subdivisions, is a first attempt at documenting my processes, for programmers at least.
November 16, 2016: I've been working on testing and implementing some changes triggered by the availability of the free Delphi 10.1 Berlin (D10) compiler download. It has many enhancements over Delphi 7 (D7), and is a good candidate for new programs. The bad news is that many of the several hundred D7 based programs on the site would require at least minor modifications to compile on D10. Many of the differences are not new, but previous Delphi versions had price tags in the hundreds of $. Converting D7 source code to more recent versions is not something I look forward to doing "for fun". So here's the evolving approach and what I've changed so far:
A viewer recompiled our Akerue word finding game under D10 and reported that it compiled but did not recognize words entered by the user. The problem was that our dictionary program required changes to account for a new default string format using 16 bit rather than 8 bit characters; necessary for languages non-Latin alphabets, but a pain in the you-know what for us. The library unit which handles dictionary access has been updated to use 8 bit character strings and Akerue is working for compilation under D7 or D10. The updated library can be downloaded from that page and also from the other big dictionary user, WordStuff, which is wrapper for six other word oriented puzzles. I also updated our Delphi 7 - Delphi XE Differences page to include some notes about the D10 conversion steps recognized so far.
Time marches on, whether we welcome it or not. With Christmas fast approaching, I decided to get any postings for this month out of the way early. Here's the first/
Several months ago, I posted a program to solve a puzzle type
which requires placing letters in a grid so that no two alphabetically adjacent
letters are in adjacent grid cells, horizontally, vertically, or diagonally.
NoAdjacentNeighbors, V2.0 allows solving the first version of this puzzle
type that I've found that is not based on a 4x4 grid; This one is
5x3 and motivated me to update the program to allow multiple puzzle sizes.
I also added the ability to name, save, and restore puzzles. (After
reentering this one the first dozen or so times while testing, I decided
that saving/restoring was a good feature to have!)
December 12, 2016: TInteger is Delphi class supporting mathematical operations on arbitrarily large integers (thousands of digits). Methods were added today to allow these integers to be converted to number bases other than 10. (Remember from middle school that each position in decimal represents a power of 10 -- the 1's column, the 10's column, the 100's column, etc. Binary numbers, base 2, have the 1's, 2',s, 4's, 8''s column, etc.). Any integer , even one with thousands of digits ,can now be converted to or from a string in any base from 2 to 256. More information at thie Big Integers page. I know of no good reason for doing this except perhaps just for the "fun of it".
December 21, 2016: A recent "simple" logic problem from my trusty Mensa Puzzle calendar caused me fits when tried solving it with my Logic Problem Solver program. The problem "Thanksgiving.prb", contains the clue "Chris ate more turkey than the person who ate the slowest". In my transcription from the calendar, I typed "fastest" instead of "slowest" which made the problem unsolvable. After many hours of looking for the non-existent program bug, I finally went back to the original and discovered the real problem (me!). Logic Problem Solve V5.7 posted today does a better job of diagnosing invalid rules as they are entered. It wouldn't have detected my typing errors, but might shorten the time before rechecking inputs, next time,
"Robin Hood stole from the rich and gave to the poor. Somehow it seemed like a better idea when he did it then compared to governments doing it now!" -- Gary Darby (Programmer).
Quotes from past Newsletters (continued):
DFF News #17: May 1, 2001: There are some things which cannot be learned quickly, and time, which is all we have, must be paid heavily for their acquiring. The little new that each man gets from life is very costly and the only heritage he has to leave." Ernest Hemingway (1899-1961), U.S. author DFF News #18: May 29, 2001: "Don't wish it was easier, wish you were better. Don't wish for fewer problems, wish for more skills. Don't wish for fewer challenges, wish for more wisdom." -- Jim Rohn
DFF News #20, July 7, 2001:
"Contrariwise, if it was so, it might be;
and if it were so, it would be;
but as it isn't, it ain't.
-- Lewis Carroll
DFF News #21, August 14,2001: What this power is I cannot say; all I know is that it exists and it becomes available only when a man is in that state of mind in which he know exactly what he wants and is fully determined not to quit until he finds it." -- Alexander Graham Bell
329,500 site visits by 216,700 unique visitors with 345,000 program downloads in 2016!