Software Dev

“Sketching” out an app prototype

I’ve learned a lot making apps for big companies, mostly about process: how a good continuous integration process works, how code reviews can be productive (or not productive), how to break a big app into smaller components so lots of people work on related things at the same time.

Still, it’s helpful to do something fresh and new 100% on your own from time to time. Doing something new all your own, you get to try any architecture you want, go all in on the latest asynchronous programming techniques, fully embrace the amazing new(ish) declarative/reactive view layer, and even try out a new CI framework to two.

But the most fun part of all is developing the idea of your app. What does your app do? How exactly does it work from a user perspective? And what do the screens look like in detail?

πŸ‘‰This time around, I’m prototyping my new app idea on my phone so that I can get a feel for how it works in my hands before writing all that code. ^

I tried out a few prototyping tools. After looking at some basic options and some pretty involved options (arguably too involved), I landed on a pretty “sketchy” Mac app that handles full-on detailed UI design and kind of does mobile prototypes through its “mirroring” iOS app. Perfect. πŸ‘Œ

πŸ‘‰ Sketch | mirroring app

I will say that Figma looks pretty promising as well. What nudged me over to Sketch was Apple’s Sketch-compatible design resources. There are some third-party iOS design resources for Figma, but I’d rather go with Apple’s official offering. Sorry, Figma. πŸ€·πŸ»β€β™‚οΈ

So my new design process is this, now that I’ve finally learned Sketch:

Rough sketch on paper ➑ realistic visual design in Sketch ➑ prototype on a phone ➑ code

My instinct is to talk about the app itself while it’s in progress, but sorry… that’s top secret for now. πŸ•΅οΈβ€β™€οΈ

Software Dev

Everything you need to know about [weak self]

This is a post about the idea of “weak self” in the Swift programming language. It is not a post about self-doubt. You are strong. You are capable. You matter. πŸ˜‰

But your Swift object might be weak, or at least @escaping and weakly held. πŸ€·πŸ»β€β™‚οΈ If this makes no sense, maybe it’s time to check out some pictures or quotes.

If you’re a Swift programmer, you probably know that if you need a reference to back to the calling self in a closure, and that closure might last longer than self, then you should send that closure yourself as [weak self] so you don’t end up with a retain cycle and a memory leak.

Still, it can get a bit confusing. What do you do if the weak self is actually gone when you execute the closure? Can the weak self disappear in the middle of the closure?

Fortunately, the Swift blogger Christian Tietze has all the answers. Or at least he has found some answers and summarized them nicely.

In the end, it all points to Chris Downie’s rules of thumb.

Only use a strong self for non-@escaping closures (ideally, omit it & trust the compiler)

Use weak self if you’re not sure

Upgrade self to a strongly-retained self at the top of your closure.

Via iOS Dev Weekly.

entertainment · Quotes

“When I choose to see the good side of things…It is strategic and necessary.”

Packed inside the breakneck crazy multiverse film Everything Everywhere All at Once is some real wisdom.

My favorite character is the unfailingly nice Waymond, the husband of the main character. One minute he seems a bit out of touch, and the next minute he is the man with the plan.

He embodies the idea that optimism is courageous and powerful. Being cynical and guarded might seem smart, but it will never land you on the moon or win a big battle. Did you ever hear a great general say, “I’m not sure we can do this, guys.” Being optimistic is strategic and necessary.

When I choose to see the good side of things, I’m not being naive. It is strategic and necessary. It’s how I learned to survive through everything.

Waymond from Everything Everywhere All at Once

Thank you, Waymond. πŸ™

Side note: Ke Huy Quan, who played Waymond, was also the little kid in Indiana Jones and the Temple of Doom and The Goonies. 🀯