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.
Code Completion Club: https://codecompletion.io/jointheclubIndie App Spotlight, with a new app for you to check out:ToothFairy by Michael Tsai (@mjtsai): https://c-command.com/toothfairy/Fernando:Self Control: https://selfcontrolapp.com/YouTube premiumFernando’s Chess Clock: https://www.amazon.com/ajedrez-digital-temporizador-profesional-funci%C3%B3n/dp/B07M5RP9SC/ref=sr_1_4_sspaSeven Link: https://apps.apple.com/us/app/seven-7-minute-hiit-workout/id650276551Paul:Getting SleepAre you stuck?ExerciseAnalog: https://ugmonk.com/blogs/journal/analog-the-simplest-productivity-systemJournal: https://jamesclear.com/habit-journalSuperEasyTimer: https://apps.apple.com/us/app/super-easy-timer/id1353137878?mt=12MultiMarkdown Composer: https://multimarkdown.com/composer4/Doing ResearchSolid blocks of time to focus, Meditation with Calm: https://apps.apple.com/us/app/calm/id571800810Pomodoro method: https://todoist.com/productivity-methods/pomodoro-techniqueIntermittent Fasting app (Zero): https://www.zerofasting.comDocument your energySpencer:Taking napsCultivate the zoneHaving Music onReducing FrictionSpencer’s super-wide display: https://www.samsung.com/us/computing/monitors/gaming/49--odyssey-g9-gaming-monitor-lc49g95tssnxza/Financial motivationsBen:Have remindersKeeping main work in front of youSoundtracks are great for concentrationBatman soundtrack linkCyberpunk/FtL, PassengersKeeping things fresh with coding problemsA distraction you have control overNoise cancelling headphonesProtect your energy and timeDecision fatigueDimitri:Drift between interests to avoid burnoutBurnout anecdote: https://rattibha.com/thread/1388107620574171140?lang=enConcentrating in silenceUnderstand the problem well before diving inDimitri was wrong; Gluconeogenesis: https://en.wikipedia.org/wiki/GluconeogenesisAlso, 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:
Spencer CurtisBen GohlkeFernando OlivaresPaul SoltDimitri BouniolBe 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.