Member-only story
10 SPOOKY Swift Code review comments
Halloween?
2 min readOct 31, 2021
Here are 10 comments that I’ve seen in Swift code: Not one of the following examples passed their code review, but I think we can all learn something from the following comments.
Because today is fright night, I’ve decided to share these horrors with you in the hope that we can bury the scary and terrifying stories that lie below.
The Ghostly Comment
// Comment this code
Well done for that. You’re recursively using a comment like a TODO:
The TODO Buried in your Code
// TODO: Write TODO: Here
I know, you didn’t know what JIRA ticket number you were going to need. But, you know, you could write the ticket?
Ghostly repetition
import UIKit
// import UIKit
It’s probably to do with reflection or something.
Bring documentation back from the dead
// undocumented
That’s not quite what I meant
Your Colleagues will be Buried by THIS comment
// do nothing