Hobbyist computer programmer from Melbourne, Australia.

Currently studying a Diploma of Software Development.

Contributor to and member of Open Live Writer, .NET Foundation member.


me elsewhere

electronic mail:
nick [at] nxk [dot] io

subscribe via RSS

Like what I do?

All of my work on open-source software occurs in my free time. If you'd like to support my work, you can donate through PayPal.

Buttons!

Blog

  • Insider Dev Tour ‘review’

    On Friday I attended Microsoft’s ‘Insider Dev Tour’ in Melbourne, one of about 44 similar events being held around the world throughout the month of June. Microsoft advertised the event as being ‘for developers interested in building Microsoft 365 experiences (…) today, using the latest dev technologies, as well as for those who want a peek into the future,’ and it was completely free to attend. Hosted at the offices of Xello, a Melbourne-based IT consultancy company, the event was all day, running from the hours of 8 to 5, and had food and coffee provided.

    I was fairly excited when I heard about the event, having being recently drawn in to the Windows desktop development ecosystem through my involvement in the Open Live Writer project. I wasn’t going in with any particular agenda on things I would’ve liked to learn, but rather I was just curious as to how the whole day would play out and if I’d pick up any nifty skills. I’ve never been to any kind of developer conference before, so really this would’ve been a first for me.

    More...


  • A few thoughts on the recent Moe bus re-timetabling

    Photo: LVBL Volvo B5L bus outside the Latrobe City Moe Library and Service Centre. Photo Credit: Volvo
    Photo: LVBL Volvo B5L bus outside the Latrobe City Moe Library and Service Centre. Photo Credit: Volvo

    Roughly two years ago, PTV completely overhauled the bus network in the Latrobe Valley, operated by Latrobe Valley Bus Lines. Amongst other changes, the new routes and timetables split the Newborough loop out of the Moe to Traralgon trunk route (Route 1), thus creating two local Newborough routes (Route 14 and the new 15), as well as streamlining Route 1 to run more reliably, regularly, and for longer hours. Whilst many Newborough locals were opposed to the changes, I personally found them to be of considerable improvement. The new Route 15 provided service where there previously was none, and the Route 1 streamlining meant you could get to Morwell from Moe/Newborough in roughly 15 minutes, and Traralgon in around 35.

    Even though I spend most of my time nowadays in Melbourne, the bus network in the Latrobe Valley still remains of considerable importance to me. It’s how I got around when I lived there, and now it’s how I get around when I’m in the area visiting family or friends. As such I have been able to generate an array of opinions on how the service is run, with most of them not being positive. I’ve communicated before, both to LVBL and PTV, about the various faults I find in the operation of the service; such as the lack of timely connections to trains Moe Station, or Route 1 buses arriving late into Moe Bus Interchange with local town routes departing before the Traralgon bus arrived. Writing to LVBL simply resulted in them asking me to redirect my complaint to PTV, and writing to PTV garnered basically no tangible response to my concerns; they simply stated that they’d keep my concerns in mind rather than opening a dialogue.

    So understandably, I was both excited and hesitant when I heard that PTV are due to enact a new set of bus timetables for the Latrobe Valley on the 23rd of June. Would we finally see a more logical set of routes and timetables for Moe, with proper connections with trains and other bus routes, or would we see just a general expansion to service with the same faults still present?

    More...


  • C# Dirty Delegate Hack

    Just a quick one for today. For a uni C# assignment I’ve had to implement a multi-delegate that processes a list of data, with the delegate consisting of three disparate functions which I also had to implement, according to a unit test spec. Data has to flow between each step of the delegate to produce the correct output. Now the usual way to do this would be to use pass-by-reference to alter the original data in-place, however in this circumstance it was not possible as the tests required the signatures of the delegate methods to pass-by-value. After thinking for some time, I came to the following solution. Beware, it’s fairly horrible.

    In the classes containing the delegate methods, I define a helper function;

    public static List<List<string>> S(List<List<string>> oldData, List<List<string>>newData) {
         for (var i = 0; i < oldData.Count; i++) oldData[i] = newData[i];
         return oldData;
    }

    Then in the delegate methods, I wrap the results expression in this helper function, passing the original list as the first parameter

    public List<List<string>> StripWhiteSpace(List<List<string>> data)
         => S(data, data.Select(row => row.Select(val => val.Trim()).ToList()).ToList());

    This then results in the new data being returned from the method (satisfies the tests) as well as the original data being replaced (allows the data to flow to the next delegate method). How does it work? It comes down to the fact that the data I’m working with here is non-primitive; passing it between methods is implicitly by reference rather than by value. It did take me a while to reach this conclusion, my initial thinking was that I’m working with lists of strings, and strings are primitive and therefor pass-by-value. When I realised I was actually working with Lists, which are non-primitive objects, it occurred to me that I could write a helper method to modify each member of the original List in-place. Because the new data is being placed back into the original List object, the same object of which is referenced later on, the data carries itself forward into those next methods of the delegate.


  • Open Live Writer, Blogger and Google Drive now working

    IMG_4791

    Photo: Open Live Writer running on Windows 10, taken at Docklands Melbourne. This image was published to this Blogger blog with Open Live Writer.

    Beginning from the next release of Open Live Writer (0.6.3), Blogger users will now be able to successfully post images to their blogs again. After being affected by the issue myself in my own usage of the software, I took it upon myself to develop and deliver a fix. Today, Open Live Writer will, instead of uploading to Google Photos using the now non-functional Picasa API, upload to Google Drive, publicly link-share the photo, and then embed the direct URL to the image within your post. This all happens automatically from within Open Live Writer, there are no work-arounds or hacks at play.

    More...


  • An afternoon wasted and an exercise in partition frustration

    …or “What to do if you lose Mac OS after resizing your Windows Bootcamp partition”

    TLDR; Scroll to the bottom of the post where I outline the steps I took to make my Mac partition bootable again without any data loss.

    I was meant to spend this afternoon completing an assignment for my course due Thursday. Instead, I nearly lost all of my programming projects dating back to when I began to take programming seriously at age twelve. This is your typical "always have and check backups story"; something I thought I was immune to – until now, at least.

    It began when I decided I needed to expand my Mac’s Windows 10 Bootcamp partition. I thought this would be an easy task; I’d shrink my APFS partition from Mac OS, as Disk Utility would be the beast utility to accomplish that task, and then expand my Windows partition from Windows, as I don’t trust Mac OS to expand NTFS. Shrinking the APFS partition went swimmingly, it took about 15 minutes and apart from Disk Utility freezing, seemed to complete without a hitch.

    The next step was to expand my Bootcamp NTFS partition to fill the unallocated space on the SSD. I decided to undertake this task in Windows, rather than booting a Linux live USB. The first tool I tried was the built-in Windows Disk Management, however it quickly became apparent that it cannot resize a currently mounted partition, like the Windows C: drive. So off to the internet I went, in search of a partitioning tool that could somehow accomplish this task. I landed on EaseUS Partition Master, it was a program I had heard of before and it seemed to be fairly reputable. It advertised itself as a safe way to manage partitions. This turned out, in my case, to be false.

    More...