After watching part of a video by Emmanuel Okwara, I explain my new understanding of how MVVM differs from MVC: in MVVM the ViewModel doesn’t manipulate the View directly, it just broadcasts changes and lets the View update itself, which fits SwiftUI’s declarative style. I raise an open question about what constitutes a View in MVVM and plan to build a minimal MVVM app as a practice project...
While working through the Missing Semester material, I wanted my zsh prompt to display the current git branch name. A bit of searching led me to install Oh My Zsh and enable its git and macos plugins to accomplish it...
I discovered MIT’s Missing Semester course, which teaches practical CS skills not covered in a typical degree, and highlight that its lectures, notes, and assignments are freely available. Having watched the shell and git lectures, I found both excellent and plan to work through the rest of the series...
My reflections on a Lex Fridman interview with Chris Lattner, main author of Swift, touching on value versus reference types and how languages deliver their complexity — illustrated with a comparison of hello world in Swift versus C++. I come away convinced Swift plus Playgrounds is a good introduction to programming for kids, with more reservations about SwiftUI...
I explain Swift memory management, starting with the difference between value types and reference types and why the latter requires Automatic Reference Counting. My code examples using a class with init and deinit methods show ARC working as expected, then demonstrate a retain cycle where two objects reference each other and are never deallocated...
Working through the Swift book, I cover functions as first-class types and passing closures around, then grapple with how closures capture variables that persist after their original scope has ended. My code examples show nested functions and a makeIncrementer closure, along with my reservations about variable capture and my suspicion that ARC is what keeps captured variables alive...
Paul Hudson’s Unwrap app for learning Swift is the subject, and I use its short lessons to fill three-minute gaps in the day. I have incorporated it into my goals, and on some days it’s the only progress I make...
I share a quick tip on renaming a variable everywhere at once by right-clicking its name, avoiding tedious manual search and replace. I’ve embedded a short demo video...
A short follow-up on fixing inconsistent SF Symbol heights in SwiftUI: locking the symbol height inside a frame solves the earlier problem, but breaks down when users change their text size. Apple’s @ScaledMetric property wrapper, introduced in iOS 14, scales the value with Dynamic Type and addresses that, though I admit not fully understanding how it works...
My notes on completing the first assignment from Stanford’s CS193p SwiftUI lecture series, which involved minor changes to the app built in the lectures. My write-up covers an error that prevented me from initializing a @State property from an instance member, and some dissatisfaction with duplicated emoji arrays and SF Symbol alignment—issues I partly resolved after reading the assignment’s hints section and rewatching a lecture...
A short note on finally understanding SwiftUI’s declarative nature after watching a 2019 WWDC video on the topic. I still have unanswered questions about how views bind to their data, plan to watch the series’ Data Flow video next, and acknowledge the detour is a way of procrastinating from two ongoing courses...
After hearing Dave Verwer’s iOS Dev Weekly newsletter mentioned on a podcast, I subscribed and describe my first issue as short, chatty, and full of useful links on Swift libraries and other topics. Following a link about SwiftUI Split View Configuration led me down a rabbit hole to a WWDC video...
I take a look at SF Symbols in SwiftUI, starting with how Image(systemName:) renders a symbol in code. I cover Apple’s SF Symbols app, which provides over 4000 symbols that work with the San Francisco font and can be scaled and coloured, and show how searching and previewing symbols there helps me pick ones that support a consistent, recognisable interface...
Impressions of a free compilation video from Sean Allen’s SwiftUI fundamentals course, which I find strong on explaining child views and layout stacks but note assumes existing Swift language knowledge. The later lessons on passing values into views speak to my own confusion about SwiftUI app structure and how views get redrawn, making the paid course tempting despite my already juggling several other learning resources...
I give an account of a Swift Playgrounds workshop for teachers, run by Matt Richards with support from Apple staff, which taught by having participants modify an existing app rather than starting from the basics. I relate that top-down approach to my own mix of structured courses (100 Days of SwiftUI, cs193p) and first-app building, noting it is engaging but that problems get complex quickly. I also touch on the value of having expert help on hand when self-teaching, and on borrowing ideas from the Playgrounds App Gallery’s example apps...
My notes on day 10 of the 100 Days of SwiftUI course, which covers structs. Having worked in languages where structs are just data containers, I find their methods and properties initially confusing — including a now-resolved question about the purpose of tuples — and demonstrate with sample code how structs are copied as value types while classes are passed by reference. I also note that SwiftUI sample code is built entirely from structs...
A short recommendation of the Fireside Swift podcast, an informal iOS development show where the hosts discuss a Swift topic each week. I prefer the early two-host episodes for getting to the topic faster and find the discussions well suited to listeners who already know other languages...
My Swift solution to an array-processing exercise: filtering even numbers out of an array of lucky numbers, sorting the remaining values in ascending order, mapping each one to a formatted string, and printing the results one per line using filter, sorted, and map...
GitHub’s web interface has no way to create an empty folder directly, but adding a file with a slash in its path (such as new-folder/README.md) creates the folder automatically, after which files can be dragged in as normal. The tip comes from a Zack West article on Alpharithms, which I link for a fuller explanation with pictures...