Episode 5

Emacs Should Die a Fiery Death


September 8th, 2020

1 hr 16 mins 48 secs

Season 1

Your Hosts

About this Episode

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

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

Today, we discuss:

  • When to rewrite a project from scratch, when to buckle down and conquer technical debt, and when to do a little something in between
  • The importance of documenting code, and how the lack of documentation stifles newcomers from becoming established developers

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.


This week's episode of Code Completion is brought to you by Not Phở. Search for Not Phở on the iOS and macOS App Stores today to give it a try.

Complete the Code

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

Review the following code — what might the developer have overlooked?

class DateCell: UITableViewCell {

    private static let dateFormatter: DateFormatter = {
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = "YYYY-MM-dd"
        return dateFormatter

    var date: Date? {
        didSet {
            switch date {
            case .some(let date):
                textLabel?.text = Self.dateFormatter.string(from: date)
            case .none:
                textLabel?.text = "N/A"

### Compiler Error

The theme for this week is Emacs key bindings in Cocoa:

  1. Although the same can be done using modifier and arrow keys, the text cursor can be quickly moved to the beginning and to the end of a document by using ⌃A to go to the beginning, and ⌃Z to go to the end.

  2. 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. Available as an alternate clipboard, ⌃K and ⌃Y represent the kill and yank operations that let you cut and copy text without overriding your main clipboard. The clipboard they use is called the kill ring.

  4. ⌃T is a useful command for transposing two letters that were typed out of order, by flipping the characters on each side of the text cursor.

Can you spot which one is the Compiler Error?