April 1, 2013 (No foolin'!)
Delphi For Fun Newsletter #67
Spring has (perhaps) finally sprung here in Southwest Virginia. Three days with temperatures above 50° F have melted most of the ice and snow from last week's ice storm. The Crocuses are blooming and the Daffodil plants have bravely poked their heads above ground a few inches so hope has returned.
I would like to thank whoever has been responsible for the increased use of the DelphiForFun Amazon link this quarter. The link appears in the left hand column of the DFF Home page. I became an "Amazon Associate" because that was the only way to gain access to the links for books that were the source of various problems and projects here on DFF. An Associate gets 1% to 3% of each sale made using the DFF links, including any purchases made when the DFF portal is used. Commissions have averaged a few dollars per year ($11 in 2012). Commissions in the first quarter of 2013 have totaled $78! Either someone is a very big Amazon customer or has enlisted a group to participate in supporting us. I would love to know who and how, but most of all encourage them (and you) to keep it up!
Highlights of the quarter include a computer version of a challenging game, Paletto, designed, produced, and marketed by a couple of smart German entrepreneurs, a couple of studies of interesting properties of integer partitions and the number 2013, a few puzzles to help find solutions to puzzles in our 2013 "puzzle a day" calendar, and the first postings of DFF program converted to Lazarus. Lazarus emulates much of Delphi's syntax and capabilities and has the advantage of being a free front end to a free Pascal compiler!Here's the full list:
January 4, 2013: The first posting for the new year examines a couple of interesting characteristics of 2013 posted a few days ago on another website. It turns out that they are not quite as interesting as the author of that article had thought. Visit Interesting 2013 for more information and to download the test program.
January 9, 2013:
Our puzzle calendar this year is called "The Brain Game" and the first week included this "Word Grid" puzzle:
"A nine letter word is starts at a corner and spirals into the center. Fill in the missing letters to find out what it is."
Harder than it looks, but I say that it ain't cheatin' if I
write the program that solves it! Find the solution or better yet, check
out for yourself the 100 lines or so of user written code that solves it in the
Word Grid program in the Delphi
Techniques section of DFF.
January 15, 2013: I spent most of the past week trying to improve our Sudoku Helper/Solver program to provide more complete hints. No success yet - the routine which identifies valid numbers for each cell and displays the hints is called from 21 places in the program and I couldn't fix one without breaking another. So I'm moving on to Plan B, but in the meantime Sudoku Version 3.1 fixes an annoying display problem for systems using enlarged text and also adds the missing "Congratulations" display when the user completes a puzzle.
January 22, 2013: Here is a game and a puzzle based on it. The game is Paletto, an interesting board game developed and marketed in Europe. It involves removing colored markers from a random board following a couple of simple rules. The puzzle suggested by a German DFF viewer and owner of the game, involves placing all of the tiles on the board using a couple of different, but still simple, rules. See Paletto Puzzle for more details
January 26, 2013: Here is the January 23, 2013 puzzle in our
current "Brain Game" page-a-day calendar:
On a different note, a spammer has discovered that my feedback link does minimal validation before submitting. I've received 75+ spam emails by that route in the past 24 hours. I've added some validation to the fields which may help, but if not, expect one of those "prove you are a human" mechanisms to show up on the feedback page soon.
February 1, 2013: Another puzzle from our 2013
"Brain Game" page-a-day calendar. I worked on this one for about 10
minutes before deciding that a 10 minute program would be more fun and
more likely to guarantee a solution. It took more like 30 minutes
to write No_3_In_A_Row, but it does
find the two solutions in less than a second.
February 4, 2013: I received a note today from Dieter Stein, creator of the Paletto game I cloned last month. He liked the program but pointed out that the initial game board setup should not allow adjacent balls or tokens of the same color in the vertical or horizontal direction. I corrected my program and reposted Paletto Puzzle Version 2.1 today.
February 7, 2013: PosExTest is a program in our Delphi techniques section that defines and tests a substitute for the Delphi substring search function, PosEx. PosEx was not available in versions before Delphi 7.
February 17, 2013: If we break an integer, N, into smaller integer parts which add up to N, the sets of numbers are called Integer Partitions of N. They have been the subject of study for a few hundred years and are still studied today. A Google search will lead you down the path of discovery as far as you care to travel. My Integer Partition Test program, Version 2 was posted today. In addition to counting and generating partitions for integers up to 375, it will generate partitions with a specific maximum value or a specific number of parts. Interestingly, for a given integer K, the number of partitions of each of the types is the same. Although it is generally not feasible to list all partitions of even a medium size integer (there are 190 million ways to partition the integer 100), the program can now calculate the partition for any position (rank) for any input number up to 375. So if you want to know the millionth, or billionth partition of 200, have at it!
February 20, 2013: It took a while, but a user
finally found a bug with the 3-player option in our Four In a Row game.
Retracting (undoing) a move switches forward to the next rather than back to the
previous player. In the 2-player options it didn't matter of course but,
with 3-players, trying to undo a move advances to the next player and the "Reset"
button is the only way out. Four In A Row Version 2.3 posted today
fixes the problem.
March 1, 2013: On January 4th I posted a program investigating two erroneous claims made about interesting features of the year 2013. A viewer recently pointed out a problem with my proof that 2013 was not, as claimed, the smallest number which required 6 terms to be expressed as the sum or difference of prime numbers squared. I forgot to select only prime numbers, but the claim is still untrue in the corrected version. 432 + 132 - 32 + 22 does the job with 4 terms. In fact, I believe that the 15 is the smallest number requiring 6 prime squared terms if individual term values are limited to the target number value. If you need help finding expression for 15, search button for Case 2B in Interesting 2013, Version 2 can help.
March 3, 2013: It didn't take long to come up with Interesting 2013 Version 2.1 which takes advantage of the "prime numbers only" search to make searches 100 times faster than the previous version. Also my new candidate for the smallest number requiring six terms is 11. If we allow term sizes to be up to two times larger than the target number then the smallest number requiring six terms 2 (= 32 + 32 -22-22-22-22).
March 14, 2013: A new Utility program, Bulk Find & Replace, was posted today.
Like most of the programs in the Utilities section of DFF, it was motivated by a specific problem that I had. While at it though, I made the program generalized with these options and features
Let me know if you find it useful (or especially if you find bugs!) .
March 28, 2013: We're embarking on a grand experiment today - converting DFF Delphi programs to Lazarus/FPC. Lazarus is a frontend IDE (Integrated Development Environment) for FPC (Free Pascal Compiler). It knows about Delphi and, in it's current form, does a pretty fair job of converting Delphi source. For someone wanting to use DFF programs on a non-Windows platform or who wants to modify DFF code but does not have access to Delphi, it's a no-cost approach worth a shot. Lazarus Revisited introduces the process I used to convert most of the widely used DFF Library unit and a dozen or so programs using them.
Inventor, Artist, or Computer Programmer - The keys to success are shared by all
To subscribe or unsubscribe from this newsletter, visit http://delphiforfun.org/newsletter.htm
377,055 site visits and 385,170 program downloads in the past 12 months!
Copyright © 2000-2017, Gary Darby All rights reserved.