Your Privilege is Showing

21 Jan 2020 | tags: musings

When I left the Philippines five years ago, I had a high-paying job at the heart of the country’s financial district. I was living a very comfortable life: I can afford an annual membership to a yoga studio, I bought an off-the-plan apartment with views of Manila Bay, I get to treat my parents to a holiday once in a while, I get to travel with my friends – we were even able to go abroad a couple of times!

When I left the Philippines, I was getting paid an annual salary of PHP1.7M. That may sound a lot, but in Australian Dollars that is only 48k – slightly above the minimum wage set by the Fair Work Commission, and way less than what a junior developer would earn.

But the thing is, that IS a lot of money. Chances are a lot of people outside tech might work all their life and never get to that salary range at all. I am indeed extremely luckier and more privileged than other people in my home country.

With all that money, it was still a challenge to do one thing I would have loved to do more of when I was younger – to travel. I’ve always read books and seen shows where teenagers go to exotic places, or heartbroken lovers go to the airport and buy tickets to “anywhere”, or people doing the whole Eat Pray Love thing.

You see, I had the unfortunate case of being born in the Philippines to parents who were also born in the Philippines. Outside of traveling outside Southeast Asia, having a Philippine passport is like traveling in super hard mode:

And that’s just going to ONE country. At some point in the past I swore that I am going on a Europe tour on my 40th birthday. That would mean applying for a Schengen visa; which means I need a full itinerary planned out; which means I have to prepay ALL hotels and transportation to all the countries I want to visit; which does not guarantee me being granted a visa at all. It takes a lot of physical and emotional energy getting all these requirements together, not to mention the monetary investment when applying for a visa (for Schengen, non-refundable fee of ~PHP4,000 – equivalent to a month’s rent). I checked the requirements again when I got my Australian passport, and guess what, I can apply online and then I basically just show up? Whut.

Look, the requirements I showed in that tweet is NOT unique to the UK. Almost all countries have the same requirements for Filipinos. Even when I got my work permit in Australia, I have to provide almost the same exact requirements if I want to go to New Zealand (and now that I am an Australian citizen I can just show up there? Like… It’s still me??).

Don’t even get me started on how I get treated when I land in the country I’m visiting. Some questions I have been asked by immigration:

I’ve traveled twice so far on my Australian passport and I have to say I have received the warmest welcome I have experienced ever. :woman_shrugging:

Anyway, what I am trying to say is that the past couple of days suck because of something I keep on seeing on Twitter. People have been posting all the countries they have been to, and all the others on their bucket list.

I guess sometimes it’s easy to lose sight of how things we take for granted are just faraway dreams for some. When I started traveling internationally, I couldn’t have imagined the amount of suffering and humiliation that I had to go through just to get visas. I have lost count of how many times I have been looked down upon because of the country I was born in, or the passport I am holding. I know that there are SO MANY people out there who have the same aspirations and the same bucket lists as those we see in the meme but have resigned themselves to the fact that it will just be that – a bucket list.

I recognise that as it is, I am much much luckier and more privileged than most. I was given the chance to set myself up for success, I have a supportive family behind me, and I have been given so many opportunities to pull myself up. I am not discounting the fact that those people have worked hard to be where they are, and I am sure they deserve all the fun and enjoyment that they are having.

All I hope for is that we all do not forget how extremely valuable freedom of movement is, and how liberating it must be to have the means to enjoy that freedom.


Which is Which: Named Breakpoints

15 Jan 2020 | tags: android studio tools

I have always believed that one of the biggest factors that influence a person’s enjoyment and delight in doing their job are the tools. Having the right tools and using them the best way possible helps direct our energy on the what rather than the how.

It is for this reason that I have written and spoken about making the most out of Android Studio a few times over the past few years.

For instance, I have lost count of how many times I stopped in the middle of a debugging session only to find myself drowning in breakpoints. I have put in so many that I have lost track of which breakpoint does what, or why I even put a breakpoint on a particular line in the first place.


What are even these lines

It is situations like this that breakpoint descriptions become super handy. These descriptions appear after the line number and provide an easy way of keeping track AND searching for breakpoints.

For example, adding “drag dismiss” after the breakpoint on line 84 serves as a short note to myself what that piece of code is doing. It gives me a hint about what I may want to do with that breakpoint when I’m grouping, muting, cleaning up, or managing all the other breakpoints.


Breakpoint with a description

To add a description, open the Breakpoints Dialog.

First open the Edit Breakpoint dialog using any of the following:


Edit Breakpoint dialog

We can then click on More or press SHIFT+COMMAND+F8 to open the Breakpoints Dialog. Right click on the breakpoint in question and choose Edit Description:


Adding a description

This is admittedly an over-simplified example (in my main project I have so many breakpoints accumulated over so many debugging sessions and I’m afraid to remove any of them. Don’t @ me.), but finding a specific breakpoint is now easy as!


Search through all breakpoints easily

Scratch That Itch

21 Nov 2019 | tags: android studio tools

One of the most useful things for me whilst I was learning Kotlin was TryKotlin. It gave me a quick way to test concepts, try new APIs, or just to get familiar with the syntax.

Sometimes though I want to see if something would work with my own data classes, and it’s a bit too much trying to cram them all into that page. Other times I don’t want to use my own app either, cause that means adding logs or TextViews then recompiling and rerunning the whole app just to see if something would work as I expect it to.

It is during these times that scratch files really come in handy. Scratch files are super lightweight, runnable, and debuggable files.

Creating scratch files

To create a new scratch file, press ⌘ + SHIFT + N (or File > New > Scratch File). There are a whole bunch of file types available, including Kotlin, Java, and JSON.


Some of the available file types

Since scratch files are fully functional, make sure to choose the correct file type so you get syntax highlighting, auto-completion, and all the other file type-specific features of IntelliJ.

:information_desk_person: When choosing Java, IntelliJ automatically creates the main() function for you; when choosing Kotlin, there is no need to declare a main function – everything in the file is executed as if they are inside main().

Locating scratch files

You can access all of your scratch files inside Project > Scratches and Consoles > Scratches.

:information_desk_person: Open Project View by default in Android Studio by going to Help > Edit Custom Properties and adding studio.projectview=true.


All of the scratches

The first file of any particular type is named scratch by default, and any subsequent ones have an increasing integer attached to it.

Scratches are not attached to any one project, which means that we can try something out in project and have that scratch file viewable in other projects as well!

Using scratch files

You can use and navigate around scratch files the same way you would any other file in Android Studio.

When you’re ready to run your file, click on the green play button on the upper left of the editor. The output of the scratch would be displayed on the right hand side of the screen.


Output of scratch file

For added fun, enabling Interactive Mode runs your code automatically when you stop typing!

If we are logging too much text and it won’t fit the side panel, Android Studio would automatically open the Scratch Output panel.


That's a lot of text

Accessing Your Own Stuff

Let’s say I want to play around with the User data class in the about module of Plaid. With scratch files, we do not have to copy-paste the data class.

To access this existing class, we need to import them into the file like normal. And since scratch files are fully functional, auto-import is supported too!


:heart_eyes:

Make sure to choose the correct option in the “Use classpath of module” dropdown before running your scratch file. Remember that if the underlying source code changes, the scratch files pick up those changes too (as soon as you rebuild the module that is!)!


You can read more about scratch files here and here. Get scratching! :dash: