Guest Interview – September 2022

Today I am interviewing my daughter, who will be sitting for her final senior high school exams shortly. While this interview isn’t related to the subject of diversity in tech, it comes close: she is taking Science and Math subjects which are part of STEM (Science, Technology, Engineering & Mathematics), and hopes to study Engineering at university next year. I thought it would be interesting to hear some of her perspective.

Note that my daughter’s responses below relate to her experiences (and hers only) in two Australian high schools that she has attended. Her references to year levels follow the Australian education system.


Question: Why did you choose to study STEM subjects in high school?

Answer: I guess there are three main reasons. I enjoy STEM subjects, and they make sense to me. As in, I find there is a rule to everything. Second, for STEM subjects, I don’t have to write essays based on opinion, or essays that seek to persuade. Finally, I need to take these subjects in order to be accepted into the engineering university course I’ve chosen.

Question: Do you know many other girls who are studying STEM subjects in the high schools you’ve attended?

Answer: There’s been a balance: in my previous high school [her first three years of high school] several girls in my friendship group were studying both STEM and Humanities/Arts subjects. I don’t know how many of them kept studying STEM subjects in their senior school years. In my current high school, 75% of students studying Chemistry and 50% of students studying Physics are female.

Question: So, in your opinion and based on your observations, is there a gender disparity in high school students studying STEM subjects?

Answer: I think there is in Maths and Engineering. Funnily enough in my current school [final two years of high school] there are two girls and one boy in my year level doing Specialist Maths.* But in my previous school there were only boys doing Specialist Maths in Years 11 & 12 [final two years of high school]. And the majority of students doing Engineering as a subject in my previous high school were boys. From what I saw in my previous high school, more boys were interested in doing subjects that involved coding and programming compared to girls. Including myself.

* – Note that Specialist Mathematics is an ‘enrichment math subject’ – as described by ArcTutoring in their blog article here.

Question: What do you see yourself doing 10 years from now?

Answer: i want a career in Science or Engineering. I just don’t know what that would look like yet. I’d like to be in a job that helps people in some way, even if it is behind the scenes – for example, in a lab or in a desk job.


That’s all! Note that comments have been disabled on this post since it relates to a minor.

Featured image by ThisIsEngineering from Pexels.com.

Generate QR Codes on Linux – quickly and easily

I use qrencode to generate Quick Response (QR) codes. While there are many web-based and GUI methods of generating these, I decided that I wanted an open source and command-line based method. qrencode is the easiest one to use that I’ve found – so far.

qrencode uses the libqrencode library to produce a QR Code symbol.

Installation

I followed How-To Geek’s instructions to install qrencode – steps are given for Fedora, Ubuntu and Manjaro, and also examples of how to run qrencode.

Installation is straightforward – on Fedora 36, it’s simply:

$ sudo dnf install qrencode

which pulls down the qrencode package and all required dependencies from the default Fedora software repositories.

Example running qrencode

$ qrencode -d 128 -o test.png "https://geekgirllinuxland.com"

This generates the following QR code image and saves it to output file test.png:

Test QR Code generated by qrencode on Linux
Test QR Code generated by qrencode on Linux

Note that:

  • The ‘-d’ specifies the resolution (in dpi or dots per inch) of the resulting output image.
  • The ‘-o’ specifies the output file to write the resulting QR Code to.
  • PNG is the default output image type anyway, so I didn’t need to specify the “.png” in the output file name above. If I wanted to change the filetype, I can do so by specifying a ‘-t’ or ‘–type’ followed by the file type I want.

You can check out all qrencode’s options either in its documentation found here, or using the Linux man pages by typing:

$ man qrencode

on the Linux command-line.

Linux Magazine has some more information on qrencode which you can find here.

SourceForge hosts a compiled executable of QREncode for Windows.

References

Albanese, P. F. (n.d.). QREncode for Windows. SourceForge. Retrieved September 8, 2022, from https://sourceforge.net/projects/qrencode-for-windows/

Die.net (n.d.). qrencode(1) – Linux man page. Die.net. Retrieved September 8, 2022, from https://linux.die.net/man/1/qrencode

Fukuchi, K. (n.d.). libqrencode. Kentaro Fukuchi Home Page. Retrieved September 8, 2022, from https://fukuchi.org/works/qrencode/

