Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

“How do you think when writing tests?” – It’s simpler than you may think

Автор: Essential Developer

Загружено: 2018-11-01

Просмотров: 9232

Описание:

★ Register Now to Our Free iOS Career Course! https://www.essentialdeveloper.com/co...

Subscribe to our channel: https://www.youtube.com/essentialdeve...

In this episode, we reply to an important question raised by a member of our community.

► Question

“I'm trying to understand how you think when writing tests. Do you just try to cover everything that comes to mind or you have some kind of list with priorities? Or you just try to reach max possible coverage?”

► Answer

We follow the basics. Our main process is to write the test first, see the test fail (red), then write the minimum amount of code to make the test pass (green), then refactor the code/test if needed. By following this process, we end up with pretty high coverage (not always 100% but very close to it). The coverage is not a direct goal. The coverage is more like a positive side effect of following the process.

With that said, it requires discipline and skill to always write the test first. You may get stuck in the beginning. We've been doing this for many years, and we still get stuck sometimes! However, the goal is never to be stuck for long. It's wasteful. At the end of the day, shipping is more important than testing first.

When you're stuck, spike some ideas. Go free, without tests (or anything else) in your way. Play with the code (Xcode Playgrounds, Swift REPL, Debugging...) until you're unstuck and found the solution you are happy with. Then think, "now that I know what I want to build, how could I have written the test first?"

When you have the answer, you can discard the spiked solution (commit the spike solution into a separate spike branch), and start fresh, by writing the test first. Next time you have to solve a similar problem, you know how to do it test-first without spiking.

We practice, learn, and get a little bit better every day. The daily practice compounds!

★ Professional iOS Engineering

Take your skillset to the next level and boost your career https://www.essentialdeveloper.com/pr...

★ Download our new app

You can download Neat Trivia from the App Store today at https://itunes.apple.com/app/id125311....

Connect with us on:

• Website: https://www.essentialdeveloper.com
• Twitter:   / essentialdevcom  
• Facebook:   / essentialdeveloper  

“How do you think when writing tests?” – It’s simpler than you may think

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Careful With “Singleton” Lookalikes (WAY TOO COMMON)

Careful With “Singleton” Lookalikes (WAY TOO COMMON)

Я вернул себе фокус (вот, что реально сработало)

Я вернул себе фокус (вот, что реально сработало)

Unit- тестирование для iOS-разработчика в Xcode — Mad Brains Техно

Unit- тестирование для iOS-разработчика в Xcode — Mad Brains Техно

Что я реально делаю как Data Scientist в США за $410.000/год

Что я реально делаю как Data Scientist в США за $410.000/год

Many Advanced Developers Forget This

Many Advanced Developers Forget This

Самая сложная модель из тех, что мы реально понимаем

Самая сложная модель из тех, что мы реально понимаем

Я в опасности

Я в опасности

Unit Testing in iOS

Unit Testing in iOS

Composable Code Can Be Simple – Intro to dependency diagrams and composition

Composable Code Can Be Simple – Intro to dependency diagrams and composition

How safe are Swift structs?

How safe are Swift structs?

Цепи Маркова — математика предсказаний [Veritasium]

Цепи Маркова — математика предсказаний [Veritasium]

Модульное тестирование в iOS с помощью XCTest

Модульное тестирование в iOS с помощью XCTest

I'm new to testing in Laravel (Watch me learn)

I'm new to testing in Laravel (Watch me learn)

#1 Reason Why You Don’t Improve As a Software Developer

#1 Reason Why You Don’t Improve As a Software Developer

Decomposing Swift code into modules – Intro to modular design

Decomposing Swift code into modules – Intro to modular design

Если у тебя спросили «Как твои дела?» — НЕ ГОВОРИ! Ты теряешь свою силу | Еврейская мудрость

Если у тебя спросили «Как твои дела?» — НЕ ГОВОРИ! Ты теряешь свою силу | Еврейская мудрость

Unit Testing a SwiftUI application in Xcode | Advanced Learning #17

Unit Testing a SwiftUI application in Xcode | Advanced Learning #17

Are Singletons Bad

Are Singletons Bad

Почему простые числа образуют эти спирали? | Теорема Дирихле и пи-аппроксимации

Почему простые числа образуют эти спирали? | Теорема Дирихле и пи-аппроксимации

ИНТЕРНЕТ 2026: Смерть VPN, Белые списки и режим Интранета. Системный анализ конца сети

ИНТЕРНЕТ 2026: Смерть VPN, Белые списки и режим Интранета. Системный анализ конца сети

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com