Git. Command Line or Graphical User Interface?

I was doing some reading today about Git and whether software engineers (or anyone else for that matter) should learn to do all their changes, etc for Git using command line or a graphical user interface. It was an interesting piece and some valid points were made for both using a command line and/or a graphical user interface. Me personally, I use a graphical user interface because it is extremely easy, hooks directly to the Git commands (under the hood) and can give you a nice visual tree of what the repository looks like. For your information Sourcetree is the client I use. However the more programming and development I do, the more I appreciate and want to learn what, how and why.

Some of the reasons why using the command line approach is valid and well worth it include but not limited to:

  1. Platform Independence:
    • No matter what operating system you are on, the commands are universal. So if you can use the Git commands in a Linux environment, then you will have absolutely no problem whatsoever doing it on a Windows or MacOS machine.
    • Git clients like Sourcetree for example are not available on every platform, and I imagine the other Git clients are also not available on every platform.
  2. Understanding:
    • This fundamentally for me is important and I think should be high on everybody’s list when using something.
    • By using the command line you get a level of understanding of what exactly you are doing, whereas using a graphical user interface this level of understanding (well to me) is abstracted and partially lost.
    • It also comes back down to point 1. If you understand what you are doing then you can take it to any platform.

Now using a graphical user interface is not the end of the world. Sometimes you just want to get something done and using a terminal if you are not comfortable with it can be extremely daunting. I personally would never be caught dead (well right now anyway) resolving merge conflicts and looking at diffs using a command line, and rebasing using a graphical user interface is so much easier.

I did some quick Googling and found what I feel are two really good resources that help and ease you into using the command line for Git. There is Try Git and Learn Git Branching. There are probably more out there but those are the two that I felt provide a good starting point. If there are others out there that you use or feel that there is a resource that is definitely worth reading then please add a comment below (sharing is caring) 🙂

Kaspersky Anti-Virus + Microsoft Windows 10 + Microsoft Office 365 Issue

Recently I had updated three of my household’s Windows 10 machines (one Surface Book 2, one custom built gaming PC, and one ASUS laptop) to the latest stable/release version of Windows (Microsoft Windows April 2018 Update). Each of machines also have a copy of Microsoft Office 365 installed, along with the latest version of Kaspersky Anti-Virus.

What I have found after the Windows 10 April 2018 Update installation; Microsoft Office 365 fails to properly recognise that I have a registered version. I can still use the products in the suite such as Word, Excel and Outlook, but am given 3 days to rectify the problem before the product runs in a limited capacity. I have the correct account logged in, the credentials are correct, and if I try to register and authenticate via the Internet option (phone option is not available) it completely fails. Googling or Binging the error code that is produced does not show any resolution or worthwhile results.

Restarting the machine, restarting any of the Microsoft Office 365 products also does not seem to resolve the problem. Initially I thought that communication to the Microsoft servers was unavailable (sometimes servers go down), but trying to use the product at any time resulted in the register/authenticate prompt to appear on all the machines. So out of sheer desperation and curiosity I thought perhaps I should disable my anti-virus because sometimes they can cause problems with certain applications. Low and behold when I booted up any of the Microsoft Office 365 products the registration/authentication prompt no longer appeared. It appeared that Kaspersky Anti-Virus was blocking or limiting my ability to properly communicate with the Microsoft servers.

Now that Microsoft Office 365 could be restarted without the register/authenticate prompt appearing I decided to re-enable my Kaspersky Anti-Virus, restart my machine and launch the Microsoft Office 365 products. Still no more register/authenticate prompts; great news. Whatever happened between the Windows 10 April 2018 Update, Kaspersky Anti-Virus and Microsoft Office 365; it seemed like it invalidated my copy of Microsoft Office 365. If you encounter the same problem after updating your Windows 10 machine then try the following steps because they worked for me:

  1. Close any open Microsoft Office 365 product you have open.
  2. Disable any anti-virus that you have running (if possible).
  3. Open a Microsoft Office 365 product.
  4. Close the Microsoft Office 365 product.
  5. Turn on your anti-virus.
  6. Restart your Windows 10 machine (this is optional).
  7. Open a Microsoft Office 365 product (the register/authenticate pop up should no longer appear).

Hopefully the above steps helps to resolve your problem.

