I had an idea for a programming self-challenge. From Monday, Sept 1st to Friday, Sept 5th: I’ll write a new script each day. The goal should be simple enough to solve in one day, but not so boring I’d feel dumb writing about making it. I’ll likely be sticking to business logic type goals, as I don’t actually enjoy algorithmic challenges as much. Now if a practical goal requires a decent algorithm, then so be it.
Finishing day 1’s up actually a little into Day 2, but in my defense this one took a little while longer than I was expecting. The task I had in mind was to create an interactive script that could read/write/delete records from an encrypted text file. It’s not quite as elegant as I would have liked, and looking at it now I didn’t include a way to change the password, but it seems to work, at least on my dev machine. You can pull the repo and try it out yourself from bitbucket.
The biggest problem I encountered was the actual updating of the file. I destroyed a fair number of them before I got adding records working properly. (To make it trickier I wanted to do it in such a way that temporary files were not created in the process.) Viewing was largely a piece of cake. Or pie as the case may be. I celebrated it’s ease with a slice of banana cream pie.