-
How to Abuse Kotlin Extension Functions
2017-05-26
I’ve got a “sweet tooth,” which, in my case, is just a euphemism for me saying that I’m addicted to sugar. I’m young now, but I know that this addiction won’t end well once my metabolism slows down, so I try go to the gym. Unfortunately, when I leave the gym, I often think to myself, “I just worked out, so I can snag that Oreo McFlurry I’ve been craving all day.…
-
Not Needing Dagger is a Code Smell (Pt. 1)
2017-05-12
A code smell is a surface indication that usually corresponds to a deeper problem in the system…smells don’t always indicate a problem…You have to look deeper to see if there is an underlying problem there. –Martin Fowler Some people don’t think Dagger is very useful. I’m a bit suspicious of these people. An application that doesn’t need Dagger smells. It suggests that there might be something wrong with the application’s architecture.…
-
Setting up a Jenkins Pipeline for Android Testing
2017-04-28
Some tests are fast. You can run 1000s of them in seconds. These are the tests that are the heart and soul of TDD, so you run them every chance you get. There are other tests that aren’t so fast. Because they’re slow, you don’t want to run them often. You’ve got better things to do than to sit and wait for test results to come through. Unfortunately, the less you run your slow tests, the less valuable they are.…
-
Android Testing Calisthenics: Domain Objects
2017-04-14
Imagine that you’ve never run a single mile in your life. You know that exercising is good for your health, so you decide that you’re going to take up running. Strangely, however, you also decide that you’re going to begin your journey towards physical fitness by running a marathon tomorrow. That’s obviously a bad idea. Less obviously, deciding to go from no experience with testing to writing tests for an already existing Android app is also a bad idea.…
-
Test Driving away Coupling in Activities
2017-04-09
Activitys and Fragments, perhaps by some strange historical accidents, have been seen as the optimal building blocks upon which we can build our Android applications for much of the time that Android has been around. Let’s call this idea – the idea that Activitys and Fragments are the best building blocks for our apps – “android-centric” architecture. This series of posts is about the connection between the testability of android-centric architecture and the other problems that are now leading Android developers to reject it; it’s about how our unit tests are trying to tell us that Activitys and Fragments – like the cracking bricks in the above image – don’t make the best building blocks for our apps because they tempt us to write code with tight coupling and low cohesion.…
-
Why Cryptography?
2017-03-25
We as engineers somewhere have a level somewhere where everything beneath that is a black box… Jake Wharton, Fragmented Episode 7, 1:12:00 For a while now, anything security or crypto related on Android has been a black box for me. For example, when I read the docs on Android’s KeyStore class or hear about Android’s Fingerprint authentication functionality on Fragmented, I often feel like I’m just barely understanding what’s being said.…
-
Why Im Skeptical about Kotlin Coroutines for Android Development
2017-03-19
A few weeks ago, the folks working on Kotlin announced the 1.1 release. Kotlin’s 1.1 release has experiment support for coroutines. Here’s the elevator pitch for coroutines from their blog post announcing the release: Asynchronous programming is taking over the world, and the only thing that is holding us back is that non-blocking code adds considerable complexity to our systems. Kotlin now offers means to tame this complexity by making coroutines first-class citizens in the language through the single primitive: suspending functions.…
-
What Unit Tests are Trying to Tell us About Activities Pt 2
2017-03-10
Activitys and Fragments, perhaps by some strange historical accidents, have been seen as the optimal building blocks upon which we can build our Android applications for much of the time that Android has been around. Let’s call this idea – the idea that Activitys and Fragments are the best building blocks for our apps – “android-centric” architecture. This series of posts is about the connection between the testability of android-centric architecture and the other problems that are now leading Android developers to reject it; it’s about how our unit tests are trying to tell us that Activitys and Fragments don’t make the best building blocks for our apps because they force us to write code with tight coupling and low cohesion.…
-
Some Resources for Learning how to Test Android Apps
2017-03-03
Someone recently asked me how I “know so much” about testing android apps. After disabusing them of the notion that I know a lot about testing, I said that I’d write up a blog post of some helpful resources I’ve found and send it to them. This is that blog post. The resources are divided into books, articles, talks, and podcasts. I’ve marked resources that I think are essential with a “*”.…
-
What Unit Tests are Trying to Tell us about Activities: Pt. 1
2017-02-25
Activitys and Fragments, perhaps by some strange historical accidents, have been seen as the optimal building blocks upon which we can build our Android applications for much of the time that Android has been around. Let’s call this idea – the idea that Activitys and Fragments are the best building blocks for our apps – “android-centric” architecture. This series of posts is about the connection between the testability of android-centric architecture and the other problems that are now leading Android developers to reject it; it’s about how our unit tests are trying to tell us that Activitys and Fragments don’t make the best building blocks for our apps because they force us to write code with tight coupling and low cohesion.…