McKay, D. (2020, December 8). How to Create QR Codes From the Linux Command Line. How-To Geek. Retrieved September 8, 2022, from https://www.howtogeek.com/devops/how-to-create-qr-codes-from-the-linux-command-line/

Schürmann, T. (n.d.). Generating QR Codes in Linux. Linux Magazine. Retrieved September 8, 2022, from https://www.linux-magazine.com/Online/Features/Generating-QR-Codes-in-Linux

Studying while juggling work and family commitments

Warning: This post is a bit of a rant. Enter Ethnically-Diverse Girl Tux on a her Soapbox!

It’s a well-known fact that there is a global digital skills shortage. This shortage affects all industries as they increasingly experience digital transformation. You can read more about this in Wiley’s Digital Skills Gap Index 2021.

This gap is certainly reflected in the Australian ICT sector in key skill shortages. Two such areas are Cyber Security and Artificial Intelligence.

In Australia most major universities have been recently offering fast-track courses in Cyber Security and Data Science in an effort to bridge this gap. I’ve been checking them out as I’m on a mission to keep my ICT skills current.

I’m working, handling home duties, and supervising two high-school students’ distance learning (this is because of the remote location we live in). I have done the math, and know I can manage an 8-10 hour study commitment per week. I also know from past – but recent – experience that 8-10 hours is generally the commitment required, per subject, for an Australian undergraduate semester-based university course. So I headed happily to Aussie university websites to research course offerings.

My personal criteria were:

  1. Postgraduate coursework in either Artificial Intelligence (or related area) or Cyber Security.
  2. Delivered entirely online.
  3. Allowing one subject to be studied at a time.
  4. 8-10 hour commitment per subject per week.

It wasn’t an easy as I thought. Most courses that met the first three criteria failed to meet the fourth. Many turned out to be fast-track courses in Data Science or Cyber Security with a minimum 20 – 24 hour commitment per week, albeit for a fewer number of weeks per year compared to traditional semester based courses.

A 20-24 hours per week study commitment is simply impossible for me. To put it in context, someone working full-time in the Australian ICT sector would be expected to commit to 38 – 40 work hours per week. A 20 – 24 hour commitment per week is effectively half-time – a significant commitment.

I tried to negotiate a lighter study load with two universities. This was unsuccessful. In fact one student advisor assured me that the fast-track post-graduate course under discussion had several students who were successfully working full-time, AND engaging with the coursework. I felt a bit of a dunce as I was clearly incapable of handling life the way my peers were able to.

Once I got off the phone though, I started to think. What demographics did these students par excellence fall into? Was their employer giving them time off in order to study? (My previous employer would frequently do so for employees wanting to upskill in the industry.) Were these students actively parenting? Or were they parenting as a couple? That is, they had partners handling parenting and home-duties so these students were freed up to study?

Note that in my hunting I did discover some courses with the 8-10 per subject per week commitment – but only for on-campus enrollments. I.e, they didn’t meet my personal criterion # 2 above.

Confession: I felt annoyed. Here were very reputable higher-education institutions, offering important ICT skills training, that were difficult for people like me to access. People who are juggling work, parenting and home-duties. People like me who are (almost inevitably) female, mid-career and looking to upskill or reskill.

And I get why. Statistically speaking, there aren’t many like me around. The Australian Computer Society’s Digital Pulse 2022 finds that, according to the Australian Bureau of Statistics’ 2021 census, women make up 31% of the Australian technology sector, compared to 46% of other professional services sectors. Therefore resourcing mid-career females in ICT who are juggling multiple things is simply not commercially rewarding since there are so few of us across a wide range of ICT fields.

But here’s the rub. We talk a lot about attracting women into the ICT sector. But if we truly want women in ICT, it can’t just stop at attracting young women into the industry. It also has to be about keeping women in ICT by encouraging ongoing skill development. This means resourcing women where they are at – whether in or out of work, whether as singles or not, whether parenting singly or jointly, whether relatively free of responsibility or caring for dependents, whether managing a business or as an employee, whether as new entrants into the industry or mid-career professionals or as those close to retirement. You could probably add to this list.

This isn’t just a bad news story though. I kept on hunting, and thankfully found two Australian universities who offer a course meeting all four of my criteria above. I’m applying to study next year, and hoping I will be accepted!

