Finally got a degree

The events of 20th October, 2020 were a breaking point for me, and it led to me take certain steps for a better future, one of which was making the decision to embark on a journey to obtain the Professional Graduate Diploma in IT, a higher education qualification offered by BCS (the British Computer Society) which is equivalent to a UK Bachelor’s degree with honours (fancy). I decided to do this because I did not have a traditional university degree at the time. I will provide a minimal cost breakdown at the end of this if you wish to do the same, although you should note that the BCS is planning to retire the HEQ program in about 3 years (2026).

I was pretty ready to jump right into it, but registrations had closed for the November 2020 exam session. I had to wait a few months to be able to register for the next session which was May 2021. Each exam session is about six months apart, and I wanted to get things done as quickly as possible. But I ultimately learnt how to be patient.

I started with the Certificate in IT level, which has three core modules: Information Systems, Software Development, and Computer & Network Technology. I opted for self-study, so I decided to purchase a couple of recommended textbooks from the module syllabuses only for Information Systems and Computer & Network Technology. I have been developing software for over 27 years now, so I didn’t think it was necessary to get a textbook for that one. I also looked through the past papers which were available, and proved somewhat helpful. I hated Information Systems, Computer & Network Technology was quite hard (seeing as I had to remember intricacies about how laserjet and deskjet printers work, how hard drives store data, operating system features like paging and virtual memory, etc.), and I loved Software Development (27+ years of experience, obviously). It did take a couple of months to get the results which weren’t too bad. Note that the pass mark is 40%.

  • Computer & Network Technology – 51% (surprising, as I expected to do better with my detailed writeups)
  • Information Systems – 65% (most surprising, seeing as I hated the subject)
  • Software Development – 91% (well, duh!)

While waiting for the results, I embarked on a parallel journey to take a few ACCA exams in August 2021 for the Diploma in Accounting and Business, which was quite an interesting experience, as I was hungry for a challenge at the time. I also discovered that you could take any of the BCS exams for any of the modules at any level in any order. I had initially thought that you would have to take them in a particular order by level considering that there are 3 levels, Certificate, Diploma and Professional Graduate Diploma (PGD). This opened up a ton of possibilities and I decided to turbo through the rest. That turned out to be a not-so-great idea.

I ultimately decided to sit for six exams in the December 2021 session (4 modules from the Diploma in IT and 2 modules from the PGD in IT). These were:

  • Diploma: Professional Issues in Information Systems Practice – 53% (it is a core module, I studied for 6 different modules and I had brain fatigue and forgot some really easy questions).
  • Diploma: Web Application Development – 86% (18+ years of experience, ezpz)
  • Diploma: Object Oriented Programming – 70% (I don’t know, man. I kinda hate theory.)
  • Diploma: Big Data Management – 61% (I tried, man. Lots of theory. Brain fatigue).
  • PGD: Management Information Systems – 58% (very surprising result, to be honest, considering how much I hated Information Systems. I wrote what I could. Why did I pick this module, you ask? Well, because it seemed like one of the good options available on the exam calendar at the time.)
  • PGD: Software Engineering II – 64% (well, again, brain fatigue. This was the last paper on the calendar, and I was just glad it was over at the end.)

Why so much brain fatigue, you might ask? It turns out trying to study five different heavily theoretical modules is not a very bright idea. Plus I was also intrigued with trying to get the ACCA Advanced Diploma in Business and Accounting at the time, hence I was simultaneously studying Taxation, all while working a full-time software development job. I eventually burned out on the ACCA journey, failed my first attempt on the Taxation paper, and I had to forfeit the payment (£246, approx. $310) I made for a couple exams in March 2022 (Taxation retake and Performance Management), because I had to clear my head for the remaining couple of PGD papers: Web Engineering and Programming Paradigms which I was supposed to take in April 2022. I requested to defer the exams, but it was too late as I was past the deadline to do that, so I just rolled with it.

