Local reasoning: just look at the code in front of you, don’t have to think about the context (what is the rest of the code in the program doing)
Model layer: use struct to store and pass information about dreams
Views: layout code is just math, so put it into a struct. The UITableViewCell subclass will hold a Layout and use it to calculate stuff
Easier to write unit tests against the layout algorithm when it’s not part of a UIView subclass
Want the layout class to work with unrelated types? Get polymorphism from a protocol so you can take both UIView and SKNode
“Customize through composition rather than inheritance” – don’t have to think about what superclasses & subclasses are doing
Put all your model structs into a Model object, and set it on the view controller. When updating the model, diff the model and apply changes to the view.
Unified Logging and Activity Tracking
Unify kernel and user mode logging into one system
Collect a lot of information with minimum cost, by deferring work away from log time
Can we turn a ton of logging on all the time, instead of increasing the logging after a problem happens?
New console app
Track an activity as it’s passed through different proceses
New file formats
Log database format is .tracev3 – no longer text, so need to use Apple’s tools instead of grep
.logarchive for sharing the logs
On a fault or error, in-memory logs are collected and preserved in special log files
Logs are written to memory shared with the logd daemon, or messages are IPC’d to diagnosticd for realtime streaming
Thanks for reading! If you’re enjoying my writing, I’d love to send you infrequent notifications for new posts via my newsletter. You’ll receive the full text of each post, plus occasional bonus content.