Software Dev

Scroll Hitch Rate

Xcode 12 is adding a new metric to objectively track how smoothly your app scrolls. This is kind of cool since scrolling smoothness feels right and is a sign of a good design.

Via iOS Dev Weekly.

Software Dev

Learn to Love Throwing in Swift

I really like the points made in this article about Swift error handling: using throw/try/catch is actually much better than returning optionals or the new Result type.

👉Benefits of using throwing functions (try) – Swift’s most underrated feature?

Throwing errors, when used throughout your codebase, helps you reduce and simplify code. It makes your unit testing easier too.

As a former Java programmer, I have to admit some hesitance to throw anything. Java error handling can turn into a nightmare of its own.

But the author makes some compelling arguments why throwing might make sense in Swift. Error handling is never fun; let’s do it the easy way. 🤷🏻‍♂️

In a related note, Re: Making Wrong Code Look Wrong also talks about the benefits of throwing in Swift, in particular with relation to local reasoning. 👍

Via iOS Dev Weekly.

Software Dev

What Adding Dependencies Will Do To Your App in 2020

I like the title of this article because it recognizes that pulling third-party dependencies into your app has a cost.

👉 What Adding Dependencies Will Do To Your App in 2020

And yet we all do it because it also has its benefits. 🤦🏻‍♂️😂

That article is a realistic and practical look how the dependencies affect your app in terms of app launch times, app size, and build times. It compares Swift Package Manager 🤓, Carthage 🤷🏻‍♂️, CocoaPods 😬, manual dependency management 🥺, and Git Submodules 🤮.

I still have a dream of zero dependencies 🤩, but I know it’s not realistic in a complex app. 😑

Via iOS Dev Weekly.

Software Dev

The Prototype Mindset

We developers spend so much time focusing on the details of our work that we sometimes forget about the big picture. The presentation below from try! Swift Tokyo has some really helpful perspective. 🤯

Think about building the right thing before building it right.

Why are you making software? Know your motivations. It affects how you do your job.

Who do you write code for? Think about how you relate to your company and the end user.

What happens when your tech stack changes? Be resilient in your career. Try new things while also shipping apps.

Be less precious about code.

Realistically, how long will this code last? How robust is robust enough? Be pragmatic. Almost all the code I’ve written in the last few years is gone by now, either retired or completely rewritten.

Don’t try to be perfect. Don’t hold back out out fear.

Real artists ship.

Steve Jobs

How often do you test? Unit tests are a means to an end. Passing unit tests alone does not mean it’s a good app.

Via iOS Dev Weekly.

Software Dev

Reducing Your App’s Memory Footprint

Retain cycles, timers, big images, caching. These are a few reasons why your app might be using more memory than it should.

It might be a good time to audit your app and see how much memory it’s really using.

Lazy loading, implementing memory warning methods, using NSCache, autorelease pools. These are a few ways to deal with it.

Also, let’s say, just make a clean, focused software design. 🤷🏻‍♂️

👉 How To Reduce Your App’s Memory Footprint

Software Dev

iOS Development Class at Stanford ðŸŽ“

It’s looking easier than ever to learn from Stanford University. The Computer Science department has posted their latest class on Developing Apps for iOS online. 🤯.

It’s free. It has lecture videos, handouts, and assignments. As far as I can tell, you get everything but grades and a diploma. 🤷🏻‍♂️. But feel free to make an app!

👉 CS193p – Developing Apps for iOS at Stanford

It currently covers SwiftUI, MVVM and the Swift Type System, Reactive UI Protocols Layout, and Grid enum Optionals.