where clauses & value binding

where clauses & value binding

  • C4Q tutor: Uh uh, no.
  • Me: [starting a new exercise, scrolling back to look at previous answers] 😳
  • C4Qt: Don't do that. Don't scroll back to look at previous exercises for syntax clues.
  • Me: πŸ˜“ Bad habit?
  • C4Qt: Well, you won't always have exercises to look back to.
  • Me: πŸ™‡

Little moments like that make office hours immensely valuable. There were also a few times I asked "How do I...?" regarding something we'd already covered and got a "I'm not telling you." Sitting with those moments of struggling to remember what I needed to know really helped cement concepts like where clauses, which was exactly what I came to the office hours for. Shout out to tutor Jason.

Speaking of where clauses in Swift:

var hoursOfSleepAchievedAndHomeworkCompletion = (5, true)
switch hoursOfSleepAchievedAndHomeworkCompletion {
case let (hoursOfSleepAchieved, homeworkCompletion) where hoursOfSleepAchieved > 4 && homeworkCompletion == true :
print ("Statement cannot resolve to true when commuteTime >= 2 hours.")
case let (hoursOfSleepAchieved, homeworkCompletion) where hoursOfSleepAchieved < 4 && homeworkCompletion == true :
print("Burning that midnight oil for Learning!")
case let (hoursOfSleepAchieved, homeworkCompletion) where hoursOfSleepAchieved < 4 && homeworkCompletion == false :
print("Stop procrastinating!")
case let (hoursOfSleepAchieved, homeworkCompletion) where hoursOfSleepAchieved > 4 && homeworkCompletion == false :
print("Feels good up to and until timeUntilHomeworkIsDue == 0")
default :
print("How's that homework comin'?")

The above feels more true than it is literally true, but I put in an 11 hour day (not counting commute time and including office hours) today, so that was my inspiration. Writing out this code actually helped reinforce what I learned today, too. Plus it felt like making something and after 8 hours of mostly theory and lecture that feels great!

Lastly, Twitter alerted me to this really interesting article on creating inclusive tech curricula for folks of color by Tiffany Mikell for Model View Culture. I really enjoyed when it talked about cognitive science and better ways to learn. Relationships are so important. I feel so lucky to be with the people in Access Code; everyone's been so friendly and there's a real "we're all in this together" feeling that not only brings on the warm fuzzies but apparently helps me learn things, too!

fallthrough & overflow

fallthrough & overflow

Insomnia & String Interpolation

Insomnia & String Interpolation