Читать книгу Английский для программистов. Как общаться в международных IT-командах - - Страница 5

Debugging and Troubleshooting Code (Отладка и устранение ошибок в коде)

Оглавление

Сегодня Даниил работает над исправлением ошибок в коде, который был написан несколько месяцев назад. Код не работает как нужно, и ему нужно выяснить, что именно вызывает проблемы. Он решает провести отладку и найти причину ошибок.


Даниил встретился с коллегой – Ирой, чтобы обсудить, как можно решить проблему. Вместе они ищут решение и проверяют логические ошибки в коде.


Диалог на встрече:


Ira:

«Hi, Daniil. I see that the code isn’t working correctly. Have you tried debugging it?»


Daniil:

«Yes, I’ve been looking through the logs. I found some errors, but I’m not sure what’s causing them yet.»


Ira:

«Let’s take a look at the error messages together. Sometimes it helps to understand what’s going wrong.»


Daniil:

«Good idea! The error seems to be in the user input validation section. I think it’s not handling some edge cases correctly.»


Ira:

«Ah, I see. Maybe we should add more checks for invalid input and test it again.»


Daniil:

«Yes, I’ll add the validation and test it thoroughly. I’ll also review the code for any potential memory leaks.»


Ira:

«Great! Let me know if you need any help with that.»


Daniil:

«Thanks, I will!»

Полезные фразы и выражения

Have you tried debugging it? – Ты пробовал отладить код?


Check the logs – Проверить логи.


Error message – Сообщение об ошибке.


What’s causing the error? – Что вызывает ошибку?


Take a look at the error messages – Посмотреть на сообщения об ошибке.


User input validation – Проверка данных, введённых пользователем.


Edge case – Крайний случай (необычная ситуация).


Add more checks – Добавить дополнительные проверки.


Test it thoroughly – Тщательно протестировать.


Memory leak – Утечка памяти.


Review the code – Проверить код.

Упражнения

1. Vocabulary Match:


Соедините английские фразы с их русскими эквивалентами:


Have you tried debugging it?


Check the logs


Edge case


Memory leak


Test it thoroughly


a) Утечка памяти

b) Проверить логи

c) Проверить код

d) Тщательно протестировать

e) Крайний случай


2. Fill in the blanks:


Заполните пропуски подходящими словами из списка:


«I’ll review the code and try to fix the ______.»


«We need to add more ______ to handle edge cases.»


«I found some errors in the ______, but the root cause is still unclear.»


«Make sure to ______ the code after adding new checks.»


(Answers: errors, validation, logs, test)


3. Translate the following sentences into English:


Я проверил логи и нашел несколько ошибок.


Мы должны добавить дополнительные проверки для обработки крайних случаев.


Не забудь тщательно протестировать код после внесения изменений.


4. Conversation Practice:


Практикуйте диалог с партнером или самостоятельно, используя фразы из главы. Один из вас будет играть роль Даниила, а другой – Иры. Пример:


Person 1 (Ira): «Daniil, have you looked at the error messages in the logs?»


Person 2 (Daniil): «Yes, I found some errors, and I think the issue is with the user input validation.»


Самопроверка:


Which of the following phrases means «checking the error messages»?


a) Add more checks


b) Test it thoroughly


c) Check the logs


What is an «edge case»?


a) A situation where the system works in an unexpected way


b) A situation where the system performs as expected


c) A situation where no errors occur


Choose the correct sentence in English:


a) «I’ll check the logs to find the issue in the code.»


b) «I’ll check the logs to find issue the code.»

Ответы

1. Vocabulary Match:

1 – e

2 – b

3 – e

4 – a

5 – d


2. Fill in the blanks:


«I’ll review the code and try to fix the errors.»


«We need to add more validation to handle edge cases.»


«I found some errors in the logs, but the root cause is still unclear.»


«Make sure to test the code after adding new checks.»


3. Translate the sentences:


I checked the logs and found some errors.


We need to add additional checks to handle edge cases.


Don’t forget to test the code thoroughly after making changes.


4. Self-Check:


c) Check the logs


a) A situation where the system works in an unexpected way


a) «I’ll check the logs to find the issue in the code.»

Английский для программистов. Как общаться в международных IT-командах

Подняться наверх