Learning to program for me all began with a small batch script my brother had written when I was very young. This batch script was a simple menu system that would allow someone to navigate the games he had installed and launch them by entering their menu number. This script worked well for its purpose but over time had to be modified and extented in order to launch new games we had installed. This simple script was all it took to build an interest in programming for me, and sent me down the path of learning programming concepts and getting to grips with a number of programming languages.
Through my teenage years I found PHP to be my lanugage of choice as I honed my skills around web design and development. I quickly found that while I had a knack for making things work, I generally struggled to make them look pretty.
Later in life I have found this interest in programming, and an innate logic driven mentality for figuring things out; have stood to me greatly in a number of roles across different but related industries. To that end I returned to college in order to obtain a qualification in Computer Science.
The following are a description of a small number scripts I have produced over the years across different roles and industries:
Build Server Availablility Script
During my time working as an IT Administrator for Lake Communications (Mitel), one of my responsibilities was maintaining the in-house development build server. This server was for use by our in-house software development team to kick off firmware builds for a product that was actively in development. An issue that we encountered on this server was that as our developement team grew, more and more people were kicking off compilation processes without regard for any active builds running on the server and causing everyones builds to slow to a crawl.
To that end, I produced a bash script that would be executed at login - as all logins to this machine were via SSH. This script was simple in nature, it would gather statistics via ps, top, free, who etc... in order to classify the load on the system during login. This information was presented to the user at login and would also produce a colour ascii graph of system load. Based on the colour of this graph being Red, Orange and Green, a simple traffic light system was established to determine if it was suitable to kick off a new development build.
Over time, this script was incorporated into the build script in order to confirm if a developer really wanted to kick off a build if the system state was orange or green.
An additional modification was made to the script later on to determine if a particular system user had kicked off a build process, this was because it was the build manager who kicked off production builds. This modification to the script would advise all developers at login / build time if a production build was in process.
DHCP Lease Release Testing Script
While I was working as a Customer Support Representitive on the BT Micro Helpdesk, I noticed an increase in the number of calls in relation to people connecting to the BT Micros wireless network but failing to receive a valid lease. When logging in remotely, I always found the leases table to be full but the number of connected wireless clients to be minimal. I suspected the DHCP Server was not clearing its leases correctly when a client disconnected or released its IP.
In order to verify this, I required a script that could release an IP, change the MAC address of the network adapter, and renew the IP address again. As I was working on a windows system at the time, I was unable to make use of ipconfigs ability to set the HWADDR for a NIC on Linux. To that end, I had to make use of a 3rd part command line application that would allow a user to modifiy the MAC address of any network adapter on the system.
With this software, I was then able to script the release/change/renew of the network interface and confirm that the DHCP Server was in fact, not releasing a lease as it should. This bug was then documented, along with the script used to reproduce it and the 3rd party tool required, and was presented to the developement team with a temporary work-around that could be implemented from the web-GUI on the BT Micro.
MikroTik CPE Configuration Script
While working for ARRA Communications Ltd, we were embarking on a new endevor in order to deliver Fibre broadband to customers. As we had chosen MikroTik as our CPE of Choice for this, we needed a way to quickly and efficiently configure the devices. In addition to being able to configure the devices, we wanted to ensure that the configuration would be restored to the device if the reset button was pressed.
In order to acheive this, I produced a MikroTik script that would pull information from the hardware in order to determine its own base values. This means that the configuration can continue without any human input. The script effectively sets up the WAN interface, PPPoE client, the LAN Bridge and makes use of CAPSMan to configure the wireles and allow for the extension of this by the simple installation of CAPS devices. It also creates the client Firewall, RoMON Keys, DHCP Server, IP Addresses and everything else required for a functional CPE.
The actuall pushing of this script was done via the MikroTik NetInstall as this allows one to overwrite the default configuration on the device, allowing for the reset button to restore our intended configuration to the device rather than the default MikroTik one.
Reverse DNS and Smokeping Monitoring Script
While working for ARRA Communications Ltd, I wanted an easy and simple way of exporting our reverse DNS entries for clients at a regular interval. As we were using IP Plan for our IPAM at the time, this supported exporting of XML files for our reverse DNS zones.
In order to automate this, I made wrote a PHP script that would connect to the IP Plan database and check for any entries of valid IP addresses that did not have an associated reverse dns entry. The script would then automatically generate an entry in the form of 4-3-2-1.reverse.tld, as defined in RFC2317.
Once the PHP script had been written, I began working on a bash script to tie everything together. I would run the PHP script to generate the reverse DNS entries for any IP which did not already have one. I would then make use of CURL to produce a web request to IP Plan in order to export the XML files for the reverse DNS zones.
Once the zones had been exported, I made use of XSLTPROC in order to parse the XML files and output a reverse DNS zone for each /24 under our control. While working on this, I had also been playing with the Smokeping network monitoring system. I decided that as we would have a reverse DNS entry for every active IP address on our network, that this was also sufficient information to populate smokeping with. I then went ahead and wrote a small script that would parse the zone files and produce smokeping target files.
Once all of these files had been generated, the bash script would go ahead and SCP/RSYNC the files over to our primary name server and our smokeping monitoring system before initiating a reload of their configuration. This script was then added to a CRON task and has worked flawlessly since it's implementation requiring no modification to date.
I hope some of the above scipts will give an indication of where I have applied my software skills outside of a disticnt software developement role. Naturally, I have produced bespoke commercial software under contract for clients in the past also.
One such client is Salvage Direct Southern Ireland - A vehicular salvaging service based in North Tipperary. For SDSI, I have produced a full case and inventory management system which can take care of expenses associated with a salvage claim on a case-by-case basis. This includes billing and invoicing for purchases, sales, storage and services rendered. This software was produced in PHP and built using the CakePHP MVC Framework.
Some of the automated elements of this software in relation to billing saves tens of hours each week in manpower simply creating and issuing invoices. I would estimate it has saved thousands of hours of manpower since it's implementation in 2016.
Despite most of the software showcased above being in PHP, Bash Scripting or Batch Scripting, I have familiarity with a number of languages, some of which are:
- C
- C++
- Java
- PHP
- PERL
- Python
- Processing
- Arduino
- Bash
- Batch