I’ve been using GraphQL in some form or another for a couple of years now, and I have… opinions about it. Opinions notwithstanding, it’s a supremely flexible and powerful tool, and I just want to highlight something here that it seems quite a few people don’t know about. That something is Directives , which is a way of optionally including fields. But why is this useful?…
I Threaded - made a thread? Posted? Tweeted (can we use that again now)? Whatever - about this earlier but I thought I’d elaborate a little. You do use feature flags, right? You should. If you work with trunk-based development , like everyone does now, you must use feature flags to hide upcoming features. Side note: this is why release notes are so boring now, because features aren’t…
Featured in jetc.dev . What, praytell, has caused me, nearly two years after I said I would, to finish this blog series? Could the single day of sunlight we had yesterday have triggered something in my Canadian winter-addled brain? Perhaps. A second theory: I’ve done a lot of interviewing recently, and I’ve had to talk a lot about projects - what went well, what went not so well, and…
Based on a recent discussion on Twitter: a list of things that you can do in Android Studio which can make your life much easier. Hide files you don’t care about If you work in a project with lots of generated code (e.g.: you use Dagger), you can exclude generated files from searches using Scopes: Preferences -> Appearance & Behaviour -> Scopes -> + -> local -> Use whatever pattern you need,…
In case you weren’t already aware, the market right now for software engineers is super hot - it’s crazy out there. A combination of the entire world moving online, people burning out of their jobs and a chronic shortage of experienced software engineers means there’s never been a better time to see what’s on offer. If you want fully remote, better pay and a title change,…
Recently I ran into a fairly niche configuration problem with MockWebServer , where I needed to be able to connect to the server via https . What follows is some notes on the problem and the solution we used - hopefully somebody else finds this information useful and I’m sure there are other solutions which would have worked just as well. Context Over the last few weeks, one of the things…
Some of you may have seen that on Thursday, I had a bad day. In the grand scheme of things it wasn’t that bad a day; it actually turned out pretty well. But what follows is a post mortem on how I accidentally pinged every Android customer in production, and a little bit of advice so that it doesn’t happen to you. Background Marketing wanted both Android and iOS to integrate a CRM…
Featured in Kotlin Weekly #240 Dagger is typically my DI framework of choice for large projects ( insert controversy here ) and while most people are familiar with the basic concepts, some aspects immediately cause internal panic when mentioned. Multibindings is one of them, which is a shame because it’s a highly useful pattern which can solve real problems. There’s two different types…
Here’s a non-comprehensive list of talks/appearances that I’ve made in the last few years: 28 Oct 2021 Watch the live #AskAndroid for Compose with Material You at Android Dev Summit 2021, hosted by Google Developer Expert Adam Bennett. Adam is joined by Connie Shi, Clara Bayarri, Leland Richardson, and Nick Rout. 18 Mar 2021 Get ready for a deep dive into Jetpack Compose! Tonight we…
Featured in jetc.dev . Welcome back to the third article in my series about migrating design systems to Jetpack Compose, where I talk about our experiences at Cuvva and how you can apply what we learnt to your team. In part one , I talked about planning ahead, modularisation and getting your team onboard. In part two , I talked about custom theming, about building ontop of existing APIs, how to…
Welcome back to the second article in my series about migrating design systems to Jetpack Compose, where I talk about our experiences at Cuvva and how you can apply what we learnt to your team. In part one , I talked about planning ahead, modularisation and getting your team onboard. In part two, I’ll talk about custom theming, about building ontop of existing APIs, how to minimise risk from…
Featured in jetc.dev . A few weeks ago, I gave a talk at the Mobile Notts meetup where I spoke about how we at Cuvva are migrating our design system to Jetpack Compose, what we learnt and how you can do the same. It was a fun talk which touched on a lot of content, and I’ve had quite a few people ask about a video. Sadly there isn’t one (although I may give the talk again), but…
Featured in jetc.dev . At Cuvva , we’ve been playing with Jetpack Compose for a few months and we’ve just recently started porting across our design system. This has lead us to think a lot about design systems in general - how can we streamline the process? How can we ensure that it’s always up to date? We discussed a couple of different solutions, and the most likely one that…
Way back in the early-ish days of Android we used the support libraries, android.support , to backport certain features to different API levels. These days those libraries have been replaced by the AndroidX packages, announced at I/O 2018 - but their legacy lives on and many of the dependencies that your app consume may still depend on these android.support packages. Unfortunately, these two…
Recently I’ve come to really appreciate the kotlin-result library as we’ve integrated it more and more deeply into the Cuvva Android stack. In this post, I’ll explain why we needed it, how it works and what problems it solves, and show some examples of how we use it at the end. A great many people have tried and failed to explain what a monad is, and this is my attempt at being…
Featured in Fragmented and jetc.dev . One of the best books I’ve bought in the last few years is the Game Engine Black Book: Doom by Fabien Sanglard. As someone who grew up on games but has never really thought about how they’re made, it’s been a fascinating book to dip in and out of, and there’s some great bits of innovation detailed inside. There’s an axiom about…
Google has finally released the new Activity Result APIs , which are something I’ve been looking forward to for a very long time. In this post I’ll run through the basics, how you can create your own contracts, and how this allows us to abstract away even more responsibilities from your UI. The basics As I’m sure you’re aware, when you want to request data from another…
As we’ve started locking down our architecture at Cuvva we reached a point where every new feature required very similar boilerplate, and building all of this by hand was getting tedious. The obvious solution here was to create file templates using Android Studio. I won’t go into much detail as to how these are made (there’s some good resources available for this already), but I…
This article is also now deprecated, but I’m keeping it up for posterity. This article was a quick demo and explore of the Jetpack Compose library, with the binaries being fetched from the then-newly discovered Maven links. Whilst it technically compiles and renders the Views, it’s broken in subtle ways (such as observing @Models , which is half the point of Compose). Since then,…
How often has this happened to you? Some new library comes out and you want to try it, you have some kind of brilliant idea to solve a particular problem, or you’ve needed to build an example app for a new job you’re applying for. So you boot up Android Studio, hit New project , skip through the steps and then you’re presented with a new playground to work in. Amazing! But…
For those keeping track of the latest trends in view architecture patterns, MVI, aka Redux, has seemingly become the latest and greatest for Android Development. There’s tonnes of things to love about MVI - but what are the downsides, and what should you know going into it? For the sake of this article, I’m basing my thoughts on an adaptation of MVI which I’ve used for a while…
Often in software design you may wish that a particular class had more functionality than it currently offers, or that you could tweak its behaviour slightly. In this contrived example, we’re going to add some logging to an existing class, but we’ve decided not to do it in the target class directly. There can be a few reasons for this: You simply may not want to edit that class.…
Domain setup First thing’s first - go buy your domain on domains.google.com . They’re only £10 a year, but if I remember correctly there’s a £120 initial fee. Your mileage may vary depending on the popularity of your domain name. The process is pretty user friendly, even for a web noob like myself. Once you’ve got your domain name, you’ll want to sort out some kind of…
Hi. I’m Adam, and I’m a Senior Android Engineer at Reddit and until recently a Google Developer Expert for Android. In my day-to-day I lead teams working on moderation tools. Previously, I was working at Twitter, where I helped provide guidance and technical leadership on the Spaces team. Eventually I moved to the Home Timeline, where I worked on DevEx, performance and modularisation.…
This is a rehost of the article I wrote for the Blockchain Engineering blog . You can find the original article here . At Blockchain, we have many mobile users in bandwidth constrained environments such as developing countries. As such keeping the app small and lightweight is a priority for the Android team. Smaller app sizes increase both installs and conversion rates - important metrics for any…
In the lead-up to Google IO 2018 and after peering into the Android P Alpha release, some people noticed a mysterious new “Slices” class within the P SDK docs. There was a lot of speculation as to what Slices actually did, and Sebastiano Poggi at Novoda did a great deep-dive into what was known at the time. But now that IO has passed, what have we learned about Slices, how can we…
So this is a pretty nerdy blog and should be a quick one, but I just wanted to share my findings. As you may know, accessing private methods or fields in Java from nested or anonymous inner classes results in the creation of synthetic accessor methods . Jake Wharton’s talk on Java’s hidden costs is worth a watch here if you have no idea what I’m talking about. These synthetic accessors are…
Everybody likes to think they output good quality code, but how do you ensure that whilst making sure that your team members are on the same page? Here’s a few techniques that I’ve used over the years. This blog is mostly aimed at team leads or seniors working with 3+ people, but some may tips be useful for single contributor/OSS projects. Formatting & Consistency Personally, I’m super pedantic…
About a week ago, someone on /r/androiddev asked the question “What are the things that every Junior Android Developer should know?” . Being the kind of guy that I am, I was browsing the subreddit at work (whilst compiling , obviously) and got an answer in early which people seemed to like a lot. So this is mostly just me expanding on my points. Skillset If you’re looking to come onboard as a…