@hsaini.bsky.social

Are you terrified about your #Android app getting compromised through a build supply chain attack? (you likely should be!) I wrote a post on how to enable signature verification of your Gradle dependencies to make that a lot harder for the threat actors www.liutikas.net/2024/12/12/T... #gradle

Trust But Verify - Enabling Gradle Signature Verification for An Android Project

In my post on Gradle Security Considerations I suggested enabling Gradle dependency signature verification. It is an important practice given today’s landsca...

liutikas.net

Let's look at Bluesky performance on Android! I managed to build a release build of the app and ran some traces, let's see what we can find... I have ~hour, will add to this thread as I investigate

Did you know that the "strong skipping mode" in #jetpackcompose can make your applications more efficient? 🚀 With the arrival of 1.7.0, strong skipping mode has become the standard, bringing significant improvements in handling recompositions. What does this change really mean for us as developers?

Bild

Pretty incredible how Bluesky does two things no other major social network does: 1. Show content from people you follow 2. Don’t deprioritize posts with links The “incredible” part is how ads-driven social networks & ones optimizing for “engagement” stopped doing either.

Rose 🌹@rose.bsky.team · 2y ago

We want Bluesky to be a great home for journalists, publishers, and creators. Unlike other platforms, we don't de-promote your links. Post all the links you want — Bluesky is a lobby to the open web.

Benchmarking is hard! This is a great example, let's dive into the diff to highlight what I'd typically surface if someone shared this benchmark at Square. The diff: github.com/android/nowi... (it's great that Arnaud shared the diff btw, too often benchmark authors don't) #AndroidDev

Arnaud Giuliani@arnogiu.bsky.social · 2y ago

I am trying the delicate experiment to benchmark #Koin #Kotlin framework with the Now in Android app, having real-world usage measurements: proandroiddev.com/benchmarking... Sorry for flaming the internet again 😅 Feedback is welcome to help make this experiment process better 🙏

PSA: if you write v.pow(2f) (also .pow(3f)) on Android, please write v * v instead. pow() is a (relatively) expensive function call that won't get optimized away (yet). On a Pixel 6, pow(2f) is 5x slower than a multiplication. For long expressions, use inline fun square(v: Float) = v * v

My own pet peeve is when folks use `?.let {} ?:` instead of if/else when checking null It's less readable, and more error prone (because if "doThing()" accidentally returns null, then you end up running the ?: branch, which often is not what you actually want.

Bild

I love Kotlin but please don't abuse its features. I regularly see code like in the first function when you can instead write a simple if statement: it's shorter, easier to read, and doesn't allocate an object! Thankfully both functions compile to the same assembly when R8 is turned on.


Two Kotlin functions that take 2 float parameters a and b. Each function returns a divided by b if b is not 0, or a constant called DefaultValue otherwise. The first function does so using takeIf, let, and the "elvis" operator. The second function uses a simple if/else statement.

Open source can be both collaborative and competitive. When a new project shows up, it competes with existing solutions, but that doesn't prohibit collaboration, even between competing projects and ideas.