rip twitter

This commit is contained in:
Harsh Shandilya 2023-03-27 13:37:46 +05:30
parent 7d5111052e
commit e6834e176e
14 changed files with 28 additions and 39 deletions

View File

@ -9,7 +9,7 @@ title = "Android Password Store July release"
toc = true
+++
[As promised](https://twitter.com/msfjarvis/status/1278002765046804480), here are detailed release notes for the [v1.10.0](https://github.com/android-password-store/Android-Password-Store/releases/tag/v1.10.0) build of Android Password Store that is going out right now on the Play Store and to F-Droid in the coming days. This is a massive one even compared to our previous v1.9.0 major release, which was our largest release when it went out. Let's dive into the changes!
As promised, here are detailed release notes for the [v1.10.0](https://github.com/android-password-store/Android-Password-Store/releases/tag/v1.10.0) build of Android Password Store that is going out right now on the Play Store and to F-Droid in the coming days. This is a massive one even compared to our previous v1.9.0 major release, which was our largest release when it went out. Let's dive into the changes!
## New features

View File

@ -9,7 +9,7 @@ title = "Android Password Store October release"
toc = true
+++
We're back with yet another release! As I tweeted [earlier this month](https://twitter.com/msfjarvis/status/1314943278173745152), this is going to our last release for a while. There's a lot of work left to be done, and we're simply not big enough a team to have these larger changes be done separately from our main development. We'll still be doing bugfix releases if and when required, so please do file bug reports as and when you encounter issues.
We're back with yet another release! As I shared earlier this month, this is going to our last release for a while. There's a lot of work left to be done, and we're simply not big enough a team to have these larger changes be done separately from our main development. We'll still be doing bugfix releases if and when required, so please do file bug reports as and when you encounter issues.
## New features

View File

@ -11,7 +11,7 @@ title = "Dagger the easy way - Part 1"
> Updated on 22 Jan 2020 with some additional comments from [@arunkumar_9t2](https://twitter.com/arunkumar_9t2). Look out for them as block quotes similar to this one.
This is not your average coding tutorial. I'm going to show you how to write actual Dagger code and skip all the scary and off-putting parts about the implementation details of the things we're using and how Dagger does everything under the hood. If you're interested in that, [poke me on Twitter](https://twitter.com/msfjarvis) that you really, really wanna know the implementation details of this and I'll grumble and consider it.
This is not your average coding tutorial. I'm going to show you how to write actual Dagger code and skip all the scary and off-putting parts about the implementation details of the things we're using and how Dagger does everything under the hood.
With that out of the way, onwards to the actual content. We're going to be building a very simple app that does just one thing, show a Toast with some text depending on whether it was the first run or not. Nothing super fancy here, but with some overkill abstraction I'll hopefully be able to demonstrate a straightforward and understandable use of Dagger.

View File

@ -7,7 +7,7 @@ tags = ["learn"]
title = "Learning Zig - Day 4"
+++
[So much for hope]. Either way, we're back at it! Today I'll be getting familiar with common patterns in Zig like providing explicit allocators and learn about more of the standard library. This is of course, [chapter 2] of the ZigLearn.org curriculum.
Today I'll be getting familiar with common patterns in Zig like providing explicit allocators and learn about more of the standard library. This is of course, [chapter 2] of the ZigLearn.org curriculum.
# Thoughts™
@ -43,7 +43,6 @@ I skipped through the parts about HashMaps, Stacks, sorting and iterators since
Overall, I'm liking everything I'm seeing. Very excited to start building things in Zig!
[so much for hope]: https://twitter.com/msfjarvis/status/1393977222990426114
[chapter 2]: https://ziglearn.org/chapter-2/
[libcore]: https://doc.rust-lang.org/core/index.html
[the embedded rust book]: https://docs.rust-embedded.org/book/intro/no-std.html

View File

@ -14,7 +14,7 @@ I made a couple of purchases yesterday, including a Bluetooth speaker and a USB
- It runs a customized build of the Zen kernel with a very slimmed down config
- It has never had Bluetooth connectivity before
Thanks to this combination of factors, things got weird. I tried a bunch of things before getting it working, so it is entirely possible that I miss some steps that were important but I didn't think so while writing this. Please let me know on [Twitter](https://twitter.com/msfjarvis) if these steps didn't work for you and I'll try to fix this post.
Thanks to this combination of factors, things got weird. I tried a bunch of things before getting it working, so it is entirely possible that I miss some steps that were important but I didn't think so while writing this. Let me know in the comments if I missed something.
### Getting the right packages

View File

@ -146,7 +146,7 @@ fun toJson(writer: JsonWriter: value: TextParts?) {
}
```
Parsing JSON manually is relatively easy to screw up and Moshi will let you know if you get nesting wrong (missed a closing `endObject()` or `endArray()`) and other easily detectable problems, but you should definitely have tests for all possible cases. I'll let the readers do that on their own, but if you _really_ need to see an example then scream at me on [Twitter] and I'll do something about it.
Parsing JSON manually is relatively easy to screw up and Moshi will let you know if you get nesting wrong (missed a closing `endObject()` or `endArray()`) and other easily detectable problems, but you should definitely have tests for all possible cases. I'll let the readers do that on their own, but if you _really_ need to see an example then let me know below.
Anyways, that's the object -> JSON part sorted. Now let's try to do the reverse. Here's where we are as of now.
@ -378,4 +378,3 @@ This is certainly a lengthy job to do, and this blog post is a result of nearly
[gson]: https://github.com/google/gson
[json spec]: https://TODO
[moshi]: https://github.com/square/moshi
[twitter]: https://twitter.com/msfjarvis

View File

@ -18,7 +18,7 @@ APS has had some design work done to it but for the most part remains the culmin
I began with scouring through the resources in the conveniently isolated [M3 website], where the Material Design team has helpfully created a lot of great tools and content to help developers and designers through the process. There's the "[Migration to Material 3]" blog post, and the [Material Theme Builder] to generate palettes/styles/themes for apps, for both Jetpack Compose and Android's View-based system. These were extremely helpful in getting a headstart on the whole process. It's all documented in the commit history of the [migration PR] but I figure some additional context can't hurt.
Once I had the themes in, I decided to take the opportunity to also introduce a custom typeface. The app has been using Roboto since forever and it felt like it was time to spice things up. I decided to go with [Manrope] since it is a font I've previously used and found to be excellent for visual appeal and accessibility. I'm still not a 100% confident in my choice, so if people have better options in mind I'd love to know down in the comments or through [Twitter].
Once I had the themes in, I decided to take the opportunity to also introduce a custom typeface. The app has been using Roboto since forever and it felt like it was time to spice things up. I decided to go with [Manrope] since it is a font I've previously used and found to be excellent for visual appeal and accessibility. I'm still not a 100% confident in my choice, so if people have better options in mind I'd love to know down in the comments.
Once the new font face was in, I opted to enable dynamic colors. Admittedly not the right choice, since I should've validated the "default" palette first but that's what I did ¯\\_(ツ)_/¯.
@ -69,7 +69,6 @@ I'd like to thank the Material Design team once more for the fabulous work they
[material theme builder]: https://material.io/blog/material-theme-builder
[migration pr]: https://github.com/android-password-store/Android-Password-Store/pull/1532/commits
[manrope]: https://fonts.google.com/specimen/Manrope#about
[twitter]: https://twitter.com/msfjarvis
[chips]: https://material.io/components/chips
[accessibility issue]: https://github.com/android-password-store/Android-Password-Store/issues/1261
[max rumpf]: https://github.com/maxr1998

View File

@ -29,7 +29,7 @@ It was great! I could get any dependency anywhere and that allowed me to write a
## The turning point
Around mid-December 2019, [Arun](https://twitter.com/arunkumar_9t2) released the 0.1 version of his Dagger 2 dependency graph visualizer, [Scabbard](https://arunkumar.dev/introducing-scabbard-a-tool-to-visualize-dagger-2-dependency-graphs/). It looked **awesome**. I [retweeted it](https://twitter.com/msfjarvis/status/1210856668310863872) and shoved in my residual Dagger hate for good measure because isn't that what the internet is for. I was [confident](https://twitter.com/msfjarvis/status/1210866037056397312) that Dagger shall never find a place in my code and my friend [Sasikanth](https://twitter.com/its_sasikanth) (super smart dude, definitely worth following) was [hell-bent on ensuring otherwise](https://twitter.com/msfjarvis/status/1210935581288517632?s=20).
Around mid-December 2019, [Arun](https://twitter.com/arunkumar_9t2) released the 0.1 version of his Dagger 2 dependency graph visualizer, [Scabbard](https://arunkumar.dev/introducing-scabbard-a-tool-to-visualize-dagger-2-dependency-graphs/). It looked **awesome**. I reshared it and shoved in my residual Dagger hate for good measure because isn't that what the internet is for. I was confident that Dagger shall never find a place in my code and my friend [Sasikanth](https://sasikanth.dev) was hell-bent on ensuring otherwise.
Together, we dug up my previous efforts and I started [a PR](https://github.com/msfjarvis/viscerion/pull/214) so he could review it and help me past the point I dropped out last time. He helped [me on GitHub](https://github.com/msfjarvis/viscerion/pull/214#pullrequestreview-336919368), privately on Telegram and together in about 2 days Viscerion was completely Koin-free and ready to kill. I put down my thoughts about the migration briefly [on the PR](https://github.com/msfjarvis/viscerion/pull/214#issuecomment-569541678), which I'll reproduce and expand on below.
@ -59,4 +59,4 @@ This, I probably don't subscribe to anymore. Dagger was horrible to get started
## To summarize
Like RxJava, Dagger has become an industry standard of sorts and a required skill at a lot of Android positions, so eventually you might wind up needing to learn it anyway, so why wait? Dagger is not _terrible_, just badly presented. Learning from existing code is always helpful, and that was part of how I learned. Use my PR, and tweet me questions at [@msfjarvis](https://twitter.com/msfjarvis) and I'll do my best to help you like I was helped and hopefully we'll both learn something new :)
Like RxJava, Dagger has become an industry standard of sorts and a required skill at a lot of Android positions, so eventually you might wind up needing to learn it anyway, so why wait? Dagger is not _terrible_, just badly presented. Learning from existing code is always helpful, and that was part of how I learned. Use my PR, and post questions below and I'll do my best to help you like I was helped and hopefully we'll both learn something new :)

View File

@ -10,7 +10,7 @@ title = "Switching my email to Purelymail"
Email is a very crucial part of my workflow, and I enjoy using it (and also why I'm beyond excited for what Basecamp has in store with [hey.com](https://hey.com)). I have switched emails a couple times over the many years I have had an internet presence, finally settling on [me@msfjarvis.dev](mailto:me@msfjarvis.dev) when I bought my domain. There began the problem.
I attempt to self-host things when reasonable, to retain some control and not have a single point of failure outside my control that would lock me out. With email, that part is a constant, uphill battle against spam filters to ensure your domain doesn't land in a big filter list that will then start trashing all your email and make life hard. Due to this, I never self-hosted email, instead choosing to forward it through Google Domains (the registrar for this domain) to my existing Google account. While this is a very reliable approach, it still involves depending heavily on my Google account. This has proven to be a problem in many ways, including [being locked out after opting into Advanced Protection](https://twitter.com/msfjarvis/status/1217534500550234112) and people's accounts being banned for a number of reasons completely unrelated to email. If something like this were to happen to me, I would lose both my Google as well as my domain email instantly. A very scary position to be in for anybody.
I attempt to self-host things when reasonable, to retain some control and not have a single point of failure outside my control that would lock me out. With email, that part is a constant, uphill battle against spam filters to ensure your domain doesn't land in a big filter list that will then start trashing all your email and make life hard. Due to this, I never self-hosted email, instead choosing to forward it through Google Domains (the registrar for this domain) to my existing Google account. While this is a very reliable approach, it still involves depending heavily on my Google account. This has proven to be a problem in many ways, including being locked out after opting into Advanced Protection and people's accounts being banned for a number of reasons completely unrelated to email. If something like this were to happen to me, I would lose both my Google as well as my domain email instantly. A very scary position to be in for anybody.
A couple days ago, [Jake Wharton](https://twitter.com/JakeWharton) retweeted a blog post from [Roland Szabo](https://twitter.com/rolisz) titled ['Moving away from GMail'](https://rolisz.ro/2020/04/11/moving-away-from-gmail/). I read through it, looked at PurelyMail, and was convinced that it was really the solution for my little problem. I am a big believer in paying in dollaroos rather than data so I really loved the transparency behind pricing, data use, infrastructure and just about everything else. Signed up!

View File

@ -15,37 +15,33 @@ When you start migrating your Java code to Kotlin, you will encounter multiple s
Java's `java.lang.String#split` [method](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-) takes a `String` as it's first argument and creates a `Regex` out of it before attempting to split. Kotlin, however, has two variants of this method. One takes a `String` and uses it as a plaintext delimiter, and the other takes a `Regex` behaving like the Java method we mentioned earlier. Code that was directly converted from Java to Kotlin will fail to accommodate this difference, so be on the lookout.
{{< tweet user="msfjarvis" id="1202077283579826176" >}}
## Runtime asserts
Square's [Jesse Wilson](https://twitter.com/jessewilson) found through an [OkHttp bug](https://github.com/square/okhttp/issues/5586) that Kotlin's `assert` function differs from Java's in a very critical way - the asserted expression is _always_ executed. He's written about it on his blog which you can check out for a proper write up: [Kotlins Assert Is Not Like Javas Assert](https://publicobject.com/2019/11/18/kotlins-assert-is-not-like-javas-assert/).
TL; DR Java's `assert` checks the `java.lang.Class#desiredAssertionStatus` method **before** executing the expression, but Kotlin does it **after** which results in unnecessary, potentially significant overhead.
{{< highlight java >}}
```java
// Good :)
@Override void flush() {
if (Http2Stream.class.desiredAssertionStatus()) {
if (!Thread.holdsLock(Http2Stream.this) == false) {
throw new AssertionError();
if (Http2Stream.class.desiredAssertionStatus()) {
if (!Thread.holdsLock(Http2Stream.this) == false) {
throw new AssertionError();
}
}
}
}
...
}
{{< / highlight >}}
```
{{< highlight kotlin >}}
```kotlin
// Bad :(
override fun flush() {
if (!Thread.holdsLock(this@Http2Stream) == false) {
if (Http2Stream::class.java.desiredAssertionStatus()) {
throw AssertionError()
if (!Thread.holdsLock(this@Http2Stream) == false) {
if (Http2Stream::class.java.desiredAssertionStatus()) {
throw AssertionError()
}
}
}
}
...
}
{{< / highlight >}}
```
## Binary incompatibility challenges

View File

@ -10,8 +10,6 @@ title = "Tools of the trade: direnv"
This post was supposed to be a monolith directory of all the CLI-based tooling that I use to get things done throughout my day, but it turned out to be just a bit too long so I elected to split it out into separate posts.
{{< tweet user="msfjarvis" id="1289965196992114689" >}}
Let's talk about [direnv](https://github.com/direnv/direnv).
## What is direnv?

View File

@ -76,6 +76,6 @@ Already feels like home!
[hub](https://hub.github.com) is a `git` wrapper that provides some handy features on top like `sync` which updates all locally checked out branches from their upstream remotes. You can re-implement this with some leg work but I'll leave that as an exercise for you.
And that's about it! Let me know what you think of `fd` and if you're switching to it, over on [Twitter](https://twitter.com/msfjarvis).
And that's about it! Let me know what you think of `fd` and if you're switching to it.
This was part 3 of the [Tools of the trade](/categories/tools-of-the-trade/) series.

View File

@ -57,6 +57,6 @@ The syntax as evident, is pretty simple
The `+abort` there is optional, and signals `fzf` that we want to exit after running the command. Detailed instructions are available in the `fzf` [README](https://github.com/junegunn/fzf#readme).
And that's it from me. Tweet at me at [@msfjarvis](https://twitter.com/msfjarvis) with any fancy `fzf` recipes you come up with!
And that's it from me. Post any fancy `fzf` recipes you come up with in the comments below!
This was part 2 of the [Tools of the trade](/categories/tools-of-the-trade/) series.

View File

@ -10,11 +10,9 @@ title = "Why upgrade Android?"
toc = true
+++
A couple days ago I tweeted this out, partly in response to a security conscious user who was quick to point out why a particular feature had to be added to APS, but failed to realise the fact that the problem wouldn't even exist if they were running the latest version of Android (we'll talk about the behavior change that fixed it later here).
A couple days ago I came across a security conscious user who was quick to point out why a particular feature had to be added to APS, but failed to realise the fact that the problem wouldn't even exist if they were running the latest version of Android (we'll talk about the behavior change that fixed it later here).
{{< tweet user="msfjarvis" id="1285661151104323584" >}}
I completely stand by what I said, and for good reason. Android upgrades bring massive changes to the platform, improving security against both known and unknown threats. You sign off that benefit when you buy into an incompetent OEM's cheap phones, and it has become a bit too 'normal' than anybody would prefer.
Android upgrades bring massive changes to the platform, improving security against both known and unknown threats. You sign off that benefit when you buy into an incompetent OEM's cheap phones, and it has become a bit too 'normal' than anybody would prefer.
That's not what we're going to talk about, though. This post is going to be purely about privacy, and how it has changed, nay, improved, over the years of Android. My apps support a minimum of Android 6, so I will begin with the next version, Android 7, and go through Google's release notes, singling out privacy related changes.