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 🙂

Android Wear Are You?

Is it just me or has every smartwatch that doesn’t run watchOS become vaporwear? I feel like if you want to buy a smartwatch then you will most likely have to settle for the Apple Watch or a smartwatch that really isn’t “supported” by Google. By supported I mean that they are featured on the official Android Wear web page and will be getting continual OS updates from Google.

When the start of the current smartwatch craze occurred I really wanted a smartwatch too. It wasn’t for the style or visual appeal but the convenience of not having to actually have your smartphone in the same room as you to respond to a new message, or even check the time (like a standard watch). Right now I generally carry my smartphone with me and leave it on the table whichever room I am in. Recently I started to get the itch to get a smartwatch but when I saw what was on offer I was a little disappointed. There was nothing on the market that I could find that was easy for me to purchase or supported by Google. Living in Australia has not made getting a smartwatch very easy it would seem.

Going to the official Android Wear website and examining the different Android smartwatches that are available was flat out disappointing. Not only was the selection fairly poor but actually getting a hold of one of the smartwatches through the officially supported stores was near impossible. Starting with the LG Android Wear smartwatches, none appear to be available to purchase in Australia. I continually get routed to the US website and when I change to Australia and check for availability it shows “coming soon”, even though these smartwatches have been out for some time. The three other Android Wear smartwatches (Zenwatch 2, Huawei Watch and Moto 360 2) all are supposed to be available through the Harvey Norman store. But when you click the link to examine the item all you get is a “Page Not Found” page. Google appears to not have abandoned the Android Wear platform entirely either. Android Police appears to have obtained information about Android Wear smartwatches that will be getting Oreo updates and/or already have the latest version of Android (see here). But why are these smartwatches not displayed on the Android Wear webpage?

Microsoft is also out of the smartwatch market as of 2016. They stopped producing more Microsoft Band 2 devices and unfortunately had no plans to release a Microsoft Band 3 according to this article from The Verge. Unlike the traditional smartwatches the Microsoft Band was closer to a fitness band with its emphasis on health and fitness monitoring. With Cortana integration it was super appealing to me as that is my primary AI assistance, even on my Nokia 8 (running Android Oero), Cortana has replaced Google Now/Assistant. Maybe Microsoft will return back to the smartwatch market, but with them also pulling out of the smartphone hardware market I doubt it very much. If (and this is a big if) they release a Surface Phone or Surface Watch then I will most likely be picking them up. I have never had any major issues with any of the Surface products that I have purchased, even the Surface RT. But nothing Microsoft has said, shown, or even hinted at has indicated a new smartwatch from them.

Do I really need a smartwatch? Not really. Would it be a nice to have? Absolutely. I have a couple of really nice standard watches. Some have leather bands, some have metal bands. None are “smart” and none do anything more than show me the time and date. For now this will have to do. I will be taking a look at various online stores to see what I can get here in Australia, but right now the Android Wear future does not look as bright as it once was.

Returning to C and C++

Since the start of my third year of my Computer Science degree I have not really done much C or C++ programming. My primary programming language at the moment is Java and on the side I am doing some C# work. C++ was the very first programming language that I learnt by myself and during my bachelor’s degree it was the first language along with C that I was taught. There is some stuff that I really like and there is some stuff *cough* pointers *cough* that really annoy me.

With a fairly new laptop (my Surface Book 2), I thought it might be worthwhile to get back into some C and C++ programming. Java and C# are great programming languages but sometimes it is good to go back to your roots and program in a language that is significantly more low level. The attention to detail and level of understanding is significantly higher in C and C++, than Java and C#. If I ever start to feel lazy while programming in Java or C# I think back to how difficult it was to implement some things in C or C++.

I have Visual Studio 2017 installed on my Surface Book 2, but what I really want to do in C and C++ does not require the overhead for the projects that come with using Visual Studio. So instead I am going to use Cygwin (gcc and g++) instead. If you want to use Visual Studio then that is fine but to help others I am going to go into detail about setting up Cygwin so that you can run the gcc and g++ commands to compile and build your C and C++ programs.


Just like on the Cygwin web page “Get that Linux feeling – on Windows“, installing, configuring and using Cygwin is super easy. You can download the 32 or b4 bit versions of Cygwin at the following location. I am going to go over the installation and customization so that you can easily compile and build your C and C++ applications.

Installation Wizard

