|
Home | Introduction | Newsletters | Programs | Feedback
|
|
|
WHAT'S NEWMay 11, 2012: ClearBlankLines is a program which removes entirely blank lines from text files. It was written several years ago to solve a particular problem I had with generated html code on my website when some unknown action added 35,000 blank lines to web pages. The pages were still viewable but speed slowed considerably, required storage space increased, and my HTML editor program choked. I have had a surprising number of emails thanking me for the program since then for helping them resolve similar problems. Today's update adds an option requested recently by a user to also remove leading blanks from lines which contain text. May 8, 2012: The CHOICE statement type was added to Logic Problem Saver Version 4.1 today after 5 days of challenging work. The full program is one of the most complex I've written, with about 6000 lines of code equally divided between handling the user interface and searching for a solution. It uses facts, and other logical relationships extracted from problem description text by the user. Choice statements simplify the user's job when we are told that a variable value is associated with 2 or 3 possible values of another variable. Such statements allows us to generate (negative) Facts about what values the associated variable cannot have. For example: If we know that "Bob lives either in Virginia or North Carolina" (the Choice statement), then he cannot live in any of the other states that the problem allows. Those negative facts (e.g. "Bob does not live in Florida") can help complete the "Truth tables" necessary to resolve who lives where. In the May 3rd Geocaching problem, the three Choice statements eliminate user entry of 24 of those negative Fact statements. Now if I can just find a dozen or so similar problems, I will have saved enough time to pay for effort of the enhancement. J May 3, 2012: Another avid logic problem solver managed to break my "Logic Solver" program last week, this time with a Geocaching problem with 10 different teams, home towns, and cache counts. The previous version would only handle 9 values per variable without burping, but Logic Problem Solver, Version 4.0 , just posted, handles up to 15 values and can solve the problem (also included in the download if you want to try your hand). April 28, 2012: "Points from 4 Sensors" is a program which calculates the location of a target in 3D space when it is given the locations of 4 sensors and the distance from each sensor to the target as they (or the target) calculates. The program completes the picture by calculating the (x, y, z) coordinates of the target using a method called Gaussian Elimination to solve the 4 distance equations. Point from 4 Sensors, Version 5.0 posted today adds an alternative technique, Trilateration, to find target coordinates. Trilateration appears to be more robust, finding solutions when the sensors are coplanar or nearly coplanar and the Gaussian method fails. April 21, 2012: Here's a program, DSTCalc, investigating how Daylight Saving Time start and end dates can be calculated using simple equations without resorting to high level date-time routines. This might be useful for programmable devices which need to know but don't have the advantages that the big boys have. The program also contains a Delphi GetNthSunday function using the high level routines to verify the simple equation approach. April 13, 2012: Sudoku Version 2.0 was posted today. It adds the "Trail and Error" solver discussed. earlier and cleans up a couple of other minor bugs. We'll let it rest for a while now as I move on the the next project. April 11, 2012: Sudoku Version 1.3 corrects a problem with the Undo button trying, under some conditions, to Undo more moves than were made resulting in various undesirable outcomes. April 8:2012: It didn't take long to find the first couple of program bugs in yesterday's posting: Sudoku Helper/Solver V 1.2 was posted today to fix problems with missing default file extensions on saved puzzles and the missing final hint value when hints extended onto a second display line. April 7, 2012:
Here is the first (incomplete) version of a Sudoku Helper/Solver. I wrote it on our Caribbean cruise last week while the rest of the family worked on solving the daily puzzles handed out by the cruise line. My way is harder initially, but when they solve one, they have solved one; when I solve one, I have, in theory, solved them all! (That excludes the possibility of program bugs of course, but even those are new and non-repetitive problems to solve one-time. I love it!) The program allows entering and saving puzzles. As you run
across those that cause problems, save and send them on as email attachments to
feedback@delphiforfun.org.
Pace yourself and only send one per week please (in case the 6 included samples
are the only ones the program can solve). March 21, 2012: A small update was posted today to clean up some documentation errors in the description screens of our RSA Keys Demo program. RSA stands for the last names of the 3 guys that published an algorithm allowing secure message exchange. In simplest terms, RSA encryption works like this:
Interesting stuff!
March 19, 2012: I had some fun and learned some things this week writing a Squared Palindromes program which investigates finding the smallest "even" palindrome which is the square of another integer. March 12, 2012:
A solver for a "Special" 5x5 Magic Square was posted today. I call it "Special" because we are given a specific set of 25 integers from 1 to 9 (with repeats), which must be used to fill the square. The typical 5x5 Magic Square contains integers from 1 to 25 with rows, columns, and diaginals summing to 65. Each row, column and diagonal in this case must sum to 20. A good exercise in Combinatorics and pruning search spaces!
The final version finds about 5 solutions per second for the
first 5000. March 6, 2012: "If you draw a
9x9 by nine grid, thus giving yourself 81 small squares; how many
rectangles can you count in total? " An little 20
line program, Rectangle
Counts, finds the answer and also leads to some interesting math. February 27, 2012: Fifty Probability Problems, Version 5 adds a fifth problem from the book, the hardest one yet, but a good chance to learn about using geometric progressions to solve a puzzle concerning chances for a poor shot to win a 3-way shootout. February 21, 2012: I've spent much of the past couple of weeks travel planning for our next family cruise in March during the grandkids' spring break. Zip lining in St. Kitts - whoopee! I spent most of my programming time on a dead end (so far) effort to create a program start or stop and restart a program based on a schedule or CPU or memory usage. I need this to workaround a commercial weather system program which crashes periodically because it has a memory leak. In the end, I decided to tackle another problem from the Fifty Probability Programs book I'm working my way through. This one about a three way "duel" is similar to one previously posted and, since I haven't cracked the analytical solution yet, Car Talk Shootout Version 2 now includes the experimental results for the new problem as well. February 7, 2012: Here are two more probability problem solvers which I found more interesting than anything else I had to work on this week. Fifty Probability Problems, Version 4 was added today: Problem 18: If 100 coins are tossed, what is the probability that exactly 50 heads will be showing? Problem 19: Samuel Pepys wrote Isaac Newton to ask which of these events is more likely: that a person get (a) at least 1 six when 6 dice are rolled. (b) at least 2 sixes when 12 dice are rolled, or (c) at least 3 sixes when 18 dice are rolled. What is the answer?
The WHAT'S NEW Archives (Click to expand)
|
[Feedback] [Newsletters (subscribe/view)] [About me]Copyright © 2000-2012, Gary Darby
All rights reserved.
|