Stuart Breckenridge

FeedPress Adds Experimental JSON Feed Support

From the FeedPress blog:

There is nothing FeedPress customers need to do in order to get JSON compatible feeds. Simply append the ?format=json parameter to the end of your RSS feed.

So simple. I’ve been testing it and it seems to be working well. My experimental feed is here.


Apple's Lower Priorities

An interesting series of articles regarding Apple’s lower priorities. First, David Sparks on the text and screen effects in Messages:

We have now had text and screen effects on iOS for eight months. Are you using them? Perhaps more importantly, does Apple remember they exist?

Dr. Drang followed up with:

  • The iPad features introduced in iOS 9 were followed up with… nothing in iOS 10
  • TV
  • The one-and-a-half-year refresh for the late 2016 MacBook Pro
  • The over-four-years betweek iWork releases

Nick Heer at Pixel Envy:

  • Remember Live and Dynamic wallpapers? Neither has been updated since their introductions in 2015 and 2013, respectively.
  • Remember the “Learn to Play” feature in GarageBand? It was introduced in 2009, and hasn’t been updated since 2010. The artist lesson store is exactly the same as the day it launched nearly eight years ago.

I’d also posit that FaceTime video calling is due for an update. It’s essentially the same product today as it was when it was released six years ago and could do with some new features, for example, group calling1.

  1. There was an episode of Modern Family that used some nifty video editing that made it look like FaceTime had this feature implemented. It was very, very clever. ↩︎


Feedly Responds to JSON Feed Questions

Question: will Feedly be supporting JSON feed anytime soon?

Responses:

I think these are shameful tweets. Asking about JSON feed support is a fair question and doesn’t deserve such a dismissive non-response.

Feedbin, on the other hand, does support JSON feed. Ben Ubois, on the Feedbin company blog:

One of the criticisms I’ve seen of JSON Feed is that there’s no incentive for feed readers to support JSON Feed. This is not true. One of the largest-by-volume support questions I get is along the lines of “Why does this random feed not work?” And, 95% of the time, it’s because the feed is broken in some subtle way. JSON Feed will help alleviate these problems, because it’s easier to get right.


Reducing Bundle Size and Improving Extension Performance

The today extension of The FFI List displays the number of registered FFIs broken down by their entity type. It’s fairly simple, but I made a few mistakes when putting it together:

  1. I copied the sqlite database into both the main app and the extension; and,
  2. The code to run queries on the database to obtain statistics was part of the extension.

The net effect was that the bundle size was approaching 180MB (two 80MB databases). In addition, performance of the extension was haphazard: I had reports, and had seen myself, instances where the extension returned a seemingly random count of total database entries. What’s worse was that I couldn’t debug the problem. No errors were raised, the underlying data was intact, and I couldn’t reproduce the problem with any regularity. It also took around upwards of four seconds for the queries to run.

In the upcoming v2.1 release, I’m happy to say these issues are fixed.

First, the sqlite database is longer embedded in both the main application and the extension. The bundle size is once again under 100MB.

Second, to make sure that the extension was able to show statistics like it did before, I created a Statistics.plist file and as part of the build process, I run some sqlite queries and then populate the data into the plist file like so:

sponsors=$( sqlite3 _YOUR_DATABASE_ "select count(ZENTITYTYPE) from ZFFIENTITY where ZENTITYTYPE = '01SP'")
/usr/libexec/PlistBuddy -c "Set 01SP $sponsors" "${TARGET_BUILD_DIR}/FFI.app/Statistics.plist"

When the main app runs, it will copy the Statistics.plist file into the shared container:

let container = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.ffiinfo")?.appendingPathComponent("/Statistics.plist")
let stats = Bundle.main.path(forResource: "Statistics", ofType: "plist")
        
guard let containerURL = container else {
    return shouldPerformAdditionalDelegateHandling
}
        
guard let statsPath = stats else {
    return shouldPerformAdditionalDelegateHandling
}

if FileManager.default.fileExists(atPath: containerURL.path) {
    do {
        try FileManager.default.removeItem(atPath: containerURL.path)
        try FileManager.default.copyItem(atPath: statsPath, toPath: containerURL.path)
    } catch {
        print(error)
    }
} else {
    do {
        try FileManager.default.copyItem(atPath: statsPath, toPath: containerURL.path)
    } catch {
        print(error)
    }
}

The extension then displays the available data from the plist when it exists in the container. This improves performance from several seconds to instantaneous as the extension is no longer running any database queries.


JSON Feed

Manton Reece and Brent Simmons:

We — Manton Reece and Brent Simmons — have noticed that JSON has become the developers’ choice for APIs, and that developers will often go out of their way to avoid XML. JSON is simpler to read and write, and it’s less prone to bugs.

So we developed JSON Feed, a format similar to RSS and Atom but in JSON. It reflects the lessons learned from our years of work reading and publishing feeds.

I try to avoid XML when I can, so I’m obviously very pleased to see a JSON standard appear for feeds.

I’ve created a JSON feed for this site which is available here. I’ve also uploaded my current Jekyll template to GitHub.

Now I just need to find a reader that supports the JSON feed spec!