Mastodon
Episode 41

Humans are Weird

00:00:00
/
01:11:55

August 10th, 2021

1 hr 11 mins 55 secs

Season 1

Your Hosts
Tags

About this Episode

Welcome to Code Completion, Episode 41! 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 Weekly Swift Exercises. Go to https://mailchi.mp/hey/weekly-swift-exercise-signup today to subscribe!

Complete the Code

What could potentially go wrong with this particular error handling code?

// What could potentially go wrong with the code below?
NSError *theError;
BOOL result = [anObject doSomethingThatCanFailWithError:&theError];

if (theError) {
    NSLog(@"The operation failed! %@", theError);
}

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

Compiler Error

This week's Compiler Error has a theme: Blast from the past!
1 - Swift Literals: Although Dictionaries prohibit it, ExpressibleByDictionaryLiteral allows for multiple entries with the same key.
2 - Emacs key bindings in Cocoa: You may know of the ⌘⌫ command to delete the entire line to the left of the text cursor, but ⌃K can be used to delete the line to the right of the text cursor.
3 - Objective-C method names in the iOS SDK: convolveWithDestination:tempBuffer:sourceOffsetToRegionOfInterestX:sourceOffsetToRegionOfInterestY:kernel:kernelHeight:kernelWidth:divisor:backgroundColor:options: is one of many related Objective-C methods in the Accelerate framework for manipulating images.
4 - Unicode names for Mac modifier keys: Located between the control and command keys on the keyboard, the option key is unoriginally called OPTION KEY in the unicode specification, but was also known as the “closed apple key” on Apple II series computers.