David Beck

Husband, Father, Software developer, Geek, Fun guy


Trunk Is Now ThinkSocial for Mastodon

05 Feb 2023

ThinkSocial App Icon

Continue reading...

Dev Notes #4: Image Caching, Custom Emoji, and a Dumb UIKit Bug

04 Feb 2023

I started the week off addressing how the app caches images. The app uses my wrapper around ImageI/O. The downloader that uses relies on URLCache as well as an in memory cache of the parsed images on top of that. But, URLCache can be unpredictable to say the least. I like that it uses the response headers to determine how long to cache items. But from my experience, it often ejects items to agressively.

Continue reading...

Trunk Dev Notes #3: CI Servers, Cleanup, and Fullscreen Images

29 Jan 2023

At the beginning of last week I spent some time working on CI for Trunk. After making big claims about having to have CI on every project I work on, my workflow has been broken for several weeks. It’s admittedly hard to take time away from actually building something to setup support tools.

Continue reading...

Trunk Dev Notes #2

17 Jan 2023

Over the weekend I was able to get the second beta of Trunk to a place where I was ready to release it. I wanted to get it to a point where the concept of the app was well represented, which meant a fully functional timeline.

Continue reading...

Trunk Dev Notes #1

14 Jan 2023

The last few weeks working on Trunk have been fairly frustrating, but I think it’s coming around the corner.

Continue reading...

Animating and Downloading Images Incrementally with SwiftUI

14 Jul 2019

When Apple released their new view framework, SwiftUI, at WWDC 2019, they had several sessions throughout the week to breakdown and explain how to use the framework. There was a big hole that people are still trying to figure out though: how do you load images! To be fair, this has long been a void in the Apple frameworks. UIKit doesn’t have any builtin way to download and show images either. But given the radical new design of SwiftUI, it’s not obvious how it should be done.

Continue reading...

Digging deeper into the Swift behind SwiftUI

11 Jun 2019

I don’t know about you, but as awesome as SwiftUI looks, I can’t help but wonder at how it’s actually implimented. As Swift has “evolved” over the years, I feel like I’ve been able to keep up with how things actually work under the hood. Swift tends to build apon itself. For example, if you understand how properties work, it’s easier to understand how subscripts work (they are just properties with an argument).

Continue reading...

My SwiftUI Hot Take 🔥

08 Jun 2019

SwiftUI looks amazing. There have been a lot of attempts to bring React concepts to Swift. This is the first implimentation I’ve seen that looked right.

Continue reading...

Rapid API Development with PostGraphile and Auth0

25 Feb 2019

PostGraphile is a really great tool for creating api backends very quickly primarily using PostgreSQL. However, it does require you to rethink how you make apis. This is especially true for authorization and authentication. But it certainly is possible (even easy) to create secure apis using Graphile.

Continue reading...

Rapid API development using PostgreSQL, GraphQL, and PostGraphile

12 Feb 2019

One of the most important aspects to software development is rapid prototyping. This is espeically true for side projects and startups where you have limited time and runway to get an idea fleshed out and figure out what works and what doesn’t. But even estabilished companies can benefit from getting a working prototype or beta out. I always say that a working prototype is worth a thousand meetings.

Continue reading...

Using URLs, paths and routes for navigation in an iOS app

17 Aug 2018

Many of our apps are mirrors, at least at some level, of a website. The interface might use iOS or Android specific UI or layout that is optimized for smaller screens, but the data the user is interacting with is the same accross platforms. Navigation for these 2 platforms however are fairly different. On the web you rely on the browsers back button heavily. In iOS you might use a navigation controller or a cancel button on a modal, but you have to be intentional about how things are presented and intentional about rolling back those transitions. For instance, if you just kept pushing modal view controllers on top of each other to go back to “home”, you would end up with a large stack of views and view controllers all taking up memory indefinitely.

Continue reading...

Why you should break up your api endpoints

10 Aug 2018

Years ago I read Even Faster Web Sites: Performance Best Practices for Web Developers by Steve Souders. It was a simpler time, and the best practices for web development were still being figured out. Almost 10 years later, the advice here seems obvious. Our tools take these practices for granted and impliment them by default. For instance, the idea of bundling all of your JS and CSS into single files for the entire site. It might not be obvious, but if one page uses JS file 1 and 2, and another page uses JS file 2 and 3, the best choice in most cases is to combine all the JS files into a single file and request it on ever single page. That’s how Rails and Webpack, along with many other tools work out of the box.

Continue reading...

Managing login and authentication for iOS

03 Aug 2018

For many if not most apps these days, some kind of login and authentication is required. Ideally your app should have some kind of benefit without an account. Something to give users value before they make the commitment of creating an account, but for some services that just isn’t possible.

Continue reading...

Swift on the server... without the server (Part 2)

20 Jul 2018

In part 1, I outlined why Serverless architecture, and Lambda in particular, could be a really great solution for “server side” Swift, and how to get the bare minimum of a hello world example working. But it takes more than getting a process to run to use Swift as a backend. In part 2, I’d like to build on that work and work towards a more production ready environment.

Continue reading...

Swift on the server... without the server

13 Jul 2018

A guide to using Swift with AWS Lambda

Continue reading...

Dependency Options for iOS apps

22 Aug 2016

Many languages today either come with a full featured dependency manager, or have a canonical one that everyone uses and is supported universally. A dependency manager does the work of downloading and integrating any dependencies (3rd party libraries/frameworks) including dependencies of those dependencies. Unfortunately, Apple doesn’t seem to accept the existence of 3rd party code1. This has led to several options for incorporating external code into a project. I have personally used all of these options in shipping apps2.

  1. At WWDC this year I talked to several Apple Xcode and Swift engineers, that had no idea how Cocoapods or Carthage worked. 

  2. Technically I’ve only used Carthage in a TestFlight beta so far. 

Continue reading...

Supporting GIFs in iOS

23 Jun 2016

A few weeks ago I got a bug report from my tester. I quote: “Animated GIFs don’t animate. This is inconsistent with the web experience—and it’s just not fun.” We definitely want our app to be fun! But we never really built animated GIF support into our web app. It just kind of happened. If you display a GIF on a web browser, it’s going to animate it. It’s just what it does. It would be harder to keep them from animating.

Continue reading...