CodeCompletion.io

Episode 41: Humans are Weird

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.

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.

⭐️ This Week's Topics

  • Ben:
    • Have reminders
    • Keeping main work in front of you
    • Soundtracks are great for concentration
    • Batman soundtrack link
    • Cyberpunk/FtL, Passengers
    • Keeping things fresh with coding problems
    • A distraction you have control over
    • Noise cancelling headphones
    • Protect your energy and time
    • Decision fatigue
  • Dimitri:
    • Drift between interests to avoid burnout
    • Burnout anecdote
    • Concentrating in silence
    • Understand the problem well before diving in
    • Dimitri was wrong; Gluconeogenesis

🚧 #CompleteTheCode

This week's #CompleteTheCode:

What could potentially go wrong with this particular error handling code?
1
2
3
4
5
6
7
// 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 theme: Blast from the past!

  1. Swift Literals: Although Dictionaries prohibit it, ExpressibleByDictionaryLiteral allows for multiple entries with the same key.
  1. 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.
  1. Objective-C method names in the iOS SDK: convolve­With­Destination:temp­Buffer:­source­Offset­To­Region­Of­InterestX:­source­Offset­To­Region­Of­InterestY:­kernel:­kernel­Height:­kernel­Width:­divisor:­background­Color:­options:­ is one of many related Objective-C methods in the Accelerate framework for manipulating images.
  1. 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.

🎁 Sponsor

This week's episode of Code Completion is brought to you by JohnnyB's Bon Voyage eCommerce App course. Visit bon-voyage.app/course and be sure to follow Bon Voyage's instructor @jonnybcodes on Twitter to learn more and stay up to date with all his courses!

📹 Watch the Stream