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

Резултати

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

Търсене: #clusters

当前筛选 #clusters清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #536 · 03.12.2025 г., 22:21

🪐 Some of the most unusual stars in the universe are "blue stragglers," like those found in the globular cluster M30. Blue stragglers appear younger and hotter than neighboring stars in their ancient cluster, likely because they formed when two stars merged or stole material from a companion—making them stand out as apparent "youngsters" among a population of stellar elders. ✨ #stars⚡#mergers⚡#clusters⚡#nasa⚡#galaxy⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #610 · 08.01.2026 г., 22:21

🪐 The galaxy cluster Abell 2142, located over 1 billion light-years away, is home to one of the largest shock waves ever spotted in the universe—a cosmic "sound wave" stretching millions of light-years through intergalactic gas. This shock wave, observed in X-ray light, is created as entire clusters of galaxies collide and merge, causing hot gas to ripple and heat up on truly enormous scales. ✨ #phenomena⚡#galaxies⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #433 · 16.10.2025 г., 18:21

🪐 The James Webb Space Telescope has detected the earliest-known galaxy cluster, named "El Gordo," not as it appears today but as it looked over 10 billion years ago, still forming in the young universe. Webb’s powerful infrared vision allowed astronomers to spot dozens of galaxies caught in the act of merging, giving us a rare glimpse into how the first massive clusters assembled from smaller groups billions of years before our Milky Way even existed. ✨ #galaxies⚡#clusters⚡#webb⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #128 · 13.08.2025 г., 20:11

🪐 In the southern constellation Norma, the galaxy cluster Abell 3627 glows with "radio relics"—giant arcs of radio emission stretching millions of light-years across space. These relics are formed by shock waves traveling through the cluster’s hot gas, energizing particles to near-light speeds, and producing mysterious, ghostly signals that light up the cosmic web between galaxies. ✨ #phenomena⚡#clusters⚡#radio⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #451 · 24.10.2025 г., 12:21

🪐 In 2011, researchers using the Chandra X-ray Observatory observed the galaxy cluster Abell 2029, where the massive central galaxy produces a ripple in the hot gas around it—a direct result of gravitational space-time distortion. The giant mass of the galaxy and its dark matter bends and stretches space, allowing astronomers to map how real, invisible warps affect the X-rays we detect, turning clusters like Abell 2029 into natural laboratories for exploring the true shape of space itself. ✨ #wormholes⚡#spacetime⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #214 · 03.09.2025 г., 03:11

🪐 In the galaxy cluster Abell 1689, astronomers have observed light from distant galaxies being bent and stretched in strange ways—a real effect called "gravitational lensing." This phenomenon is caused when a huge mass, like the dense collection of galaxies in Abell 1689, distorts space-time itself—warping the paths of light and creating the illusion of arcs, rings, or even multiple images of the same object in the sky. ✨ #spacetime⚡#lensing⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #384 · 06.10.2025 г., 20:21

🪐 Located in the constellation Centaurus, the galaxy NGC 4696 is surrounded by ghostly, thread-like filaments of cool gas that twist and loop for tens of thousands of light-years. These strange structures glow softly as they snake through the much hotter, X-ray-bright plasma of the galaxy cluster core, and scientists believe they are shaped by magnetic fields and slow, turbulent flows—creating some of the most fantastical patterns seen in the cosmos. ✨ #phenomena⚡#filaments⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #265 · 13.09.2025 г., 13:11

🪐 In the galaxy cluster Abell 2142, astronomers have observed gigantic, invisible boundaries called "cold fronts"—enormous walls of gas as hot as tens of millions of degrees, yet sharply separated from even hotter regions. These fronts, stretching over hundreds of thousands of light-years, form as entire clusters of galaxies collide, creating strange, ripple-like patterns in the vast cosmic gas and revealing the hidden weather of the universe on unimaginable scales. ✨ #phenomena⚡#clusters⚡#gas⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​