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

Резултати

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

Търсене: #darkmatter

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

@cosmomyst · Post #545 · 08.12.2025 г., 12:21

🪐 The Hubble Space Telescope has helped reveal that most of the universe’s mass is invisible, made up of “dark matter”—an unknown substance detected only by its gravity, which bends light from faraway galaxies in a process called gravitational lensing. Even more mysterious is “dark energy,” discovered through distant supernovae in galaxies like Messier 81, which acts like a force pushing galaxies apart and causing the universe’s expansion to speed up, reshaping our entire understanding of the cosmos. ✨ #darkmatter⚡#darkenergy⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #672 · 10.02.2026 г., 22:21

🪐 The galaxy cluster CLASH J0152.7-1357, observed by both Hubble and ground-based telescopes, contains vast amounts of dark matter—an invisible substance revealed only by its powerful gravitational pull on galaxies and hot gas. Despite being undetectable by any normal telescope, dark matter outweighs the visible content in CLASH J0152.7-1357, shaping the cluster and allowing scientists to map where this mysterious material gathers in the cosmos. ✨ #darkmatter⚡#galaxycluster⚡#cosmos⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #712 · 15.03.2026 г., 22:21

🪐 The spiral galaxy NGC 3198, located about 47 million light-years away in the constellation Ursa Major, was a breakthrough in the study of dark matter. Scientists found that its outer stars orbit at roughly the same speed as those near the center, defying expectations unless there is an enormous amount of invisible dark matter—an unknown substance that adds gravity without emitting light—surrounding the galaxy like a cosmic halo. ✨ #darkmatter⚡#galaxies⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #652 · 31.01.2026 г., 22:21

🪐 In the Pinwheel Galaxy (Messier 101), astronomers have measured how its swirling arms rotate much faster than visible matter alone can explain. This strange speed points to dark matter—an invisible substance detected only by its extra gravity—outweighing normal stars and gas by up to six times, making Messier 101 a classic example of how much of the universe’s structure is hidden from our eyes. ✨ #darkmatter⚡#galaxies⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #562 · 16.12.2025 г., 22:21

🪐 In the spiral galaxy NGC 4921, astronomers have mapped out huge regions where most of the matter is invisible—made up of dark matter, a mysterious substance detected only by its gravitational effects on stars and gas. Despite being one of the most prominent galaxies in the Coma Cluster, NGC 4921 is surrounded by far more dark matter than visible material, highlighting just how much of the universe remains hidden from our telescopes. ✨ #darkmatter⚡#galaxies⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #388 · 07.10.2025 г., 18:21

🪐 The spiral galaxy NGC 4258, also known as Messier 106, contains strange spiral arms of gas that don't match the galaxy’s visible star pattern—these arms are thought to trace where dark matter, an invisible substance that makes up most of the galaxy's mass, is pulling in extra gas. By mapping the way the gas moves, astronomers use NGC 4258 as a real-world laboratory to study the hidden influence of dark matter in shaping entire galaxies. ✨ #darkmatter⚡#galaxies⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #467 · 30.10.2025 г., 12:21

🪐 The mysterious "dark flow" observed in the movement of galaxy clusters like Abell 3627 suggests that something unseen—possibly related to dark matter or dark energy—is pulling vast regions of the universe in the same direction. This large-scale motion, detected using X-rays from hot gas in clusters, remains unexplained by normal gravity and hints at the hidden forces shaping the cosmos beyond what we can directly observe. ✨ #darkmatter⚡#universe⚡#galaxyclusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #6 · 29.07.2025 г., 14:43

🌎 At the heart of the Sombrero Galaxy (M104), astronomers have detected an unusually massive concentration of dark matter, wrapped around a brilliant core of billions of stars. This hidden halo exerts a mysterious gravitational force, warping the galaxy’s structure and leaving its spiral arms edged with hauntingly luminous dust lanes. ✨ #SombreroGalaxy⚡#darkmatter⚡#mystery 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #590 · 30.12.2025 г., 12:21

🪐 In 2019, scientists mapped the "cosmic web" of the universe by measuring how galaxies like those in the Bootes Void are connected by invisible filaments of dark matter. These dark matter strands, which cannot be seen or touched, act as a hidden scaffolding—shaping where galaxies form and how giant cosmic structures grow across billions of light-years. ✨ #darkmatter⚡#universe⚡#filaments⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #745 · 18.04.2026 г., 22:21

🪐 In the galaxy cluster known as the Bullet Cluster (1E 0657-56), a cosmic collision has split ordinary matter—seen as hot X-ray gas—from invisible dark matter, which can only be traced by its gravity. By observing how light from background galaxies bends around the Bullet Cluster, astronomers have created detailed maps showing where dark matter gathers, making this system a real, visual proof that most of the universe’s mass is hidden and does not emit light. ✨ #darkmatter⚡#galaxies⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #504 · 17.11.2025 г., 22:21

🪐 Astronomers have measured that the Coma Cluster—a giant gathering of thousands of galaxies—stays held together by vast amounts of dark matter, an invisible substance that can't be seen but adds enough gravity to keep the cluster from flying apart. Despite all the stars and gas we observe, dark matter in the Coma Cluster outweighs everything visible by more than five times, showing how this hidden ingredient shapes the largest structures in the universe. ✨ #darkmatter⚡#galaxies⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #146 · 17.08.2025 г., 13:11

🪐 The spiral galaxy NGC 3198 has helped scientists map the mysterious effects of dark matter—a hidden substance that doesn't emit light, but has enough gravity to control how stars move far from the galaxy's center. By tracing the speeds of stars in NGC 3198’s outer edges, astronomers found they move much faster than visible matter alone can explain, revealing an invisible halo of dark matter wrapped around the galaxy. ✨ #darkmatter⚡#galaxies⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

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