Another Android Messaging Play?

Poor Google.

If you have ever used Android, then you may be familiar with the various messaging and chat clients that Google has provided you throughout the years. There was Google Talk, Google Hangouts, Google Messenger, Google Allo, etc. Some of them no longer exist, some have been repurposed, some have been renamed and some have/had no support in a long time.

Now it appears that Google will be trying to unify and have one primary messaging and chat app for the Android OS with the backing of a number of telecommunication companies, mobile phone manufacturers and service providers. This is sorely what the Android platform really needs if it wants to catch up to Apple and the iMessage system that they have.

This information appears to have been broken exclusively by The Verge and propagated through other media outlets afterwards. When I watched their video and read the article I was excited, and still am. However I do have some reservations with what they are offering. Some of these are unfortunately unavoidable while others are concerns based on how Google likes to work.

What excites me:

  1. A single, unified, quality chat and messaging app:
    • I don’t need to have Allo, Messages, etc on my Android device. There is just one default app now called Chat.
  2. Support from a number of third parties:
    • From the telecommunication companies to the mobile phone manufacturers, it appears to be backed.
  3. Charged for data messages instead of SMS where possible:
    • Data messages cost me significantly less than a standard SMS. Anything to save some money is fantastic.

What concerns me:

  1. No end to end encryption:
    • With all the snooping, data gathering and harvesting, ensuring that your messages are readable by only the intended parties IMO is critical.
    • iMessage has the leg up here.
  2. Long term support from Google and third parties:
    • Will the third parties drop support soon after launching?
    • Google has a habit of:
      • Throwing stuff at the wall and seeing what sticks.
      • Constantly drop support for apps and services when they get bored and try to start again.
      • Not letting apps and services mature before they get cut or dropped.

Looking at the list of operators, Telstra appears to be on the list so that is good for me. HMD Global/Nokia appears to not be on that list, but that may change in the future as they seem to be going the route of pure stock Android. Having Microsoft onboard is also great because it could mean that a Windows 10 desktop client may also be in the works.

Messaging on Android may get a cleaner and uniform in 2018, but for how long?

Software Development: Returning Null and Null Checks

This past week I was looking over a number of merge requests and some of them had new methods declared with a return type of String (these are Java classes). With all of these methods if there is a logic issue or some unexpected behaviour then instead of returning an empty String object they all returned null. Personally this starts ringing alarm bells and waving red flags. Why is that you may ask?

If nulls are being returned, passed around to other methods, etc then the programmer will need to check before using that object (well they should anyway). There have been numerous times where I have seen programmers completely ignoring a null check for an object even though the method they used before to set that object could potentially return a null. With every one of these cases I politely leave a comment on the merge request, waiting until an update commit with the null checks are added before merging. Better safe than sorry.

Now am I being too cautious? I tend to lean towards the overly cautious side because it does not take much more lines of code and effort to ensure that the appropriate logging and checks are in place so that unexpected errors and problems with the software are not encountered by the user; plus it means that the software you are writing is safer. Let me know how you handle situations like this. Talking to some of the other programmers I know, they are split on the subject. Some don’t really care what is returned and don’t bother checking the object before use (those I call cowboy programmers), some don’t really care what is returned but do check before the object is used, and some care about what is returned and always check the object before use (I fall into this camp).

Potentially this problem is solved on a case by case basis. Is there a valid reason a null object should be returned? I’ll be doing some more reading about this to get a better understanding to ensure that I adhere to proper programming etiquette and safe programming.

Update: HMD Global/Nokia Missing Android Security Updates

Update 28/04/2018

Recently I was in contact with the HMD Global/Nokia support team and I had two very different experiences. The first support person I was in contact with I explained my situation and wanted to know why my Nokia 8 had not received the Android Oreo 8.1 update and the April 2018 security patch. They were extremely friendly and happy to assist. They tried a number of different methods to force the update and were not sure why some Nokia 8 devices received the update and others did not. I was told to contact the support team again later on in the week if the update had not arrived. My second support contact was no where near as friendly or helpful however.

