More Kotlin Features to Love

Constants are important One of the things that I’ve come to appreciate more and more as a programmer are constants. Before I would have yawned and said big deal why? Now I’d say they are so important as they prevent so many needless bugs. If we are guaranteed that something is not null then we can focus simply on getting …

Debugging with Jack

Overriding Variable Contents in the Debugger Debugging is always a very important feature of an IDE. One useful tip that I don’t hear much about while debugging is being able to change the contents of a variable in the middle of debugging session. If the debugger is halted on a line you simply need to execute the Evaluate Expression Command(⌥+F8). …

Love for Kotlin

I spent a fair amount of time learning how annotation processors work. I made a sample library called ascent on github for injecting custom fonts into fields. It was a great way to learn. The benefit of annotation processors is boilerplate destruction. I’ve always disliked having to write code over and over again, one example of that is converting values …

Why I Love Zeplin

One of my favorite apps is Zeplin. If you haven’t heard of it before, it’s an amazing desktop app that helps you build pixel perfect mobile apps. To understand why it’s amazing let’s look at a typical workflow for coding up a design. Back when I first started android development the development flow was the following:

Patch Nine Not at Compile Time

If you aren’t familiar patch nines are really cool png files that have defined stretch areas as well as padding areas. I had experimented before and found that it was possible to generate patch nines at runtime in android. I posted some sample code on stack overflow here.

Book Review: 100 Android Interview Questions

I’m finally getting around to reading through this book that one of my colleagues wrote. I do like a good portion of the questions. I was a little disappointed that the questions weren’t all android specific(some that were Java specific). Overall I think this is a good set of questions to use as the basis for either preparing for an …

Manually Edit Git Hunks to Stage

One of my favorite features of git is the ability to commit partial changes to a file. Sometimes this is super easy as the changes I want to commit may not be near other changes I don’t want staged. Other times if the changes are too close to each other git has no idea what to do and it fails. …

Reformat Code in Android Studio

Quick Android Tip of the Day. Ever open a source file in android studio and realize that the code isn’t properly formatted? 3 Keystrokes is all that is needed to fix that. This works in XML files too not just Java and Kotlin. Auto Format Code Hot Key Mac: ⌘ + ⌥ + L or Command + Option + L …

No Ternary Operator :(

While programming with kotlin I wanted to use the ternary operator something like the following condition ? true_result : false_result. I couldn’t find it anywhere in the documentation, I went to the github repo and took a look to see if I could find the grammar for kotlin. Sure enough they have an expressions file. I took a look and …

Two movies I loved this year

I watched the Woman in Gold this weekend. I loved this movie, don’t worry there will be no spoilers. Actually I lied there will be spoilers but you will have to highlight the text to see them. The movie is based on a true story of a woman trying to reclaim a portrait of her aunt that the Austrian government …