Moving to Mastodon

Published on Nov 22nd, 2022

I think the past few weeks have had everyone thinking where are we going with Elon Musk taking control of Twitter.

Like many I have had two concerns on the top of my mind.

  1. Should I delete my account?
  2. Where are we going?

The first issue seemed easy, I went ahead and requested my Twitter data archive. It was time consuming, but not at all difficult. As my cursor hovered over the delete button, I was suddenly reminded of all the sites I have signed into with my Twitter credentials. I decided I would hold off on the full account deletion and will simply let it lie dormant.

The second issue was a bit more interesting. I, was immediately reminded of Mastodon. This decentralized, hub-based social network has been around for some years, but mostly for small niche communities. Since I last checked, it looks like they have really improved on their feature set and at this point, I didn’t seriously consider any other options. I have a new profile set up here.

The cool thing about Mastodon is that you can join “hubs” that are interesting to you, and there is no shortage of niche communities. I joined Tech Hub most of the posts are tech centric and very interesting.

I think this is likely to be confusing to many people so I want to see if I can help explain how this all works.

Be warned, I am still fairly new to Mastodon, but this is my understanding.

What is affected by my hub choice?

Short answer: not much.

Your hub choice will determine your “local” feed content, on a typical configuration this will be all posts from your hub.

Your “home” feed is a list of all the profiles you follow from your hub or any other hub that isn’t explicitly blocked.

Finally there is a “federated” feed that is a unified feed from your hub and any hub yours is working (or federated) with. You might see some people refer to this graph of connections as the “Fediverse”.

I think the biggest issue would be if you chose a hub that gets defederated. This has happened with some hub with extreme political, violent, or sexual content. If you choose poorly the good news is you can always just pack up and move to a different hub.

What client should I use on mobile?

I’ve tried a handful of iOS clients, but so far my favorite on iPhone is Metatext, It has a great UX and feels snappy.

A close second is Toot!. My biggest issue with Toot! is I think it over did it a tiny bit with the animations.

There is an official client but I found it a bit sluggish and buggy.

How do I find my friends?

This is probably one of the biggest conversion friction points, especially with many hubs rate limiting rapid follows. With multiple hubs and no central verification it can be difficult to determine if you are following the right person. I do recommend using fedifinder to help locating your friends.

What are these Metadata fields?

They are for whatever you like, you can add any additional information that you think is useful for you profile. I personally put my twitter link, web site and location.

Profile Screenshot

Other Tidbits

Not everyone will be onboard for calling posts “toots”, the MetaText client has an option for renaming toot to post.

I think they also need to make it easier to follow people from a web link. Right now you have to copy the users profile link and paste it in your own hub to follow, it’s weird and unnecesary, I hope they figure it out soon.

If you have a website, you can easily get “verified” by adding a backlink to your mastodon profile with rel="me" attribute set. Then add a “website” metadata property on your profile with your website linked and it will get a green checkmark. This tells your followers that you own the domain, and for most reasons, this is nearly as good as twitter verification. More details here.

There is a weird meme on Mastodon where no one refers to Twitter by name, like It’s Lord Voldemort or something. If you see “birdsite” that means Twitter.

Oh yea, follow Feditips. This account posts frequent tips and tricks and has been a great resource for getting started.

Conclusion

Mastdon is really interesting and I am going all in, I do think that some people will have trouble “getting it” but maybe with some more updates and more traction we can finally ditch the monolithic corporate social network.

I hear a bunch of people are heading to Hive Social, and maybe it will become a big thing, but after MySpace, Frendster, Foursquare and now Twitter… I think I am content to stick with Mastodon.

Some reasons SwiftUI might not be right for you

Published on Dec 12th, 2019

As work slows down for the holidays, I have found myself with some spare time. I decided to sit down and tinker with SwiftUI to see what it could do. While I was impressed with how easy it was to get pixels on-screen, test them and get data flowing, there are still several issues. I am going to document them here.

