TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #721 · 26.12

Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области. Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него. "Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!" Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее. Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то. С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше. Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс. В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков. #dev

Hashtags

Резултати

Намерени 13 подобни публикации

Търсене: #ecosystems

当前筛选 #ecosystems清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #643 · 28.08.2025 г., 03:22

🌎 Entering the massive Krubera Cave in Georgia is like descending into another world—at over 2,197 meters deep, it’s the deepest known cave on Earth. These underground labyrinths feature rivers, waterfalls, and unique blind creatures, revealing entire ecosystems hidden from sunlight. ✨ #geology⚡#caves⚡#ecosystems 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #630 · 26.08.2025 г., 00:22

🌎 From blazing deserts to frozen poles, Earth's extreme climate zones push life to its limits. In polar regions, temperatures plunge below -50°C, creating icy landscapes where only the hardiest animals, like penguins and polar bears, survive. Meanwhile, equatorial deserts like the Sahara reach scorching highs over 50°C, supporting unique plants and animals adapted to relentless heat. These climate extremes shape our planet’s most remarkable ecosystems and inspire some of nature’s wildest survival strategies. ✨ #climate⚡#ecosystems⚡#adaptation 👉subscribe Interesting Planet ​

Amazing Geography 🌍

@amazingeo · Post #542 · 28.12.2025 г., 20:31

🌍 The Serengeti savanna in Africa hosts one of the world’s largest mammal migrations—zebras cross first, followed by wildebeest, each group timing their journey to feed on different heights of grass. ✨ #savanna⚡#migration⚡#ecosystems⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #583 · 20.01.2026 г., 20:31

🌍 Africa’s Miombo savanna covers over 2.7 million square kilometers—about the size of Argentina. Its woodlands support hundreds of unique butterfly species found nowhere else on Earth. ✨ #savanna⚡#grasslands⚡#ecosystems⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #927 · 17.10.2025 г., 22:11

🌎 Hidden off the Pacific coast of California, the Point Dume Submarine Canyon plunges over 800 meters deep just a short distance from shore. Scientists have discovered mysterious methane seeps and rare deep-sea corals within the canyon. These underwater features support unique ecosystems not found anywhere else nearby. ✨ #ocean⚡#canyon⚡#ecosystems 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #589 · 19.08.2025 г., 16:22

🌎 Some bamboo species can grow up to 91 centimeters in a single day, making bamboo one of the fastest-growing plants on Earth. This rapid growth helps bamboo quickly regenerate after being harvested and provides vital habitats for many animals. ✨ #botany⚡#speed⚡#ecosystems 👉subscribe Interesting Planet

Interesting Planet 🌍

@interesting_planet_facts · Post #484 · 02.08.2025 г., 03:22

🌎 Deep in the Congo Basin, the African rainforest elephant forges secret trails through dense jungle, creating “elephant highways” that other animals use. These hidden paths help shape entire forest ecosystems by opening routes for seed dispersal and wildlife movement. ✨ #rainforest⚡#elephants⚡#ecosystems 👉subscribe Interesting Planet

Amazing Geography 🌍

@amazingeo · Post #647 · 25.02.2026 г., 20:31

🌍 Submarine hydrothermal vents on the ocean floor release superheated water and minerals, fueling unique ecosystems powered by chemical energy instead of sunlight. ✨ #processes⚡#ocean⚡#ecosystems⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #466 · 30.07.2025 г., 13:22

🌎 In the dry canyons of the American Southwest, cryptobiotic soil forms a living crust of bacteria, fungi, and lichens. This fragile layer stabilizes desert soil and helps seeds germinate, supporting entire ecosystems in these harsh climates. ✨ #desert⚡#microbiology⚡#ecosystems 👉subscribe Interesting Planet

Amazing Geography 🌍

@amazingeo · Post #280 · 21.09.2025 г., 22:31

🌍 Some deep-water corals build reefs in cold, dark oceans thousands of meters below the surface. Unlike tropical reefs, these cold-water reefs thrive without sunlight or warm water. ✨ #coral⚡#marine⚡#ecosystems⚡#ocean⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #223 · 12.09.2025 г., 13:12

🌍 The highest forests on Earth grow above 4,900 meters in the Andes, where trees survive thin air, cold temperatures, and strong sunlight—an extreme zone where biosphere meets atmosphere and lithosphere. ✨ #spheres⚡#Andes⚡#ecosystems⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Interesting Planet 🌍

@interesting_planet_facts · Post #619 · 24.08.2025 г., 03:22

🌎 The tuco-tuco, a South American rodent, lives almost its entire life underground. It digs vast tunnel networks with specialized teeth, rarely surfacing except to gather food. Its burrowing helps aerate soil, making tuco-tucos quiet but essential ecosystem engineers. ✨ #rodents⚡#ecosystems⚡#burrowing 👉subscribe Interesting Planet ​

12
ПредишнаСтр. 1 от 2Следваща