Unlike the first support person I was in contact with, the second support person was hostile, rude and did not seem interested in helping me at all. As the first support person instructed me I let the second support person know what was happening and that I was told to ask for further assistance if the update had not arrived. This second support engineer did nothing or try to find answers to my problem. Instead all they kept responding with was to “just wait and the updates may come”. This right here is not really reassuring to a customer who just wants a little explanation as to why this is happening and to be so rude and completely unwilling to assist helps no one.

Yesterday I got a little notification on my phone that allowed me to update to Android Oreo 8.1 and also update to the March 2018 security patch (not the April 2018 security patch unfortunately). I will be closely monitoring the situation and if HMD Global/Nokia continue to delay patches to their Android smartphones then I may have to bite the bullet and buy a Pixel phone in 3 years time.


I was really hoping that I would not have to write this post.

When I was looking for a brand new Android mobile phone, one of the requirements that I had was that the mobile phone would be supported by Google and the manufacturer for at least three years (two for the major Android OS and three for the Android security updates). The only manufacturer that I could find that met this requirement was HMD Global/Nokia (not including Google) and why I chose to pick up the Nokia 8. On the Nokia Android home page it clearly states:

Regular security updates and two years of OS upgrades…

If you navigate to the Nokia Smartphone Security Maintenance Release Summary page you can see that HMD Global/Nokia are pushing updates to various Nokia mobile phones (including the Nokia 8). However, not all models are receiving the updates. The security patch release information is done on a Device – Build_number basis it appears. My Nokia 8 has a Build_number ’00WW_4_390_SP02′, which unfortunately does not appear in both the March and April security patches.

When contacting the HMD Global/Nokia support team about this, they could not provide a valid reason why my Nokia 8 was not getting the security patches even though my device (not the build number though) was listed in the security patch release. Looking through the forums shows the same confusion and frustration from other customers. Some sort of answer would be greatly appreciated by HMD Global/Nokia.

Has HMD Global/Nokia gone back on their promise of regular security updates? I would say partially yes. They are updating some devices but leaving other devices based on build numbers it would seem. In saying that however how regular is regular? Is a monthly security patch regular? Is a two month or three month interval regular? Right now I wished that HMD Global/Nokia would have been more specific about the regular security updates. To their credit though, compared to Samsung, LG, HTC, etc. they are trying to ensure their devices are up to date.

Recently I came across an article on The Verge discussion manufacturers lying to customers about the security level on their Android devices. That is even more concerning. I would not want to “update” my mobile phone only to not be properly protected even though it appears that it is protected. Hopefully HMD Global/Nokia is not one of these companies.

Right now I am sitting and waiting for the latest security update for my Nokia 8. But if it never arrives then when it comes to buying a brand new mobile phone it may be time to switch to another manufacturer. Perhaps going back to the Google products (RIP Nexus line) and buy a Pixel mobile phone is the only option. Are Android security patches and OS updates worth the premium price of those Pixel phones? For me the answer is yes. I would happily pay more for a device that is supported and updated timely.

I will update this post if my Nokia 8 receives the April security patch, but will not be updating it after April as a two month gap between security patches is not regular IMO. Am I making too much of a fuss? Or should HMD Global/Nokia and other manufacturers take more responsibility and ensure that customers are protected while using their devices?

My Artificial Neural Network Application & Podcast

The last month my blog has been fairly quiet.

I have been a little busy working on my artificial neural network, practising BJJ and playing some video games; plus I was sick for a couple of days. Initially my plan (which I stuck to for an extended period) was to put out a blog post every one to two weeks. However coming up with meaningful content that often can be fairly difficult.

This month I plan on writing about my artificial neural network with some emphasis on how a multi-layer perceptron works and how my application works/be used. It can be viewed on my GitHub page.

The current state of my artificial neural network on GitHub is just the skeleton with the majority of the code still not pushed to the repository. As I start to push the meat of the artificial neural network components such as the feed-forward, backward propagation, etc I will be creating specific blog posts.

The podcast that I was working on has not turned out as expected so I am in the process of re-evaluating the tools and topics that I will cover. I still plan on creating a podcast and with the new Content Creator version of Skype it should make the process  much simpler.

Android and Split Screen

Recently I have been noticing that sometimes when I unlock my Nokia 8 which runs Android Oreo, I see that the split screen mode has been enabled/triggered. At first I was extremely confused as the device was supposed to be locked in my pocket, but yet the apps at times (mainly Spotify) would go into split screen mode.