So, what do you think? I’ve written here about the Australian scene, because that’s what I’m familiar with. Please feel free to leave a comment about what you have experienced in this and other geographic locations.

Featured image by Ketut Subiyanto from Pexels.com.

LVM: a quick overview

I recently saw some requests for help with LVM for Linux on sysadmin forums. In my opinion, there were some clear gaps in the posters’ understanding of LVM architecture. So today I’ll give an overview of LVM’s basic components.

What is LVM?

First of all LVM stands for Logical Volume Manager. Chances are that your distro has it pre-installed – but if it not, LVM is reasonably straight-forward to install – refer to your distro’s documentation.

LVM is a toolset that we can use to put a bunch of storage devices into a group, and carve up the contents of that group into usable portions. Generally, we would then go on to create filesystems on those portions, or use them for swap (virtual memory).

The LVM implementation in Linux is related to the LVM implementation in HP-UX [1]. LVM is being used less and less these days with the availability of on-demand, scalable, ‘elastic’ cloud-based storage. However, at this point in time, there are still many home and enterprise Linux installations using LVM.

LVM has a bunch of powerful features, and you can do quite a lot with it. Today, we’re looking at its basic components only.

Physical Volumes (PVs)

At their very basic, Physical Volumes are storage devices attached or presented to a computer. These days in the enterprise computing world, these devices are likely to be virtual devices, but they look and feel like physical devices to the operating system. Before a disk can be used by LVM, it has to be initialised as a Physical Volume (PV). If you’re using the command-line, this is done using pvcreate. This process writes a label on the disk and initialises areas for LVM metadata.

A common misconception is that a disk device can be added directly to a Volume Group without initialising it as a PV first. Not so!

Volume Groups (VGs)

A Volume Group is a collection of Physical Volumes which is then divided up into Logical Volumes. Essentially VGs are a way of grouping together storage devices, so usable portions of storage can be carved out of them. If using the command line, Physical Volumes can be added to a new Volume Group using vgcreate, or added to an existing Volume Group using vgextend.

Logical Volumes (LVs)

A Logical Volume is a portion carved up out of a Volume Group that can be used by the operating system for data in some way. Typically, a Logical Volume will be used to create a filesystem. But not always. For example, a Logical Volume can be used as a swap device (for virtual memory).

From the command line, a Logical Volume can be created in a Volume Group using lvcreate, and have additional storage space added to it using lvextend. Both lvcreate and lvextend have options to specify which PV (or PVs) you wish to use.

Many types of Logical Volumes can be created. If LVM is installed, the help or man pages have a rundown on all the different kinds of LVs possible and the options that can be used with them.

Overview summary

Here are the ‘layers’ involved in a typical basic LVM implementation:

LVM layers
Overview of LVM’s ‘layers’

Note that:

  • LVM doesn’t encapsulate existing devices or their data. So once a device (disk) has been initialized by LVM as a Physical Volume, any existing data on it is wiped.
  • A system (server or your personal computer) can have more than one Volume Group. My example above was very basic, showing a system with a single VG.
  • Just for the record, a Logical Volume can’t span Volume Groups.
  • Logical Volumes can be grown online as long as there is space available in the Volume Group. Once an LV is grown though, a separate step would be required for the filesystem it contains to make use of the new space in the LV. Documentation on the filesystem’s type will state whether the filesystem can be grown or resized, and whether this is possible to be done online.
  • Existing Volume Groups can be imported or exported to or from the operating system of a computer. This comes in handy when the storage in a Volume Group needs to be detached from one computer and moved to another.
  • High-availability add-on options are available that allow Volume Groups to be shared between clustered servers.

Summary of the process

The diagram below shows the steps for creating a basic Volume Group and Logical Volumes.

LVM Overview
Creating PVs, VGs and LVs

If you couldn’t see the image above, the steps are reproduced below. First, ensure storage is presented to and visible from the operating system. Then:

  1. Create and initialise physical volume(s).
  2. Create volume group.
  3. Create logical volume(s)
  4. Finally prepare logical volume(s) for use. For example, by creating filesystem(s) or adding as swap volume(s).
To find out more

What do you think of LVM? Feel free to leave a comment below. I’d also love to hear of your experience using other volume management systems.

References

