Category: Posts
-
MVVM Explained
The first nine minutes of this video from Emmanuel Okwara finally gave me a clear understanding of the difference between MVC and MVVM. In both MVC and MVVM the data & logic (Model) are separated from the part that the user interacts (View). Usually the View is a screen with controls and so on, but…
-
Oh My Zsh
I’ve been playing in the zsh shell since I started on the Missing Semester, and was wondering how to get my git branch name in the prompt. A few googles later, I’ve installed Oh My Zsh, and added the git and macos plugins. Pretty.
-
Missing Semester
On my git odyssey yesterday, I came across which is an MIT class for CS about practical things CS students don’t strictly need for their degree, but will greatly benefit from. I was interested in their git introduction, but they explain the course by saying: Videos of the lectures, and all the course notes and…
-
Chris Lattner
Thank you YouTube algorithm for this recommendation – Chris Lattner, the main author of Swift (amongst other things including LVM) chatting with Lex Fridman. Ignore the clickbait title. There is a good, brief discussion about the tradeoffs in value vs references types which is a topic I’ve been thinking a bit about this week. Also…
-
Retain Cycle
Variables and constants in Swift can be a value type (their data is copied when they are copied) or a reference type (a pointer to the data is passed when they are copied. Structs, integers, and enums are value types, classes are reference types. Memory management of value types is relatively straightforward – there’s a…
-
Bump One
Most of the things I’ve learned so far have been familiar, interesting, or cool – but now I’ve ventured far enough into the Swift Language Programming book to find something that is definitely going to take a couple of readings to piece together. I was surprised, then pleased with functions as first class types, and…
-
Unwrap
Unwrap is the Paul Hudson app for Swift learning. It’s good for using those three minute gaps in life to digest a concept. I’ve incorporated it into my goals, as some days its the only progress I make.
-
Xcode Refactor/Rename
This is cool. You can right click on a variable (and I guess any other) name and change it everywhere. No more tedious search and replace.
-
@ScaledMetric
I solved the problem (well, I googled a stackoverflow result to the problem) in the previous post about the different heights of the SF Symbols. The answer was to put them in a frame and lock the height. A problem that then arises from that is that when the user changes the text size, they’ll…
-
Memorise Assignment 1
A small milestone achieved – I’ve completed the first assignment from the CS193p lecture series – some minor changes to the app being built in the lectures. There was a couple of things I was unhappy with: The text under the SF Symbols you can see in the preview above not being vertically aligned. Having…