Looking through all the settings I could not find a way to disable this split screen mode. Again I find that odd and slightly confusing because the new picture in picture mode can be turned off. So why did Google not provide a means to disable the split screen mode for the apps?

While doing some more reading I managed to find how potentially I was triggering the split screen mode in my pocket. The app switching button if it is held for a short period of time triggers the split screen mode. The 9to5Google Android N quick-tips: How to activate split-screen multitasking mode outlines the same method that I have detailed above how to trigger the split screen mode, but they list two other methods.

Perhaps Google when they finalise Android P they will offer a way to disable the split screen mode. If someone does know of a way to disable split screen mode then please do let me know because the only pieces of information that I could find on the Internet are articles about how to ensure your app handles split screen mode.

My New Sennheiser PXC 550 Wireless Over-Ear Headphones

For a little while now I have been looking at getting a new pair of over-ear headphones. The main reason why I would like a new pair of over-ear headphones is because my current Beats Solo on-ear headphones begun to fall apart. 2017 had not been a great year for me with respect to headphones. Early 2017 saw my microphone detach from my Turtle Beach X12 headset I use for my PC (luckily I could just force it back together and the wires were not broken), then sometime in the middle of 2017 my in-ear headphones broke and had to get a new pair (I bought some Sennheiser headphones), and then finally at the end of 2017 my on-ear Beats Solo headphones started to break down.

Before I purchase a product I do my research; so for a couple of months I was watching various YouTube videos that reviewed a number of over-ear headphones, both wireless and wired and read a number of different reviews covering the same over-ear headphones. Finally I settled on the Sennheiser PXC 550 wireless over-ear headphones. It was between those wireless over-ear headphones and the Bose Quiet Comfort 35 wireless over-ear headphones. My original plan was to buy a significantly cheaper pair of over-ear headphones but the price I saw these PXC 550 headphones was too good to pass up. The reasons why I picked up the Sennheiser PXC 550 wireless over-ear headphones were:

  1. Comfort:
    • The pair of headphones fit around my ears and the top of my head perfectly. The cans are shaped like human ears 🙂
    • The cans and band on top of my head did not press down or create a large amount of pressure on my head. Wearing these for an extended period would be easy and comfortable.
  2. Quality:
    • Unlike my Beats Solo headphones these headphones felt extremely well built, everything clicks, fits and moves with precision. Nothing felt misplaced or miss-aligned.
    • The materials used all feel like they are premium and nothing on the headphones feel cheap.
    • Audio produced from the headphones is great. I am not too fussed or picky as I am not really an audiophile but I can definitely tell when some headphones sound tinny, are too heavy or too weak in one area. These were perfect for me.
  3. Features:
    • NFC for quick and easy pairing.
    • Android application that gives you a number of handy details about the headphones status.
    • Touch controls. There are only really two buttons on the headphones. Nearly everything is controlled using touch controls on the right eat cup which is super handy so there is no clumsy guesses which button or control you are touching or fiddling with when you are wearing them.
    • Headphones turn on and off using an extremely intuitive and innovative technique. When you want to turn your headphones on, just put them in position to put them on your head and they turn on. Want to turn them off, position them so that they are ready to be packed up.

Unboxing my headphones revealed a zip-lock fabric case. The case is not hard, so it won’t protect the headphones from extreme pressure; but it also is not too soft such that it can be easily squashed. The case also has a small pouch section inside that can house your cables or other adapters. You get a micro USB charging cable (would have loved a USB C), a 3.5mm headphone cable, an aeroplane headphone connector and a larger connector for various mixer or audio devices. So right off the bat you are welcomed with a number of useful accessories, something that other products don’t provide, kudos Sennheiser. Pairing the device is super simple. I used NFC with my Android phone, but you can also pair using the standard Bluetooth method. Using the headphones is also super easy. The instructional booklet that is supplied details all the gestures that you will need to use and remember. To start and stop your audio, just tap the right ear cup. To turn the volume up just tap and move your finger up the right ear cup. To turn the volume down just tap and move your finger down the right ear cup. You get the picture. All the controls are tied to the right ear cup.