[1] D. Teigland, H. Mauelshagen, Volume Managers in Linux, (2001). https://www.usenix.org/legacy/event/usenix01/freenix01/full_papers/teigland/teigland_html/ (accessed August 7, 2022).

Featured image by panumas nikhomkhai from Pexels.com.

Duplicity: a backup and restore tool

I like Duplicity for backing up data on my home Linux kit because it meets certain criteria. Bear in mind that these may not be important to you!

  1. Duplicity is open source.
  2. It can be used on the command line, from the Linux shell. But for those that prefer it, there are GUI front-end options (eg, Deja Dup for GNOME).
  3. It can take full and incremental backups.
  4. Backup files are stored in tar gzip format. This was a plus for me. I wanted a format that could be relatively easily read by basic Linux tools that are always likely to be at hand.
  5. Backups can be encrypted at rest (using GnuPG).
  6. Duplicity can integrate with cloud storage – eg, S3 on AWS.

Reasons I wouldn’t use Duplicity for critical systems and data:

This is despite current versions of GNU tar being able to deal with extended file attributes like ACLs and SELinux file contexts via the ‘–xattr’ and ‘–selinux’ switches respectively.

I came up against this Duplicity limitation when restoring my laptop’s /home filesystem one day, losing SELinux contexts in the process. Thankfully I didn’t have any non-standard SELinux file contexts in place, so a simple ‘restorecon -Rv /home‘ got things back to normal.

I think it’s too risky to use Duplicity for backing up critical systems and data until it has robust support for extended file attributes and SELinux file contexts.

Installation on Fedora

Available from the default Fedora software repositories. Basically, install using:

$ sudo dnf install duplicity

See https://fedoramagazine.org/taking-smart-backups-duplicity for details of how to configure backups.

Installation on Ubuntu

$ sudo apt-get install duplicity

See https://help.ubuntu.com/community/DuplicityBackupHowto for details of how to configure backups.

Duplicity example

Here are some examples of using Duplicity on Fedora 34.

Dry-run to an external drive

This example was run as the root user (or it could be run using sudo) because the folders being used for this dry run were owned by different user accounts.

