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

Резултати

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

Търсене: #deepsea

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

@interesting_planet_facts · Post #1352 · 25.03.2026 г., 12:11

🌎 Far below the surface, the deep ocean is home to rare animals like the gulper eel, which can expand its mouth wide to swallow prey whole. The giant squid, once considered a sea monster, can reach lengths up to 13 meters and uses long tentacles to catch fish and other deep-sea creatures. ✨ #ocean⚡#animals⚡#deepsea 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1314 · 24.02.2026 г., 22:11

🌎 Deep below the ocean’s surface, the barreleye fish (Macropinna microstoma) has a transparent, dome-shaped head that lets it look upward through its own skull. Its tubular eyes can pivot inside the head to spot prey above, and the fish lives at depths of 600 to 800 meters off the Pacific coast of North America. ✨ #ocean⚡#animals⚡#deepsea 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1151 · 21.12.2025 г., 22:11

🌎 In the deep ocean, the frilled shark is one of the rarest living sharks, with an eel-like body and 300 trident-shaped teeth. It lives at depths of 500 to 1,500 meters and was first described in 1884. ✨ #deepsea⚡#animals⚡#ocean 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #849 · 02.10.2025 г., 20:11

🌎 The vampire squid lives 2,000 to 3,000 meters deep, where sunlight never reaches. It uses filaments to sense drifting food, not for hunting. Despite the name, it doesn’t suck blood—its dark color and cape-like web inspired the name. This rare cephalopod has the largest eyes relative to body size in the animal kingdom. ✨ #ocean⚡#animals⚡#deepsea 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #816 · 26.09.2025 г., 12:11

🌎 Some deep-ocean animals are so rare that they’re known from only a few specimens. The barreleye fish, for example, has a transparent head and tubular eyes that point upward to spot prey above. It’s found at depths of 600 to 800 meters and can rotate its eyes inside the skull to look forward or up. ✨ #deepsea⚡#animals⚡#ocean 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #719 · 09.09.2025 г., 20:22

🌎 Far below the ocean’s surface, the dumbo octopus glides using ear-like fins on its head. This rare deep-sea animal lives at depths of 3,000 to 4,000 meters and grows up to 30 centimeters long. ✨ #ocean⚡#animals⚡#deepsea 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1125 · 13.12.2025 г., 12:11

🌎 In the midnight zone over 1,000 meters deep, the comb jelly Bathocyroe fosteri drifts through pitch-black water. Its transparent body is nearly invisible, but rows of cilia beat in waves, scattering light like a rainbow. Researchers first collected specimens near the Bahamas in the 1980s. ✨ #deepsea⚡#animals⚡#biodiversity 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #661 · 31.08.2025 г., 03:22

🌎 Shrouded in darkness, the “midnight zone” of the ocean lies below 1,000 meters, where sunlight can’t reach and pressure crushes like a dozen elephants. Creatures here glow with bioluminescence and withstand freezing cold, revealing how life adapts to our planet’s most mysterious depths. ✨ #ocean⚡#bioluminescence⚡#deepsea 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1215 · 12.01.2026 г., 12:11

🌎 Vampire squid live more than 2,000 meters below the ocean’s surface, where sunlight never reaches. This deep-sea animal uses long, webbed arms and blue bioluminescent light to confuse predators. Vampire squid can survive with very little oxygen, thriving in one of the planet’s most extreme habitats. ✨ #oceanlife⚡#deepsea⚡#animals 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1182 · 01.01.2026 г., 18:11

🌎 The barreleye fish, found at depths up to 800 meters, has a transparent head that lets its tubular eyes rotate upward to spot prey. Its eyes can point forward or straight up, helping it see bioluminescent animals in the dark. The barreleye reaches about 15 centimeters in length. ✨ #deepsea⚡#animals⚡#fish 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #750 · 14.09.2025 г., 18:22

🌎 The fangtooth fish prowls ocean depths over 5,000 meters below the surface. Its oversized teeth are so long they can’t fit in its mouth, forcing the fish’s brain to sit lower in the skull. Despite its fearsome appearance, this deep-sea predator rarely grows longer than 18 centimeters. ✨ #ocean⚡#deepsea⚡#fish 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #785 · 20.09.2025 г., 03:22

🌎 Giant isopods, distant relatives of the common pillbug, inhabit the deep ocean at depths exceeding 500 meters. These armored scavengers can reach up to 50 centimeters in length, surviving on the remains of dead sea animals that sink to the seafloor. ✨ #oceanlife⚡#deepsea⚡#biodiversity 👉subscribe Interesting Planet ​

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