Mastodon
Episode 44

The Biggest, Richest Child

00:00:00
/
01:06:30

August 31st, 2021

1 hr 6 mins 30 secs

Season 1

Your Hosts
Tags

About this Episode

Welcome to Code Completion, Episode 44! We are a group of iOS developers and educators hoping to share what we love most about development, Apple technology, and completing your code!

Follow us @CodeCompletion on Twitter to hear about our upcoming livestreams, videos, and other content.

Today, we discuss:

Also, join us for #CompleteTheCode and Compiler Error, two segments that test both your knowledge and our knowledge on Swift, Apple, and all things development!

Your hosts for this week:

Be sure to also sign up to our monthly newsletter, where we will recap the topics we discussed, reveal the answers to #CompleteTheCode, and share even more things we learned in between episodes.

You are what makes this show possible, so please be sure to share this with your friends and family who are also interested in any part of the app development process.

Sponsor

This week's episode of Code Completion is brought to you by Pennant. Go to https://apps.apple.com/app/apple-store/id622463230?pt=1765080&ct=CodeCompletion&mt=8 today to check it out!

Complete the Code

Why is this SwiftUI code not advisable, and how can you fix it?

// Why is this SwiftUI code not advisable, and how can you fix it?
var body: some View {
    if isLoggedIn {
        Text("You are logged in!")
    } else {
        Text("You must first log in!")
    }
}

Be sure to tweet us with hashtag #CompleteTheCode if you know the answer!

Compiler Error

This week's Compiler Error has a theme: Git commands!
1 - git whatchanged --since="2 weeks ago" will show a log of commit messages that have been made since 2 weeks ago.
2 - git add -p will allow you to stage hunks of code interactively from the command line.
3 - git worktree add allows you to checkout a specific branch to a separate directory.
4 - git grog generates an ascii-art graphical log showing branch points leading up to the current commit.