I can’t guarantee that I’ll always have a pun for my title, but by golly, I’ll sure as heck try to 😉 Also, sorry about missing out last week on having a blog post, I’ve been getting a bit behind. My workload has been increasing, which leaves me with less time for the things I enjoy, like writing these blogs. One of the things that I got to do whilst being so busy, was to do some programming for a friend (for our purposes we shall refer to them as Q).
Q is a nurse and they have been tasked with updating a whole lot of Preference Cards (in their profession they’re referred to as FAD cards). Surgeons utilise these FAD cards to list what types of instruments and other supplies they require for a particular type of operation or procedure they may perform. Q’s job is to update all of the existing FAD cards with new information, which has been written on printed copies of said cards. Reviewing the work they had ahead of them, I advised that “I think I can make you something that will make your job easier, are you interested?”, (Q was understandably apprehensive but interested).
I sat down with Q and went over what type of information would be pertinent and what was their requirements. For example;
- Will one surgeon ever have more than one FAD card for one type of operation? No.
- Does each surgeon work in many different specialties? No, they only ever work in one.
- How many would you like to display on the computerized version of a FAD card? Some only two, some need a lot.
With this information and a few other examples, I set to work in Microsoft Excel to create something that ended up being pretty amazing (Q’s words not mine). At this point you’re probably wondering “Excel is for spreadsheets, not programming!”, but you can in fact do a lot of things in Excel that you may not expect. Excel is built on a programming language called “VBA” or “Visual Basic for Applications” and to put it simply, you can use VBA to enter, view, edit and display data that you have stored in a spreadsheet. Seeing as I knew that each one of these FAD cards was a single entry, built from lists of items, Excel could be used to quickly add or edit a card with a user interface (how a user navigates and interacts with the system). Below is an example showing how it appears in Excel, the first image shows the landing sheet of the spreadsheet and the second shows what happens when you click the [Add FAD Card] button.
I developed my programming skills at TAFE back in 2001, and although a lot has changed in IT since then, a lot of the core learnings have not. The VBA coding that I learnt back then, although rusty, still proved very useful today. Additionally, the knowledge of where to find resources and look for help remains. For VBA programming in Excel, the good people at Excel Forum (https://www.excelforum.com/excel-programming-vba-macros/) have been helping me iron out bugs in my code for years.
While I won’t be going into the code in this blog post, I wanted to treat this as more of an introduction, providing some examples and also briefly talk about how programming works and why we might want to care about it. Another example of my programming past is a simple game that I’ve been working on. It’s loosely based on the Ghostbusters movie and presents a simple platformer style game (a game where you jump on platforms, like Mario). You can check it out on the ‘Scratch’ site, but I must warn you, it’s not working properly and is FAR from finished.
Scratch is a great site because you can get started by looking into the code of anyone’s work on there. You can also ‘remix’ (take someone’s code and make it different) on there, this is permissible and supported on the site. The Scratch community is a lovely place where everyone is encouraged to share knowledge and have fun.
Having learnt a lot more about programming recently, I intend to bring this project back to life and work on it a lot more. I have ideas for other games and have also been inspired by YouTuber “Yahtzee” on his channel “Escapist” (language and content warning for his whole site though) who is doing a series of videos where he challenges himself to make 12 games in 12 months. For some reason the playlist is backwards, with the most recent one being the top. You should go and watch the last video in the list first.
Now, I’m not going to attempt that, but I do want to make a few more games. But why would I want to do that? Well, I’m never going to be a ‘game developer’ (person or team that makes video games) but by that logic, I should never bake another cake because I’ll never be as good as Heston Blumenthal. I do it for fun mostly, it’s a challenge to create something new and semi-original, keeping my mind sharp is important and I enjoy working on it. I’ll never create the next big thing, but that’s ok, I just want to have some fun and learn new things.
So how does programming work? Well, in a nutshell, you write lines of code that tell the computer what to do. There are many different programming languages out there, each with a different purpose but all with varying rules and ‘syntax’ (the way you order and structure the code), there are also a lot of things that are similar between languages as well, so once you know a bit of programming, the other languages will become easier. A really good place to start if you would like to get into programming would be the aforementioned ‘Scratch’ as it works with code blocks and there are many YouTube videos with excellent tutorials available.
The code for making Excel more usable with UserForms is not that different from the code required to make the character in my game run and jump. A little of it is using ‘Variables’ (a definable value that you can change and refer to) and a lot of the rest is knowing the right syntax for the ‘Boolean expressions.’ A Boolean expression is a connection between different expressions, for example, 3 < 5 (3 is less than 5) 3 and 5 are the expressions and ‘less than’ is the Boolean. These are linked together with other Boolean to create code. E.g. If 3 < 5 = ‘do something.’ So this but of fictitious code would make the program ‘do something’ IF 3 was less than 5. It should be noted that ‘do something’ is not an actual piece of code, I just put it there as an example.
So whether for fun or to find a way to make a task easier to do, programming is an interesting skill to learn. In fact, in this ever changing world where computers are responsible for nearly every facet of our lives, programming is becoming a more and more sought after skill. If you have young kids who have any sort of interest in ‘making things’ then consider getting them to have a look at programming. It is one of the few jobs that will be secure in 30 – 40 years from now.
Let me know in the comments what you guys and gals would like to see in this series. Would you like to see some of the actual code used to create some of my programs? Do you have a task you’d like me to try and improve with programming? I’m no expert but I’ll give just about anything a go.
Until next time, never stop learning