This should have been simple, a navigation bar with a left button, a right button, a text-based title, and a tint color applied. Looking at the documentation it would appear .accentColor() is what I wanted. I applied it and found that while it does apply the tint color to bar items, it does not apply it to the title text.

There is a terrible workaround where you can set the leading items as an Hstack, Add a title view, then set the width to match the screen, but I really do not recommend doing this.

for the record, I also tried setting .foregroundColor() to the same effect.

Filed a Radar.

Scroll View Paging (Missing Feature)

If you want a scroll view to snap to pages (useful for snapping to cards or other content) in UIKit it was as easy as setting .isPagingEnabled = true on a UIScrollView. This feature seems to have been omitted from SwiftUI.

Filed a Radar.

Take the following example using Xcode Version 11.3 (11C29), This is currently the latest build.

struct Detail: View {
    var body: some View {
        Text("Detail")
    }
}

struct ContentView: View {
    var body: some View {
        NavigationView {
            List {
                NavigationLink(destination: Detail(), label:{ Text("Hello") })
                NavigationLink(destination: Detail(), label:{ Text("Hello 2") })
            }
            .navigationBarTitle("Testing")
        }
    }
}

If you were to launch this and tap the first link, tap back, then tap the first link again, it will not load.

Tapping the second link, in this case, will load.

Filed a Radar.

Most Autocompletes Do Not Work As Expected (Editor Issue)

Buttons are the obvious offender.

Button(action: {

}, label: { () -> PrimitiveButtonStyleConfiguration.Label in

})

Most of the time, what you are looking for is

Button(action: {
    print("Hello")
}) {
    Text("Hello")
}

I am still not sure what PrimitiveButtonStyleConfiguration.Label means.

No Good CollectionView Equivalent (Missing Feature)

While you can create some decent views that look like CollectionView by nesting scroll views, there is no method of doing this where the data is dynamically loaded.

The only component in SwiftUI that appears to use dynamic loading is List. ScrollView will require all items to be loaded into memory before it can render.

All of this to say, if you need a horizontal scroll view to load in many items, SwiftUI will cause you some serious performance issues.

I am not sure if this is intentional or not. It is possible that Apple doesn’t want heavy usage of horizontal scroll views.

I will be watching this going into June.

Conclusion

SwiftUI is really fun and the data flow is just awesome. It makes building new screens super quick and opens the door to a ton of prototyping.

I am sure these will all be fixed in time, but many of these are deal-breakers and as it is right now, I will not recommend SwiftUI for any paid projects I am involved with.

This article will be updated as I find more issues.

SwiftUI Tutorial Series

Published on Dec 5th, 2019

Paul Hudson of Hacking With Swift has been kicking ass since June digging in to the very depths of SwiftUI. Along with his book, he has also been churning out and an ever growing series of videos.

This series starts from the basics and moves into helping you understand a lot of how the framework works under the hood.

If you have any intention of learning SwiftUI, I highly recommend watching.

Scroll to top in iOS 13 UI Testing

Published on Aug 8th, 2019

In XCTestCase if you want to scroll to the top of a scrollable view, you tap on the status bar

XCUIApplication().statusBars.firstMatch.tap()

However, this is doesn’t work in iOS 13.

I filed a radar during the beta and they just got back to me with this.

The status bar is no longer part of the application, it’s part of the system UI (“springboard”). Change your test as follows:

let systemApp = XCUIApplication(bundleIdentifier: "com.apple.springboard")
systemApp.statusBars.firstMatch.tap()

This seems like it should be important, but it was not documented anywhere on Apple’s website.

If still need to support Xcode 10 / iOS 12, I recommend using the following extension

extension XCUIElement {
    func scrollToTop() {
        if #available(iOS 13, *) {
            let systemApp = XCUIApplication(bundleIdentifier: "com.apple.springboard")
            systemApp.statusBars.firstMatch.tap()
        } else {
            XCUIApplication().statusBars.firstMatch.tap()
        }
    }
}

I figured I would share this so that it is at least documented somewhere.