October 4, 2014
Delphi For Fun Newsletter #74
Fall is in the air here on the mountain. Crops are in (sounds better than "the weeds have taken over the garden" J), firewood is stacked, frost is predicted here this weekend, and deer season opens in a month. Sounds like fall to me!
We have just returned from a two week visit to Croatia and a few neighboring countries. This was our first, and likely our last, bus tour. We saw a lot and learned a lot but when one takes the full course of optional excursions as we did, the pace is exhausting for these old bones. We'll need all of October to recover!
On the programming front, I've decided to cut back on programming time to spend more time on "bucket list" items while we can. Here are links to 3rd quarter projects.
July 13, 2014:
StarsOnAGrid implements solving and allowing users to create, modify and solve puzzles of the type defined as follows::
Given a square N x N grid divided into N sections, place a star in each section with no two stars in the same column or row, and no two stars diagonally adjacent to each other.
The program allows grid sizes from 2x2 through 10x10, although no solutions
exist for sizes less than 5x5.
July 23, 2014: Feedback from the May posting of our Logic Solver program and an unsolved Geocaching problem led to Logic Version 5.4 posted today. Bug fixes include:
July 29, 2014:
Expressions From Integers Version 2 adds an extended version of the original puzzle. This one has multiple completed input figures and a single target figure with one value missing. The strategy for this one is to find an single expression template which will evaluate to the number position containing the "?". The same value positions and operations applied in the same order for each figure must equal the value in the "?" position for that figure. The successful template when applied to the incomplete figure will provide the required value.
Another puzzle programming exercise from my favorite source: the
Mensa Puzzle-A-Day Calendar.
August 15, 2014: Sometimes the "never give up" attitude is more curse than blessing. The current puzzle is an example. This recent Mensa calendar puzzle is the 2nd example of this puzzle type and prompted me to create Square Word Grids, Version 2.0. allowing puzzles to be manually entered. (The original puzzle was hard coded to produce the default puzzle.) Version 2 of the program also adds the ability to save and restore puzzles.
However integrating creation of puzzles with the original solving functions turned out be much harder than I anticipated. I fought with it all week and I'm still not happy with the result. The puzzles are not likely to be very popular and I'm ready to move on to other projects.
The "PuzzleFile.ini" file included with the downloads contains this
puzzle for loading and solving yourself or letting program find the
solution. To add to the disappointment, it turns out that there are no
solutions using words in the included medium size dictionary but two solutions
using the large dictionary! "C'est la vie", I guess.
Here's a simple Beginner's level program I wrote this week in response to a user's email asking how to remove lines shorter than 199 characters and truncate lines longer than 199 in a text file. The barebones program CopyTruncateStrings uses about 15 lines of code to accomplish this and a few more lines to display the counts. Lots of room for adding features, but hopefully it does the job for him. The link above is to our "Beginner's" webpage; scroll to the bottom to find and download the program if you are interested.
September 6, 2014:
A "Cut List" shows woodworkers how to cut a set of parts from a set of available stock. This program creates a diagram showing the stock pieces and how the required parts may be cut from them. The original program was posted in 2003 and has been the most downloaded program on DFF for many years. It is a bit complex so I have avoided making changes, but recently added support for Unicode characters in project files names at a user's request. He says it is working for him, so here is CutList Version 4.0 with the Unicode feature and a new feature which will display multiple solutions, not just the one that the program thinks is the "best". Program changes required the use of a much newer version of Delphi than my old favorite, which may have introduced undetected errors. As always, please use the feedback link to report problems.
September 28, 2014: We're back from a two week visit to four of the six countries which make up the former country of Yugoslavia: Croatia, Slovenia, Montenegro and Bosnia-Herzegovina. Beautiful country with reasonable prices, an interesting but complicated history, and more tourist crowds (and rain) than one would expect in September. We're glad we went, but also glad to be home.
created Brute Force Version 3.2 today to
let it successfully solve this Sept. 26 puzzle from our Mensa Day-by-day
calendar. The original version of the divide operation ignored remainders
and produced two solutions. This version allows the user to specify that
quotients divide dividends exactly and find only the correct one.
Assume you pick a pancake at random, and it is OK on the side
you can see. What are the odds that it
You can find the
downloads of source and executable at the bottom of our
306,000 site visits and 290,180 program downloads in the past 12 months!
Copyright © 2000-2017, Gary Darby All rights reserved.