The microphone on the headphones is also pretty good (I have not tested the inline microphone on the 3.5mm detachable cable). After testing out the headphones with one of my favourite Spotify playlists I asked my brother to give me a call so I can test the quality of the call and if he can hear me clearly. It all checked out and he could hear me loud and clear with no issue and I could hear him just as clear. Now as these headphones are wireless the battery life is very important. Unfortunately the battery is non-removable, but these headphones are supposed to last at most 30 hours on a full charge and they take a full 3 hours to completely charge. From what I could tell, the Sennheiser PXC 550 headphones have the longest battery life for the price point. As with any new electronic device I get, I always recharge the device completely before using it and these headphones were no different. After several days wearing the headphones to/from work (I walk to/from the bus stop and catch the bus to/from work) and at work I have barely drained the battery life on these headphones. There is nothing more satisfying that putting on some noise cancelling headphones, picking up a couple of Jira issues and programming for an extended period. I plan on recharging them only when the battery reaches less than 10% so that I don’t have to worry about plugging them in every night or afternoon when I come back from work.

As of right now I cannot really fault these headphones. They were expensive but thanks to a 20% eBay discount I managed to snag them for ~$370 AUD. The headphones feel, sound and perform great. You get a number of accessories that you don’t get with other high end and similarly priced wireless headphones. A really worthwhile video to watch the shows off how good these headphones are and what features they have is The Best Wireless Headphones You Can Buy Right Now by Unbox Therapy, it was one of the videos that helped me decide that these were the ones to buy. If anyone has any questions about the headphones just leave a comment and I will try to answer it as best as I can.

Git: GitHub & SSH Keys Setup

I have generated an SSH key a number of times, either at work or on my personal PC for a number of accounts. Now that I am using my Surface Book 2 as my primary development device until I get a new SSD for my desktop PC, I thought that it might be worthwhile documenting how to generate an SSH key and add it to a GitHub account.

Now if you already have an existing SSH key then you can go ahead and use that but if you have never generated an SSH key before or you may have forgotten how to then hopefully you will find this guide useful.


  1. You already have Git installed on your device.
  2. You will be using GitHub for your repositories.
  3. You are using a Windows environment.

Step 1 – Create a new SSH Key

Do not proceed with this step until you have the pre-requites met otherwise this guide will not work for you unfortunately.

  1. Open your Git Bash Terminal.
  2. Execute the following command replacing <github email address> with the email address you use for your GitHub account:
    ssh-keygen -t rsa -b 4096 -C <github email address>

    The parameters used in the above command are:
    -t rsa – the type of key to create. In this case an RSA Key.
    -b 4096 – the number of bits in the key.
    -C <github email address> – a comment or label for the key.
    For more information about the parameters that can be used click here.

  3. You will be prompted to provide a file location where to save the SSH Key. Press Enter. This will save the file in the default location. Using the default location is recommended in this case.
  4. You will be prompted to enter a secure passphrase. If you choose to provide a secure passphrase then it will secure your SSH Key, this is a recommended step.

Your SSH key should now be generated 🙂

Step 2 – Adding your new SSH Key to the ssh-agent

If you have successfully performed the step “Step 1 – Create a new SSH Key” or you already have an SSH key that you want to use then you can proceed with the following step.

  1. Open your Git Bash Terminal (if you have closed it).
  2. Execute the following command:
    eval $(ssh-agent -s)

    This will start the ssh-agent in the background.

  3. Execute the following command:
    ssh-add ~/.ssh/id_rsa

    Note: If your key is not in the file named “id_rsa” or is not in the same location then you will need to replace the value id_rsa in the command with the name of the private key file and/or the location of where the file is store. The above example is for the default name and location.

Step 3 – Adding your SSH Key to your GitHub Account

The hard work is now all done. The next part is super easy even though there are more steps.

  1. Open your Gut Bash Terminal (if you have closed it).
  2. Execute the following command:
    clip < ~/.ssh/

    This will copy the content of your public key file ready to be pasted into GitHub. It is important to not add or remove any spaces or newlines to the content.

  3. Log into GitHub.
  4. Navigate to the “Settings” page.
  5. Under “Personal Settings” select “SSH and GPG keys”.
  6. Click “New SSH key”.
  7. Add a Title to your key. In this case for me it was generated from my Surface Book 2 so I made sure that it was referenced in the Title.
  8. Paste your key in the “Key” field.
  9. Click “Add SSH key”.

