Lockdown 2020 – Learning Python3

Lockdown 2020 gave me the opportunity to learn a new skill – Python3 & GitHub DevOps.

My career started in the 1980’s / early 1990s as a software developer, primarily in C for an open source package, implementing the full 7 layer ISO stack for a directory.   If used today it would be akin to an internal Active Directory Forest merged with external DNS search.  Since then, during my journey in management and consulting I’ve dabbled with bits of code, mainly Perl.

Last year, to make my smart home work, I needed a few bug fixes in open source platform called Homeassisant, started to learn bits of Python3.   Then after a torturous acceptance process (due to the high coding standards) I had an minor upgrade I implemented accepted.   While torture, it was a great learning curve in how a modern open source release works – very different to when I ran the Isode open source in the early 1990s.

In normal times, I spend some of my ‘spare’ time supporting the admin team of Nottingham Leander Swimming Club.  We use a platform call Swim Club Manager (SCM),  and had a few Perl script to help with data cleansing and verification.   Lockdown came, and I decided to upgrade the scripts to Python3, and make it available to other SCM users.

I thought it would take me a few evenings, but with some significant scope creep, and many more than a few evenings later the result is:   SCM Helper.   With support from the SCM community to iron out a few bugs related to test cases I had not considered, a number of people are now using it to clean their data sets.

Learning points…

  • Python3
  • Multi threaded Python3 (wow, if only I had this back in the day – I had to do threading by hand to make distributed directory search work).
  • Object oriented programming (This was a big deal, as my C background was very much procedural)
  • TK/Tcl GUI via tkinter.  I’ve never developed a windows GUI before – easier than I thought it would be (once I realised tkinter was not thread safe).
  • Git (again, how easy it is now.  Had to use FTP of tar balls back in the day!)
  • GitHub DevOps (at a trivial level)
  • Creating Python packages, via PyPi
  • Yaml for configuration
  • Compiling Python to a Windows.exe
  • New support tools (black, flake8, pylint, isort, codespell, python setuptools, twineand pyinstaller)

My reflection on the learning?  Wow that was relatively easy even if it took a lot longer than I planned.   If only these tools were available in the 80’s/90’s, it would have easily reduced the time develop the Isode/Quipu application in half.  (Not sure the code performance would be as good, but with the significant processing power upgrade of today not sure that would have mattered).  Added to that the widespread availability of Python packages to do most of what I needed (http, crypto, Yaml and CSV parsing and schema validation time name a few) enabled me to focus on the application, and not support tools.

Software Developers of today have it so easy!

Final note, good job I picked Python3, as Python2 went end-of-life in April 2020!


Cyber Essentials At Home

Our homes are becoming smarter. Lights you can switch on remotely, heating that learns about when you will be at home, refrigerators that add items to shopping list as you use them and electric cars that charge when fuel prices are low.

This exciting new world does not come without risks: risks to privacy; risks to security and risks to physical safety. Continue reading “Cyber Essentials At Home”

The Secure Internet of Things

The Internet of Things (IoT) is big news at the moment, being used as a title for just about everything that interacts with the internet, be it man or machine. In some areas the commentary is just starting to recognise that security and privacy are issues. And as you expect, various players are putting forward their solutions. Continue reading “The Secure Internet of Things”