Author of iOS Unit Testing by Example. Technical coach, ex-Industrial Logic. Over 20 years of #TDD. Code with joy, drive down your cost of change. he/him
Posts
You have a Swift optional value. How can you write an XCTest assertion to verify it, while getting the most from any assertion failures? The answer is: "It depends." https://qualitycoding.org/unit-test-optionals-swift/
🙈 You wouldn't ship backend code without tests. Why are we shipping SwiftUI without unit tests? Let's fix that. https://qualitycoding.org/swiftui-tdd-first-failing-test-part-1/ #TDD
Released new version of Discovery Tree skill. Thanks to @GaryAsh@iosdev.space for the contributions! https://github.com/jonreid/DiscoveryTreeSkill
From Zero Tests to TDD: Your SwiftUI Testing Journey Starts Here 👣 https://qualitycoding.org/swiftui-tdd-first-failing-test-part-1/ #SwiftUI
As I set AI loose on a refactoring, I remind it: "move in small steps running tests frequently"
Mocks often make unit tests easier to write. But how do we mock, when Swift is strict about types? The trick is to use Swift's protocols and extensions. https://qualitycoding.org/swift-mocking/
🧪 TDD + ViewInspector: Writing Your First Failing SwiftUI Test https://qualitycoding.org/swiftui-tdd-first-failing-test-part-1/ #iOSDev
"Recognizing Code that Resists Unit Testing"
Developers writing for Apple platforms often struggle with unit testing. "Here is my code. I don't see how to write a unit test for it." When this happens, the code is trying to raise a red flag about its design. There's something about it that resists testing. In this talk, you'll learn what kinds of dependencies make testing difficult and what to do about them. https://www.youtube.com/watch?v=FFk583ZtGd8
🧪 TDD + ViewInspector: Writing Your First Failing SwiftUI Test https://qualitycoding.org/swiftui-tdd-first-failing-test-part-1/ #TDD
What if there were a way to get feedback on your code every time you compiled? Find problems in code more quickly by taking your Xcode warnings to the max. https://qualitycoding.org/xcode-warnings/
Another! This is one we learned from me reading Turn the Ship Around! at Industrial Logic:
- Stating intent: "I'm going to do this thing" for clear communication while allowing for possible counterpoint.
I also observe many safety measures, and not just for the little ones.
- Physical/mental/emotional safety: "You're exhausted. I'll take over, go take a break."
- Inclusion: "Are you okay with this?"
- Frequent confirmation: "Do you understand what I said?"
My household, overrun by the grandkids, is more agile/lean than your team. And that's mainly due to my wonderful wife. I observe:
- Frequent check-ins: "How are you doing? Is there anything I can do to make your life easier?"
- Frequent evaluation: "Is this working? How can it be better?"
- Frequent adaptation: "Well, this is the direction things are going, so let's change our approach."
- Constant tidying to keep up with constant chaos. (That's my specialty.)
@JayBazuzi@mastodon.online I am guessing:
- Adjacent lines should feed into one outcome
- If they don’t, why are they living in the same space?
@jenniferplusplus@hachyderm.io I still can’t shake the most memorable coding style guide I encountered 25 years ago. It started:
In ancient times, people believed that if you could call something by its True Name, you would have power over it. Don’t laugh!
🌟 I'm on the Job Hunt! 🌟
Two decades of experience with Objective-C + Swift.
iOS developer: I've worked on apps for Fortune 100 companies.
Author of iOS Unit Testing by Example: I'm a leading expert in iOS unit testing, refactoring, and TDD.
Technical agile coach: I know how to ship value sooner, increase flow, reduce waste, and level up developer skills.
Remote work for 7 years: I know how to have closer collaboration remotely than most teams have in-office.
Please boost for reach.