- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Don't write magic numbers in your code!
Magic Numbers are constant values that are hardcoded into your code. This is considered bad practice as you have a random number hardcoded into your code can lead to a developer being confused. What does that number really mean? Also, if you are using that constant in multiple places, and that constant value is now going to change, you are going to have to change that value in multiple places as well. Instead, what you should do is create a constant variable with a meaningful name, that represents your constant. This way, in your code, it will be much clearer as to what the constant value really represents and give you single point of control over change, so that if you ever wanted to change that constant value, you just have to change it once.
#shorts
Видео Don't write magic numbers in your code! канала CSExplained
#shorts
Видео Don't write magic numbers in your code! канала CSExplained
Комментарии отсутствуют
Информация о видео
11 марта 2023 г. 4:00:02
00:01:00
Другие видео канала




