Once you have downloaded the relevant executable for your OS, run your executable. You should be presented with an installation wizard. Just follow the installation wizard. I used the default settings for the installation. I didn’t change anything and I suggest that you don’t either unless there is a specific reason to. All the paths and command line information presented below assumes the default information.

Note: When you are presented with the following screen on the installation wizard, ignore selecting any package and just press the Next > button. We will be using command prompt to get the necessary gcc and g++ packages.

Cygwin Installation Wizard Select Packages

Continue with the installation wizard and let the dependency download commence. Depending on your download speeds it may take some time to download all the necessary dependencies.

Package Installation

Now one of the very most important components for getting a compiler working outside of using an IDE like Visual Studio is making sure that you have the necessary packages. Open Command Prompt and enter the following in the command line:

setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel

Note: The location of the executable was placed in my Download folder and the command was executed from that directory after I navigated to it.

After you have executed the command, the Cygwin setup should relaunch and it should proceed with the download and installation of the packages that were listed in the command line.


That is it 🙂

The compiler is installed and you can verify this by launching the Cygwin Terminal and entering in the command:

gcc --version


g++ --version

You should see the following displayed on the terminal. The versions of the compilers may be different depending when you install Cygwin and/or if you manually update to an even later version of the compiler (this has not been done here).

Cygwin Terminal Compi;er Versions

To test the compiler out (I’ll be testing the C++ compiler here) we can create a very simple C++ application and use the g++ compiler. The very first C++ program that I ever wrote was a simple Hello World program. What better way to test the installation of the g++ compiler than to use that simple C++ program. Below is the sample code in case you want to start learning C++ and/or you just want to quickly test your compiler but not actually write any code yourself.

#include <iostream>

using namespace std;

int main() {
    cout << "Hello World!" << endl;
    return 0;

Save the above code as HelloWorld.cpp or use your own piece of C++ code and place it in the location of your Cygwin home user directory. By default it should be under C drive, ie. C:\cygwin64\home\<username>.

To compile the C++ code all you need to do is run the following command in the Cygwin Terminal:

g++ HelloWorld.cpp -o HelloWorld

What this will do is create an executable that is called “HelloWorld.exe” that you can then run from either the terminal or straight from the Windows Explorer. If you run the above piece of code in the Cygwin Terminal then the output should match exactly what is shown below; note that the program is waiting on user input before it terminates.

Cpp HelloWorld Terminal Compile And Run

There you go. You now have a Linux like C and C++ compiler installed on Windows and you do not need to have an IDE to compile and build your C or C++ projects. Hopefully this little guide and my desire to go back to C/C++ has fueled your own fire. Enjoy!

Obsessively Learning For The Better

Ever since I could remember I always loved to learn and help others. Be it to learn how things work, why something was designed a specific way, and/or what made this thing function the way it did. All of those questions fuelled my curiosity and passion to learn, to understand, and to help others understand or solve their problem. There is something satisfying about knowing how things work, why they work, and being able to answer people’s questions with an appropriate answer. Plenty of people are not too concerned about the how and why, and are just happy that it works; this is absolutely fine as well. For me however, the more I understand something the more I can leverage it to my advantage getting the absolute most out of it. This is probably another reason why I became a Software Engineer and continued to study after my Bachelor degree to obtain a Master degree.

I encountered a small technical issue yesterday and was browsing Stack Overflow to see how others resolved their problem and what the exact root cause was. There was a perfect answer to the issue with a equally perfect explanation as to why it was failing and how the fix solves the issue. Sometimes when I see the answers to questions on Stack Overflow there is just an answer with little to no explanation as to why it fixes the issue. These answers I feel are not that great because really you don’t learn and understand how to fix the problem, you just use a solution without understanding the problem properly. You don’t learn anything. If I do encounter just an answer to the problem I try to read up further as to why this solution works. In the long run being able to understand the problem completely and how the solution fixes it is far more beneficial.

On a daily basis I try to learn something new, be it a new functionality that I didn’t know in Java, C++ or C# had or how to use my body to ensure that I can easily incapacitate an attacker with minimal effort using BJJ. By me constantly learning something new every day I can better myself which in turn I can try and assist others to better themselves or provide a solution to a problem they have encountered. This desire to learn has helped me in my career so far as a Software Engineer, as you need to constantly develop your skills and research new and upcoming technological trends to stay relevant. It is a challenge to try and better yourself day in and day out, but when you go to bed at night and you think about what you have learnt that day or how you have helped someone, it makes going to sleep that much easier.