July 8, 2011
Delphi For Fun Newsletter #60
Summer is flying by; outdoor activities and family visits are rightfully taking priority over programming.
I haven't done as much with Delphi XE Starter (DXE) as I had hoped. There are a few irritating items in the IDE interface that I'm sure are fixable, but I haven't taken time find the solutions. The one I recall right now is that setting up the Watches window the way I want it does not "stick" and must be set up again each time I start the program. And those, plus the fact that there are some incompatibilities between DXE and earlier versions, make it easy to stick with Delphi Version 7 for the time being.
Nothing major on the programming front this quarter; a few fixes and a number of fun "Beginner's Level" programs which needed less than a day to code and document. Some of the more complex programs will have wait until fall. Here's a summary of the new and changed programs since last time.
April 5, 2011: I issued our 1st quarter newsletter on Sunday, so if you think you are subscribed and didn't receive it, try subscribing again. We have about 800 subscribers and 20 or 30 get unsubscribed with each issue because mail boxes no longer exist, are full, or otherwise cannot receive email. Most of each newsletter matches the current contents of this page, except sorted in ascending date sequence, so if you didn't get it, you haven't missed much. Back issues are also available from the Subscription page. The current edition also includes some additional information and links about the new Delphi XE Starter edition.
I'll be incorporating the links from the newsletter into a new "Delphi XE Starter Notes" page in the Delphi Techniques section of the DFF. I'll also include user experience feedback from viewers who are trying Delphi XE Starter so send along any questions or interesting tidbits you run across . I'll be sticking with Delphi 7 for now to maintain compatibility for users with later Delphi versions including XE.
April 17, 2011: We spent several days visiting family in Alabama last week. Had a chance to catch up with the grand kids who missed the Christmas family trip. We hadn't seen them in over a year during which time the granddaughter got smarter and more beautiful and the 14 year old grandson's voice dropped 2 octaves! Still more interested in sports than girls though.
I spent the last few days playing with improving the search in AlphabetGrid Version 2 posted today. The program uses our dictionary class to identify words in a letter grid. It now uses partial words to recognize when no words start with those letters and it is OK to stop searching that path. Search time for the default puzzle which originally took 35 seconds now finishes in 4 seconds! The UDict dictionary unit now also handles the Unicode formats in Delphi XE. I posted some notes about this on the Delphi XE Starter Notes page.
April 23,2011: A fix was applied today to create
Self Describing Sentences Version
2.1 which fixes a problem that showed up when I tried to solve this "Easter
Egg" puzzle. I added that puzzle to the program, just for the heck of it.
May 3, 2011: Fill this 5x5 grid box with the letters M, U, S, I, C. The constraint
is that the same letter must not appear more than once in any column, row or
diagonal. Today's program,
Music Box Puzzle,
was derived from the May 1st page of my favorite source for program ideas: the
365 Brain Puzzlers Calendar
May 10, 2011: If 5 digit integers are divided by the sum of their digits, about 3000 of them divide exactly. The beginner's level program, Recurring Quotients, asks which of the resulting exact integer quotient values occurs most often. The program uses 36 user written lines of Delphi code to answer the question. Unfortunately, I built the web page describing how to solve it, but forgot to upload the code. Links are now there.
May 17, 2011: Time for one more Beginner's Level program before we head off to another graduation. Last weekend our oldest granddaughter graduated from University of North Carolina with a BS in Biology, next weekend the 2nd oldest grandson graduates from high school with plans to start his Engineering major at Old Dominion University next year. No programmers so far, but there's still hope among the 4 grandchildren not yet in college. Actually, there are probably more engineers who can program than there are programmers who can engineer, so engineering is my recommended major even for those with an interest in computers.
The puzzle requires us to assign unique digits to each of the letters in the word KNIGHT in such a way that the numeric equivalent is a perfect square and the numeric value of KING is also a perfect square. So, for example, if we assigned 123456 to represent KNIGHT, then KING would be 1324, not a square therefore not a solution. The puzzle was adapted from Mathematical Bafflers , Angela Dunn, 1980, Dover Publications. About 35 lines of user written code in Squared Chess Pieces finds the unique solution. The link is to a Beginner's page which contains this new program along with 17 other short programs.
June 6, 2011: Program production has slowed the past few weeks. I blame graduations, some nice summer weather (finally), upgrading the wife's computer from XP to Windows 7, and the 7-year-old germ carrying grandson who put us both under the weather for a few days.
Here is a Delphi Techniques program which might be useful to me and hopefully to others in the future: OnIdleExit Demo demonstrates the technique for performing background calculations in your Delphi programs without impacting the user's ability to interact with the program.
June 12, 2011: Version 2.3 of our Print Preview Demo program in the Delphi techniques was updated to improve margin handling again. There are subtle differences in the way that the non-printable area around the edges of paper are treated relative to displaying an accurate preview image on a screen. Maybe I have it right this time.
June 17, 2011: Lessons learned from last week's OnIdleExit Demo was put to good use this week with Version 2 of Spellbound which adds user play to the original program search code. Spellbound V2 asks you to find as many words of a given length as you can from a given set of letters. In this version the program does its search in the background, usually completing in about the time it will take you to find and enter your first word. Spellbound runs a standalone program or as a selection from our Wordstuff3 set of word oriented programs.
To subscribe or unsubscribe from this newsletter, visit http://delphiforfun.org/newsletter.htm
306,100 visitors and 304,900 program downloads in the past 12 months!
Copyright © 2000-2015 , Gary Darby
All rights reserved.