JPEG advantages: multiple image fusion, which you can’t get through RAW capture
RAW + JPEG capture support
Uses Adobe Digital Negative (DNG) format
Wide color capture
Display P3 (P3-D65) has the same gamma and white point as sRGB, so it’s more compatible than DCI-P3 (superset of sRGB)
420f (“full”) capture modes support wide capture
AVCaptureSession has an option to set wide capture automatically (won’t do it for videos)
Videos don’t do wide by default because most video playback software isn’t color managed
Shared photos are converted to Apple Wide Color Sharing Profile, where a custom profile is generated so the data can be stored as sRGB but converted back to P3 for color managed devices
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
Design goals
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
Architecture
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.