-
Maybe Don't Inject That
2019-10-03
I’m actually always suspicious when I’m writing up a pattern or a technique if I can’t talk about reasons when you shouldn’t use and trade-offs against it. If I can’t find arguments against it, then I’m worrying that I’m not really analyzing things properly. –Martin Fowler, “Is TDD Dead?”, 35:00 DI is useful. It’s great. It makes your code more flexible, testable, etc. Dagger? Also useful. Great. My favorite DI library.…
-
Maybe Don't Write That Test
2019-09-19
Testing seems to be like going to gym. Everyone feels like “yeah. I should be testing. I should be going to the gym everyday.” Koushik Goupal, Fragmented, “Episode 13,” 12:01 Remember those gimmicky fitness products that made you think you could “get fit” without actually going to the gym/dieting/etc? Because I live in Orlando and have seen the Carousel of Progress at the Magic Kingdom a bunch of times, the first example of this kind of gimmicky product that comes to mind is a thing called an “exercise belt.…
-
Patterns Principles and Tools for Testing Your React (Native) Apps
2018-05-18
Here’s a written version of my recent React Orlando talk: I want to talk about some patterns, principles, and tools for testing react native applications. I’m going to focus a lot on the “patterns and principles” part of the testing equation because, as we all know, the improper use of tools can actually be worse than not having those tools at all. Michael Scott’s misuse of the fork-lift in Daryl’s warehouse came to mind while I was pondering this truth, and it turns out there’s a gif of this exact moment in the show.…
-
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.…
-
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.…
-
Towards Godless Android Development: How and Why I Kill God Objects
2017-02-18
Korean Translation by Jihyok KIM God is dead…and also Context is dead. –Friedrich Nietszche (probably) Godlessness in the context of OO-programming – unlike godlessness in a broader context – is uncontroversially a good thing. Some may want gods in school or gods in government, but – all other things being equal – no one really wants gods in their programs. In android development specifically, we have a god that we all know and love to hate: Context.…