# duplicity --dry-run --name mylaptop_home /home file:///media/1tbusb/backups/mylaptop/home-backups/
Local and Remote metadata are synchronised, no sync needed.
Last full backup date: none
GnuPG passphrase for decryption: 
Cannot use empty passphrase with symmetric encryption!  Please try again.
GnuPG passphrase for decryption: 
Retype passphrase for decryption to confirm: 
No signatures found, switching to full backup.
--------------[ Backup Statistics ]--------------
StartTime 1627774508.08 (Sun Aug  1 01:35:08 2021)
EndTime 1627774539.34 (Sun Aug  1 01:35:39 2021)
ElapsedTime 31.26 (31.26 seconds)
SourceFiles 301977
SourceFileSize 88829478341 (82.7 GB)
NewFiles 160403
NewFileSize 88829478341 (82.7 GB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 160403
RawDeltaSize 0 (0 bytes)
TotalDestinationSizeChange 0 (0 bytes)
Errors 0
-------------------------------------------------

# 

I left my user errors in the transcript above, as it’s helpful to see how Duplicity responds in some error scenarios. In this case, me entering an empty passphrase when symmetric encryption will be used for the resulting backup files.

It all looks good, let’s proceed with the backup.

Actual backup to external drive

Again, as the root user (or via sudo):

# duplicity --name mylaptop_home /home file:///media/1tbusb/backups/mylaptop/home-backups/
Local and Remote metadata are synchronised, no sync needed.
Last full backup date: none
GnuPG passphrase for decryption: 
Retype passphrase for decryption to confirm: 
First and second passphrases do not match!  Please try again.
GnuPG passphrase for decryption: 
Retype passphrase for decryption to confirm: 
No signatures found, switching to full backup.
--------------[ Backup Statistics ]--------------
StartTime 1627774633.42 (Sun Aug  1 01:37:13 2021)
EndTime 1627778822.78 (Sun Aug  1 02:47:02 2021)
ElapsedTime 4189.36 (1 hour 9 minutes 49.36 seconds)
SourceFiles 160401
SourceFileSize 88829623775 (82.7 GB)
NewFiles 160401
NewFileSize 88829623775 (82.7 GB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 160401
RawDeltaSize 88815026613 (82.7 GB)
TotalDestinationSizeChange 78745337285 (73.3 GB)
Errors 0
-------------------------------------------------

# 

Again my errors are left in. In this case, the second passphrase I entered didn’t match the first one, so I was prompted to re-enter it.

Warning! Make sure you record the passphrase in a safe secure place. If you lose the passphrase, you will not be able to decrypt the backup files to read back data or restore!!

Running an incremental backup

To only backup content that has changed since the last full backup, simply re-run the command exactly as we did above.

Duplicity detects the presence of a full backup at the specified target location, and performs an incremental backup instead.

To list what’s been backed up

To list the status of backup sets at the target backup location:

# duplicity collection-status file:///media/1tbusb/backups/mylaptop/home-backups/
Last full backup date: Sun Aug  1 01:36:59 2021
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive dir: /root/.cache/duplicity/ca2e105abb0be7fd8378849b99843152

Found 0 secondary backup chains.

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Sun Aug  1 01:36:59 2021
Chain end time: Tue Sep 14 15:07:02 2021
Number of contained backup sets: 2
Total number of contained volumes: 461
 Type of backup set:                            Time:      Num volumes:
                Full         Sun Aug  1 01:36:59 2021               376
         Incremental         Tue Sep 14 15:07:02 2021                85
-------------------------
No orphaned or incomplete backup sets found.
# 

Duplicity reports finding two backup sets at that location, one full, one incremental. The dates of the backups are listed (and yes, it took me a while to actually write and publish this post!).

Testing a restore

A backup is only as good as its ability to be restored. So it’s a healthy practice to test your backups by restoring from them periodically.

I tested the backup above by doing a full restore to a location different to the original files that were backed up:

# duplicity restore file:///media/1tbusb/backups/mylaptop/home-backups/ /home/restored/

I was prompted to enter the same GnuPG passphrase that I’d used when backing up the data. Once that was done, Duplicity went ahead and restored the data. Apart from the issue I encountered with losing SELinux file contexts, the restore was successful.

Learn more about Duplicity

As always, this only scratches the surface of what duplicity can do. To find out more:

$ man duplicity

or

$ duplicity --help

or track down the official Duplicity documentation for your favourite Linux distro.

And before using Duplicity, make sure you’re aware of what it can and cannot offer you. As an example, consider its limited capability with extended file attributes, and how this could affect you in the event of data loss.

Remember:

A backup is only as good as its ability to be restored.

(I don’t think I’m the first person to say that!)

Feel free to share your thoughts below. What backup method do you use? Do you think you’ll use Duplicity? Why or why not?

libdvdcss: for playing those old DVDs

When was the last time you had to play a DVD on your Linux desktop? With many streaming services these days, the need to directly use any physical form of media is becoming less frequent. And I forget how complicated it is to play a DRM DVD on Linux!

Today we started binge-watching an old series (Season 1 of ‘White Collar’, 2009). Friends lent it to us – on DVD! As an aside, I remember the days when we would head to the local video store and rent a bunch of DVDs for the weekend. And the frustration of dealing with the inevitable discs in the pack that would be scratched or damaged. I’m fully a fan of streaming services!

I popped the disc into the tray of our only device with a DVD reader – a HP Notebook circa 2016 and now running Fedora 34. It has VLC Player installed (from the good folks at the VideoLAN project), but that by itself doesn’t have the capability to play a DVD that is encrypted by a Digital Rights Management system (DRM). VLC Player sees the disc, allows you to hit Play… and then does nothing.

What is libdvdcss?

Enter libdvdcss, another project from VideoLAN. It’s a library that can access DRM-managed DVDs without the need for decryption. You can read all about that project at www.videolan.org/developers/libdvdcss.html

libdvdcss isn’t available in the official Fedora software repositories. You will need to enable a third-party repository from RPM Fusion to install it on Fedora. It’s FOSS has an excellent set of instructions that worked on my Fedora 34 – please head over there, as it’s really comprehensive.

Important: Enable RPM Fusion’s tainted free repo at your own discretion, as it contains packages whose usage may be restricted in some geographical locations. Please read RPM Fusion‘s documentation for more information.

Sample libdvdcss installation

Here is the transcript of my attempt at installing libdvdcss on Fedora 34.

$ sudo dnf install rpmfusion-free-release-tainted
Last metadata expiration check: 0:01:24 ago on Sat 16 Jul 2022 19:39:43.
Dependencies resolved.
========================================================================================================================================================================
 Package                                                 Architecture                    Version                          Repository                               Size
========================================================================================================================================================================
Installing:
 rpmfusion-free-release-tainted                          noarch                          34-1                             rpmfusion-free                          8.6 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total download size: 8.6 k
Installed size: 1.2 k
Is this ok [y/N]: y
Downloading Packages:
rpmfusion-free-release-tainted-34-1.noarch.rpm                                                                                          7.8 kB/s | 8.6 kB     00:01    
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   1.4 kB/s | 8.6 kB     00:06     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                1/1 
  Installing       : rpmfusion-free-release-tainted-34-1.noarch                                                                                                     1/1 
  Verifying        : rpmfusion-free-release-tainted-34-1.noarch                                                                                                     1/1 

Installed:
  rpmfusion-free-release-tainted-34-1.noarch                                                                                                                            

Complete!
$ sudo dnf install libdvdcss
RPM Fusion for Fedora 34 - Free tainted                                                                                                 5.8 kB/s |  28 kB     00:04    
Last metadata expiration check: 0:00:01 ago on Sat 16 Jul 2022 19:41:57.
Dependencies resolved.
========================================================================================================================================================================
 Package                              Architecture                      Version                                 Repository                                         Size
========================================================================================================================================================================
Installing:
 libdvdcss                            x86_64                            1.4.3-1.fc34                            rpmfusion-free-tainted                             73 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total download size: 73 k
Installed size: 178 k
Is this ok [y/N]: y
Downloading Packages:
libdvdcss-1.4.3-1.fc34.x86_64.rpm                                                                                                        24 kB/s |  73 kB     00:03    
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                    17 kB/s |  73 kB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                1/1 
  Installing       : libdvdcss-1.4.3-1.fc34.x86_64                                                                                                                  1/1 
  Running scriptlet: libdvdcss-1.4.3-1.fc34.x86_64                                                                                                                  1/1 
  Verifying        : libdvdcss-1.4.3-1.fc34.x86_64                                                                                                                  1/1 

Installed:
  libdvdcss-1.4.3-1.fc34.x86_64                                                                                                                                         

Complete!
$ 

And that’s it! VLC Player can now play the DVD without any issues.

References

What do you do when you stuff up?

I don’t think there is a single sysadmin on this planet who hasn’t made a mistake significant enough to cost their employer or customers cash or reputation. So, what do you do when faced with such a situation?

I’ve read some ‘I stuffed up, should I ‘fess up?’ posts on Reddit recently. I and others I’ve worked with are no strangers to this question. Should one come clean with mistakes, and why?

Some years ago I was part of a team migrating some back-end storage to a shiny new SAN. The migration included moving the data of some not-so-shiny (read ‘legacy’) servers to the new SAN. These servers were hosting critical functions and were becoming quite long in the tooth. However the cost of replacing them was turning out to be far greater than the cost of keeping them limping along, so we were stuck with them for the present. It’s a common enough story in the field.

The customer brief was to migrate the legacy servers’ data to the new SAN with limited impact to services – i.e, online. We did our research and planned the migration as carefully as was possible given the age of the environment and the limited vendor support available. We decided to mitigate possible trouble ahead by breaking the work up into manageable stages.

Finally using a carefully reviewed work plan and change management approvals, at a time of low user activity (i.e, around midnight!), the first stage of the migration began. But part-way through, it all went wrong. One server metaphorically kicked another one in the guts, forcing a reset, and the hosted services ground to a halt.

The team was onto service recovery like a flash. But the work that had been planned to be online had now become offline. Critical services were disrupted. It was tempting to pretend that the outage had been caused by something other than the work I’d been doing. The servers had a history of instability and it would be easy to point the finger there.

I chose to be up-front and let my manager and the customer know what had caused the outage. Why? Your reasons might be different, but some of mine were:

1. There was an agreed process that needed to be followed.

The organisation I worked for had clear engagement rules in place, internally and externally, around change and incident management. This included things like what to do if scheduled work went wrong. If I didn’t follow these processes, I would be breaking faith with both my employer and the customer. To me this is the most compelling reason to ‘fess up when we stuff up. However I have other reasons too.

2. Stakeholders shouldn’t be kept in the dark.

My manager and the customer’s critical incident manager needed to know what had really happened so they could do their job. If I didn’t let them know, they wouldn’t have the information they needed. For instance, my manager needed to have full disclosure from me in order to act appropriately if the incident got escalated. Similarly, the customer’s incident manager needed to know what was going on so he could manage escalations at his end.

This might sound like stating the proverbial obvious, but non-stakeholders didn’t need to know. It would have been completely inappropriate for me to share what happened with, say, a competitor of my customer! Likewise, I have withheld identifying details from you as a reader of this post. 🙂

3. ‘Fessing up is a trust-building exercise.

  • My manager knew I wasn’t hiding facts to cover my behind. Why? Because I have a track record of making full disclosures of my mistakes, and by doing so again now, I was confirming our relationship of trust. A trusted relationship with one’s boss is of great value!
  • The customer’s incident manager didn’t yell down the phone at me or start a witch-hunt afterwards – both of which he could have done. Instead he listened to the facts and did his best to help me manage the incident. Why? Because I’d built up trust with this customer over time, by being honest when I didn’t know something, being willing to help when I could, and being upfront with them when I’d made mistakes before. They knew they would get a straight story from me. My honest communication in this situation helped maintain that trust. The incident manager and I later worked on a report, which fed into a modified work plan for the rest of the migration after we identified that yet another unresolved bug had caused our work plan to go awry.

4. The truth is easier to sustain than a lie!

Always. It’s much less exhausting to tell the truth than keep up a lie. Even in fiction. Agatha Christie’s Hercule Poirot believed that people found it a relief to tell the truth. A lie is too much effort to sustain. The great Sheldon Cooper would agree, spinning his “un-unravelable web” in Season 1 Episode 10 of The Big Bang Theory (‘The Loobenfield Decay’)!

5. Last but not least, it’s about reputation.

I am not really such an unselfish character as this story may make me sound. There is something in it for me. Making short-term choices like this helps my reputation. And that benefits me too in the long run.

Growth happens when we acknowledge our mistakes, don’t make excuses, and instead make a plan to move forward.

Unfortunately in today’s litigation-and-blame culture we are not encouraged to come clean. It can be difficult to straddle the line between transparency and liability. I think we have gone overboard with this, to the point that most tech professionals work in an atmosphere of blame management. I’m pointing the finger at me too here. Blame management isn’t healthy, and it doesn’t produce the kind of relationships that in turn produce dividends in the long run.

What do you think? Please feel free to leave a comment below.

Featured image by Andrea Piacquadio from Pexels.com.

Python Turtle Art

I was inspired to make art with Python today. Yes, really.

It came out of some coding lessons I have been preparing for two high school students. As an aside, I’ve been using Runestone Academy’s Foundations of Python Programming, modifying it to suit students who have learnt English as a second or third language.

Python Turtle module

After messing around with an example Python script for my students, I used Python’s random module to create some cool effects using a simple script. You can find the code for the script TurtleTriangles.py on GitHub. Feel free to download and run it – as long as you have a Python environment to run it in.

TurtleTriangles.py uses randomised values, so each invocation will produce a unique result – and one-of-a-kind artwork. Yes, really! 😀

If you code in Python and have never used Turtle before, I highly recommend it for the sheer visual rewards it gives. Read all about what you can do with Turtle at the official Python documentation site.

Feel free to post any artwork you make using Turtle in the comments below. I would love to see it!

TurtleTriangles.py

You can download TurtleTriangles.py and modify it to suit your Python environment and your preferences. My coding is by no means perfect, elegant, or efficient, so this script has much room for improvement.

For instance, you may need to change the first line which is the ‘shebang’ header, as it was written assuming it would be run on Linux using Python 3:

#!/usr/bin/python3

You may also like to change the colour of the background away from bright orange!

window.bgcolor("orange")

The ranges of the randomised values can be adjusted too:

draw_triangle(random.choice(sizelist),  \
   random.choice(colorlist), random.randint(-175, 175), \
   random.randint(-175, 175), random.randrange(0, 360, 10))

Basically you can go to town with it! After all, TurtleTriangles.py is open source. GNU General Public License v3.0 to be exact.

If you find any issues with it, please let me know in the comments below, or by logging an issue at the GitHub repository itself.

Happy creating!