I recently started memorizing digits of Pi.
To test myself, I would write the digits on an index card, and compare what I wrote to a printout. This didn’t provide good feedback. If I was wrong about the 20th digit (for example), I wouldn’t know until after I finished writing all the digits and compared them.
So, like any good programmer, I wrote an app to help. Here’s a screenshot of it.
Users enter values using their keyboard or by clicking on the calculator-like buttons. They can click on “H”, to get the next digit. If they enter an incorrect value, a popup will appear letting them know.
The line at the top shows how many correct digits were entered – ignoring the decimal point but including the initial “3”.
NuGet packages
Even though it isn’t needed for this program, I added the Prism NuGet package to the solution. It’s been a few years since I used Prism, and I wanted to refresh my skills a bit.
If you download the code, remember to restore NuGet packages for the solution.
Future plans
Some things I’m considering:
- Adding speech recognition for user input
- Make into a mobile app
- Store “scores”, and possibly show graph over time
Source code (MIT License)
https://github.com/ScottLilly/DigitsOfPi
Let me know if you try this out, and how many digits you can remember. The screenshot above is from a real test session of mine. So far (22 Sept 2019), 55 is the maximum number of digits I can do.
Leave a Comment