2017 Goals

For 2017, my goals will probably be similar to 2016.

For 2016, I didn’t do quite as much traveling as I would have liked, but I did lose 15kg’s of weight and did manage to spend time with my son almost every day. I also managed not to work any overtime for the year. I completely failed at fitness and experiences though.

Once again, my goals are roughly broken up into work related stuff, personal stuff, experiences I’d like to have and things I’d like to do.


I’d like to spend more time doing meaningful things with my family.

  • Go out and do something with my wife at least once a month. Starting to add things to the calendar.
  • Spend time with my son every day: Spend at least 30 minutes every day doing something of his choosing.
  • Do something with my wife and son at least one weekend a month: Anything from going to the garden centre on a Sunday to weekends away.

Work / Career:

From a work and financial perspective, I’m pretty happy with where I am. Some good decisions, cutting expenses, negotiating a bigger raise and some circumstances outside my control has conspired to make us pretty financially comfortable.

Some goals I am actively working towards:

  • Become better known in the Android community: Present at 2-3 conferences this year (First one has been confirmed already).
  • Setting up a better workspace: I’ve started building my own keyboard, which I’m hoping will make me more comfortable.
  • Contribute to an open source project: I’m looking a a bug to fix for the WordPress mobile app. Will go from there.
  • Start figuring out a way to work remotely: Figure out a way to start towards working remotely at least a few days a week.


  • At least 1 international trip this year. We’re planning to go to Australia in April.
  • At least one trip per quarter. The first one will be to the Clarens beer fest at the end of Feb again 🙂

Self improvement:

The two main items I want to focus on is fitness and health.

  • Lose weight: I lost 15 kg in the second half of last year. I’ve been focusing on eating better, and have pretty much stopped eating refined carbs.
  • Exercise more: The first step is to go cycling once a week. No matter where, how long, how fast – To start with, I just need to leave my yard on my bike once a week.
  • Flexibility and strength: I started doing some gymnastic strength training. I need to make sure I do some training every day.
  • Make time for mindfulness and reflection: I’ve started a 5-minute journal. Next step is to start meditating


Experiences I want to still have. Some of these will be alone, some with my family and some with friends. I’m aiming for at least the first four this year.

  • Knife making / Blacksmithing. My wife bought me a voucher! I’m doing this in March
  • Beer brewing. Paid and booked all grain brewing course for next weekend
  • Learn to make Sushi.
  • Archery: Do an intro class and then probably sign up for monthly membership.
  • Rock climbing.
  • Glass blowing: Start with 4-hour taster and take it from there
  • Survival courses: Boswa offers everything from half day intro’s to weekend long extreme survival experiences
  • Scuba diving: Go on at least 1 dive this year – Hopefully in Australia.

Getting more productive in the command line

I mentioned previously that I changed my Android Studio terminal to Bash.

Since doing that, I’ve been working on making my console more productive as well.

I’ve done 3 main things:

  • Set up a gem to allow me to create pull requests from my terminal
  • Set up some aliases for Bash
  • Set up a ton of aliases for Git

Create pull requests from the terminal:

We use an Atlassian tool chain and part of our process is that everything gets peer reviewed and merged to our main branches through pull requests.

This meant that I had to leave the terminal to create a PR after I pushed code. This will not do! So it made sense to install a tool to do that from the terminal. Atlassian has a good blog post on doing that here: http://blogs.atlassian.com/2012/11/stash-pull-requests-from-the-command-line/

This was before Atlassian added default reviewers, and having to add my 6 team members every time I had to create a PR was a big part of the reason I went down this rabbit hole. So there was one more thing missing: How do I add the reviewers?

The answer ended up being a function in my Bash config:

This allows me to create a pull request to origin/develop with myself as a reviewer by simply typing: pr develop

Bash setup:

Other than the pr() function in my bash config, I also alias ‘git’ to ‘g’. It might seem a bit silly, but I type git a lot, and I hate typing… It looks like this:

So, the alias bit is obvious. The rest is there so that you can still auto-complete branch names and git commands on ‘tab’.

I keep my config in a gist at: https://gist.github.com/riaancornelius/90cb54157bb4ec8d5b6c18dbe9f418f2

Git aliases:

I keep a copy of my git config here: https://gist.github.com/riaancornelius/fb541aaeef24c851b20682db1b578a3f

This has been built up from contributions by co-workers, podcast hosts and various random things I found on the internet.

Bonus: Install Cmder

When I’m not in the IDE, my terminal of choice is Cmder

Android Studio – Don’t clear logs after app crash

In Android Studio, the default setting for the Logcat window seems to be “Show only selected Application” (top right corner of the Logcat window)… which is looking at the log of the selected process (your current launch by default). So when your app crashes during testing, that process is gone, so the filter clears the log.

Instead, select “Edit Filter Configuration…” and set up a filter for your app, eg:

  • FilterName: MyApp
  • PackageName: com.example.myapp (<< replace with your app’s package name)

…and then select that filter for future runs. This should keep the log there for you, even after the app crashes.

Android Studio – Set up a custom terminal

In my endless quest to make it unnecessary to leave the IDE, I figured it would make sense to use Git bash as my terminal in Android Studio rather than the default cmd.exe on Windows.

Turns out this is really simple.

1. Open your settings in Android Studio (CTRL-ALT-S) and type ‘terminal’ to find the correct settings.

2. Change the Shell path to Git bash. In my case it was ‘C:\Program Files (x86)\Git\bin\sh.exe –login -i‘. I just  copied this from the start menu shortcut’s properties.

Android Studio Terminal Setup

3. Restart your IDE.

4. Profit. You can bring up the terminal window with ALT-F12, so no need to use the mouse.

Android Studio TerminalOptionally, you can change the console colors in Editor > Colors & Fonts > Console Colors. Just remember to restart your IDE if you change them. If you are on the Darcula theme this is not necessary – everything just works.


Visualising your code as a city

I was looking at visualising some code recently and came across CodeCity. It’s somewhat useful and quite interesting, but getting it to work is not as simple as it once was…

This is because CodeCity uses the Famix 2.1 model to visualise your code, and very few of the tools referenced on the CodeCity website and most other blog posts are still available.

I did however find this useful blog post that highlights one tool still available: Analyzing a Java Codebase with CodeCity in 2016

Essentially, you need to download CodeCity and iPlasma.

iPlasma ScreenshotThen you use iPlasma’s Swing interface to import your codebase and then generate a Famix model of your code (This takes a while). After all this you end up with a rather strange looking screen from where you can run the “Moose MSE exporter” tool.

This finally gives you a Famix 2.1 model which you can import into CodeCity and (after some more waiting) generate a city visualising your code.

I found that this works fairly well, however some of my classes seems to be missing from the visualisation (Some big god objects), and I haven’t been able to figure out why yet.

Still, it’s an interesting way to look at your code. It also let’s you generate visualisations of multiple versions of your code and show you how the “city” evolved.