You should now see a new SSH Key added to your GitHub profile.

For more information generating your SSH Key, adding your SSH Key to your GitHub account, and other SSH connection information take a look at the GitHub Help Page. I have tried to simplify the process by combining the information that was scattered across two to three pages from the GitHub Help Pages into one page. The GitHub team have done a fantastic job in documenting the entire process however and the above link should be used if my steps are not sufficient or confusing in any way.

Learning Patience From Teaching

I would consider myself a fairly calm, level headed and patient individual; never can I recall a time where I have gone off the deep end and blown a gasket. There is nothing beneficial in becoming angry, frustrated and furious at an individual or team, or questioning whether someone has really been paying attention in a demeaning fashion. I have seen first hand what happens when someone does blow up and starts angrily blaming and non-constructively criticize someone. As I worked with a variety of different individuals from a number different backgrounds, beliefs, understanding and competence, I have learnt to be patient and try to understand why and where they are coming from.

The reason why I am writing this blog post is because this weekend I was asked by my parents to construct an specific Microsoft Excel spreadsheet that can be easily modified aka “Idiot Proof” as they put it. I am not an Excel wizard or master, but I do know my way around a spreadsheet and I can do what was necessary in Excel for them. As I finished the spreadsheet and was showing them, they seemed fairly happy with the result which was good. But as I was showing them how to update and use it to meet their needs, that is when my patience was being tested. What I originally thought was going to be several minutes explaining how to use the spreadsheet turned into an hour worth of explaining.

My dad is an electrical engineer and as far back as I can remember he has used a computer. He knows how to build them and use a number of various software programs effectively. But his knowledge is limited when it comes to the Microsoft Office suite other than how to send an email in Outlook. My mum on the other hand is what you would call  unfortunately, computer illiterate. She knows the very (and I mean very) basic computer functions. Browsing the Internet (safely), and updating the computer is all she really knows how to do. Anything else would require me to either write it down in simple easy to understand steps or show her continuously until it becomes second nature. She has not used computers as much as my dad or me, so I don’t expect her computer literacy level to be as high as either of us, and that is perfectly fine. She is more than willing to learn which is fantastic.

Back to the Excel spreadsheet. It was constructed in a way that would auto-populate nearly all of the necessary cells with only a couple left to be filled in, and rows in a table would be used to auto-populate a number of other cells. I showed them once how to add a new row to a table in the spreadsheet which allowed the cells to be auto-populated. The actions and process was extremely simple. I laid it out to them in the following way:

  1. Left mouse click in the table cell to select the table.
  2. Right mouse click in the table cell to bring up the pop-up.
  3. Select Insert from the pop-up.
  4. Select Insert Row Below from the pop-up.

I really didn’t think it could get any simpler or easier. However it took them a number of times to understand that you cannot just enter values below the current row and have the necessary cells auto-populated. Knowing that for them this is fairly foreign, I needed to be patient and try to answer their questions as best as possible, in the most simplest way too. If I didn’t have the patience to explain something as simple as adding a new row to a table in Excel then it was a perfect time to learn to be more patient.

After showing them a couple of other necessary actions to perform some other tasks I asked them are there any other follow up questions they had. My parents wanted to see if they could do the whole process from start to finish by themselves with me watching to make sure the right actions were performed. The very first task was adding a new row to the table, and already like an old bad habit they just entered the values below the row and not in the table. I calmly explained to them again that they needed to add a new row to the table otherwise the value will not auto-populate. So I proceeded to show them again how to do that. Again, if I didn’t have patience or was hot headed then I most likely would have said something like “I just showed you how to add a new row to the table like 5 minutes ago, how did you forget? Or were you just not paying attention?”.

As a project technical lead and a software engineer who has been with my current company a number of years, I also provide support to any new software engineers that join our teams. Once again I get to interact with individuals ranging from software engineering interns who are still studying at university to software engineers who have been around the block. With the vast difference in experience that someone has, I need to be able to be more forgiving, understanding and patience with someone who has never rebased a Git branch or resolved merge conflicts before pushing to their origin. I get the opportunity to teach someone something new while also learn to be more patient, understanding and a better leader. It is a win win for everyone 🙂