Days 1 to 12 of the “100 Days of Swift” course make up the “Introduction to Swift” section.
Day 12‘s lesson covered optionals, unwrapping, and typecasting. Day 12 is divided into 10 sections with a section 11 being the lesson summary.
Another day of unplanned events this week changed my normally scheduled work routine, which also reduced my regularly scheduled Swift study time. Some Swift study is better than none and I managed to do 1 hour 15 minutes of actual study time.
Thoughts about Day 12
I revisited section 6 on nil coalescing and completed section 7 on optional chaining. For section 6 on nil coalescing I got a better understanding of that section after watching the video, doing the Optional reading, and doing the section Test a second time.
I found section 7 on optional chaining easy to understand the first time going through the section’s material.
Tomorrow I expect the return of my normally scheduled work routine, which means I also expect to finally complete for Day 12 the watching of all its videos, reading of all its video transcripts, and manually entering all of the code examples and executing them.
The background music for today’s study session was streamed from YouTube and titled “Focus Music, Relaxing Jazz Piano Radio – Slow Jazz Music – 24/7 Live Stream – Music For Work & Study
My Day 12 (part 3 of 4) notes taken from my paper notebook
- Nil coalescing
- Nil coalescing unwraps an optional and returns the value inside if there is one. If there isn’t a value (i.e. the optional was nil) then a default value is used.
- reading a dictionary key will always return an optional.
- Optional chaining
- Optional chaining lets us dig through several layers of optionals. If any one of those layers fails then the entire code lines become nil.
- from Optional reading, there is an article by Andy Bargh to watch after may Day 12 work is completed.
Today’s total study time: 1 hour 15 minutes
100 Days of Swift cumulative study time: 35 hours 15 minutes
[Note: those are actual study time values after subtracting break-time minutes from the Day’s study session]