Over the weekend: trying to develop programming skills

Writer's Journal

Over the last couple of days, I pulled down some of my books on programming languages and set out to begin some learning. For a while I have wanted to get myself to a place where I have a full grasp of at least one general purpose programming language as well as a shell programming language. Those languages that I aspire to understand had been determined years ago and have not changed since: Perl and Bash. Bash is an easy choice because I have been using the Bash shell on Linux and Macintosh for years. As for Perl, I have been drawn to it because of its regular expressions capabilities and flexibility. In fact, I bought books on Perl and as well as another on Linux that covered shell programming in detail some years ago, but I never spent enough time on any of them that I learned all of the basics of either language.

However, over the years, I have learned bits of Bash enough to make very simple scripts that could do things such as back up hard drives and check that all drives were connected before running. Yet, I was was unable to make anything more robust. Previously, I built a shell script that could rename digital photos that I imported into my computer, but due to my limitations as a programmer, I would have to manually separate the photos into directories (folders) by the date they were captured and then run the program on each separate collection. (The program would put the capture date in the filename based on the name of the directory it was in, which was named by the capture date.) A more robust program would automatically look at each of the photos, determine its capture date, rename it, and separate into directories by date.

Making such a program is one of my goals, and more generally, the goal is to have the ability to make useful software tools for myself when I cannot find them elsewhere or my needs are terribly specific. This would be a boon. While I have only learned some basics of Perl, I have brought my Bash scripting skill up over this weekend: I made a handy, reusable backup script that can make full and incremental backups using rsync. It is tested and fully working on macOS, and now I will test it on one of my Linux systems to verify it is as portable as I intended it to be. Later, my goal is to write a blog post about it explaining how I designed it and the challenges I faced with my nascent programming skill. Also, since I have a GitHub account, I want to post the program online and make it available as free software under the GNU GPL v3. This would make it the first program that I have shared with others or released as free software, which I must say is very cool.

Until next time. 🙂

-Paul

Leave a Reply

Your email address will not be published. Required fields are marked *