The results for the final pair of PGD papers turned out to be quite alright.

  • Web Engineering – 85% (Quite different from Web Application Development as this is more oriented to backend development. Again, I have been doing this for a long time now, so no surprises here.)
  • Programming Paradigms – 60% (Ugh! Another surprise seeing as I tried my best, but can we all just agree that theory sucks?)

Finally, I had to submit a project report. This turned out to be quite an annoying experience. There are only 2 submission dates in a year, and you have to wait six months to get a result. I submitted my report in May 2022 (August deadline), and waited until December 2022 to get the result, but it ended up getting marked as Fail. That ended up being rather disappointing, but I had to push forward and try again. I decided to contact a training centre for guidance, which required me paying a fee, but I went ahead with it since they’ve had students who have been successful with their project reports. I submitted again in February 2023, and waited until July 2023 to get another Fail mark. That really startled me and made me a bit upset, considering the amount of time, effort, blood, sweat and money that I had put into correcting my report based on the Project fail letter that was sent the first time around. I ultimately decided to appeal and that came back one month later with the score corrected to Pass. My final certificate is currently on the way and I am just glad this is all over.

What’s next? I’m really keen on pursing an online Masters degree in Computer Science, with Artificial Intelligence, since AI is all the rage right now. I’ve always been interested in AI since before it became cool, though. In any case, let’s look at the estimated total cost of everything at the time, and compare to now.

Cost breakdown
At the time

Student membership4 years£30≈$38~₦‎18,500$1/482
Certificate in ITthree core modules @ £40 each£120≈$152~₦‎74,000$1/482
Diploma in ITone core module + three elective modules @ £50 each£200≈$254~₦‎144,800$1/570
Professional Graduate Diploma in ITfour modules @ £90 each£360≈$456~₦‎260,000$1/570
Textbooks for all modules(bought at separate intervals, some used)~$360~₦‎189,400$1/526
PGD Project submission£115≈$146~₦‎88,700$1/607
PGD Project resubmission£115≈$146~₦‎110,600$1/757
~$1,552~₦‎886,000

Total cost – $1,552 or ₦886,000. I paid an additional ₦150,000 paid for project guidance from an accredited learning centre before the resubmission, and I also paid £100 (~$127) for the project appeal. Since the appeal was successful with the result changed to Pass, the £100 will be refunded.

Recently
With the parallel exchange rate at $1/920 today, which is just stupid (a story for another day), here’s what the total cost would look like (without a project resubmission).

Student membership4 years£30≈$38~₦‎35,000
Certificate in ITthree core modules @ £45 each£135≈$171~₦‎158,000
Diploma in ITone core module + three elective modules @ £50 each£200≈$254~₦‎234,000
Professional Graduate Diploma in ITfour modules @ £90 each£360≈$456~₦‎420,000
Textbooks for all modules(bought at separate intervals, some used)~$360~₦331,200
PGD Project submission£115≈$146~₦135,000
~$1,425~₦‎1,313,200

While this adds up to about $1,425 / ₦1,313,200 if you decide to take the self-study route, this is ultimately significantly cheaper than travelling all the way to the UK to obtain a degree from a university.

Reboot

Hello and welcome to Antinormal. I used to maintain this as a personal blog but I decided to start all over since I wanted to take things in a different direction. I hope to make useful posts going forward.

My name is Akinwale and my favourite things are computers, video games, good movies and books. As I’ve grown older, I find that I haven’t had much time to play games anymore, but I still play The Division fairly regularly. The only other games I have played this year are Deus Ex: Mankind Divided and X-COM 2.

I like science fiction, technology and programming.

Thank you for reading! Comments and feedback are welcome.

How to control GPIO pins on the Raspberry Pi 3 using C#

GPIO pins on the Raspberry Pi can be controlled using the sysfs interface, which is a virtual filesystem that the Linux kernel provides. In this guide, we will write a basic C# class to control available pins on the Pi through sysfs.

Understanding the sysfs interface
sysfs provides access to the GPIO pins at the path /sys/class/gpio. You can cd into this path and ls to list files in the directory. There are two special files here which are export and unexport. You write to the export file to activate a particular pin, while writing to unexport deactivates the pin. The following example activates GPIO pin 18.

You can verify that the pin is activated by listing the files in the /sys/class/gpio directory. You should see a gpio18 folder in the directory listing. After the pin has been activated, you should specify whether the pin should be an input or output pin before you can read or write values. You do this for input like so:

Or for output:

If the pin is specified as an output pin, you can write a value of either 0 (low) or 1 (high) for the pin. If a LED is connected to the pin for this example, a value of 0 will turn the LED off, while a value of 1 will turn the LED on. To specify the pin value, you can do this:

Once you are done with the pin, you can deactivate it using:

Writing the C# class
Now that we have an idea of how sysfs works, we can create a class to implement the necessary steps. The sysfs approach basically requires writing values to the file, so we can use simple file I/O operations to achieve the desired result. The full listing for the GPIO class can be found at https://gitlab.com/akinwale/NaniteIo/blob/master/Nanite/IO/GPIO.cs.

The first thing we’ll do is add the using statements for the namespaces. System.IO is required for FileStream, StreamReader and StreamWriter which are used for file I/O. System.Threading is required for the Thread class, while Nanite.Exceptions contains the custom exceptions defined for our project. We’ll also define enumerations for the GPIO direction and value, and a few constants for strings like the GPIO path and other special files. The class will be defined as static, because we do not need to create an instance of the class.

Pretty straightforward so far. The first method we’re going to define is the PinMode method, which will take the pin number and direction as parameters. This method will activate the pin and then set the direction to either in or out depending on the specified parameter value.

We build the pinPath string making use of Path.Combine(GPIOPath, string.Format("gpio{0}", pin));. If the value specified for the pin parameter is 18, pinPath will contain the string, "/sys/class/gpio/gpio18". The ClosePin method call is optional, but the idea behind this is that the pin should be deactivated first before activating. We also check if the gpio pin directory exists using if (!Directory.Exists(pinPath)) before activating to make sure we are not activating a pin that has already been activated.

After the request for pin activation, there may be a small delay which is why we have a while loop which waits until the corresponding gpio pin directory has been created before we set the pin direction. Thread.Sleep(500) makes the program wait 500 milliseconds before proceeding to the next statement. Note that this while loop is completely optional, but it acts as a safeguard against setting the pin direction before the gpio pin directory has been created by the system. One thing to take note of is if the gpio pin directory never gets created (for instance, if the pin is invalid), the loop may end up running forever. To fix this, we can set a maximum number of times the loop should run before ending the loop.

The next method is the ClosePin method which takes the pin number as a parameter. This method checks if the pin directory exists before it writes the pin number to the /sys/class/gpio/unexport file.

We create the Write method to write a value to a pin. It takes two parameters, the pin number and the value which is of the Value enumerator type with possible values Value.Low or Value.High. In this method, we make use Path.Combine to create the full path to the value file in the gpio pin directory. For pin 18, this will be "/sys/class/gpio/gpio18/value". If value for the value parameter is Value.Low, we write 0 to the file, otherwise if it’s Value.High, we write 1 to the file.

Finally, we have our Read method to read a value from a pin. It will return either Value.Low or Value.High depending on what the pin has been set to. The question mark at the end of the method return type indicates that we can return null for the method if the value retrieved is invalid.

To determine if the retrieved value is valid, we add a couple of checks in the method. The first is the int.TryParse method, which returns false if the retrieved value is not a valid integer. Then verify that the value is either 0 or 1 using if (pinValue != 0 && pinValue != 1). If it’s neither 0 nor 1, null is returned. Otherwise, the corresponding enumeration value is returned by casting the integer to GPIO.Value.

Finally, we can put this all together in a sample program. If a LED is connected to pin 18, the LED will light up when the value is set to High and turn off when the value is set to Low.

Source Code
The full code listing for the GPIO class can be obtained from https://gitlab.com/akinwale/NaniteIo/blob/master/Nanite/IO/GPIO.cs.