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

Резултати

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

Търсене: #spacetime

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

@cosmomyst · Post #506 · 18.11.2025 г., 22:21

🪐 At the center of the elliptical galaxy Abell 2261, astronomers discovered one of the largest galactic cores ever observed—so vast and diffuse that it raised the question of whether a supermassive black hole had vanished from sight. This mysterious "missing black hole" has led scientists to wonder if extreme interactions in this galaxy could have warped space-time so severely that the black hole—and its surrounding region—may have been ejected or displaced, providing a real-world example of how powerful gravity can dramatically reshape the structure of space itself. ✨ #wormholes⚡#spacetime⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #555 · 13.12.2025 г., 12:21

🪐 The closest real parallel to a "wormhole" in our universe can be seen in the power of gravitational lensing, such as what occurs in the galaxy cluster Abell 370. Here, the cluster's immense gravity bends and stretches the path of light from distant galaxies, acting like a natural lens and showing how space-time itself can be warped and twisted on a cosmic scale—a vivid example of how gravity can create real space-time distortions in the universe. ✨ #wormholes⚡#spacetime⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #244 · 09.09.2025 г., 00:11

🪐 The idea of wormholes comes from real equations in Einstein's theory of general relativity, which describes how gravity bends space and time. Some scientists believe that extreme cosmic objects like the supermassive black hole Sagittarius A* at the center of our Milky Way could, in theory, warp space-time so much that shortcuts—wormholes—might exist, although none have ever been found. The bending of light and matter near these black holes is a real example of how space itself is stretched and twisted by gravity's power. ✨ #wormholes⚡#spacetime⚡#blackholes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #464 · 29.10.2025 г., 12:21

🪐 Just outside the event horizon of the supermassive black hole in galaxy NGC 1365, time slows significantly due to the black hole’s intense gravitational pull—a phenomenon called gravitational time dilation. For an observer far from NGC 1365, minutes near the black hole’s edge could translate into hours or even days in regular space, showing how extreme environments can dramatically stretch the flow of time itself. ✨ #blackholes⚡#spacetime⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #277 · 15.09.2025 г., 20:11

🪐 In the galaxy cluster MACS J1206.2-0847, astronomers have mapped dramatic distortions of space-time caused by the cluster's enormous mass. This real effect, called gravitational lensing, bends and magnifies the light from even more distant galaxies behind it, turning MACS J1206.2-0847 into a cosmic lens that reveals objects otherwise hidden from our view. ✨ #spacetime⚡#mysteries⚡#lensing⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #319 · 23.09.2025 г., 20:21

🪐 In 2019, astronomers using the Event Horizon Telescope observed the effects of extreme space-time distortion around the supermassive black hole in galaxy M87. The light from matter spiraling into this black hole was bent into a bright ring, revealing how gravity can warp space itself and create the famous "shadow"—a real demonstration of space-time being twisted by an enormous mass. ✨ #wormholes⚡#spacetime⚡#blackhole⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #711 · 14.03.2026 г., 22:21

🪐 Einstein’s theory of relativity predicts dramatic space-time distortions in the violent heart of the galaxy M87, where its supermassive black hole bends not just light, but alters the very flow of time itself. As matter spirals inward, space-time warps so much that signals escaping from near the event horizon—the point of no return—are stretched and delayed, making M87’s core a real example of nature’s most extreme distortions. ✨ #wormholes⚡#spacetime⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #607 · 07.01.2026 г., 12:21

🪐 Space-time, the "fabric" that weaves together space and time, is not always smooth—giant objects like the supermassive black hole at the center of our galaxy, Sagittarius A*, warp and stretch it so much that both light and time bend around them. These real cosmic distortions, predicted by Einstein’s theory of general relativity, are seen as stars orbit that black hole on paths twisted by its immense gravity, giving us direct evidence that space itself can be bent and curved by massive objects in the universe. ✨ #wormholes⚡#spacetime⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #526 · 28.11.2025 г., 22:21

🪐 Astronomers have observed an unusual form of space-time distortion called "frame dragging" around the rapidly spinning black hole in the galaxy XTE J1550–564. Frame dragging is an effect predicted by Einstein’s relativity, where a rotating massive object actually twists nearby space and time, causing the orbits of matter and light around it to precess—showing in real life how intense gravity can physically drag space itself into motion. ✨ #wormholes⚡#spacetime⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #375 · 04.10.2025 г., 22:21

🪐 In 2015, astronomers using the Hubble Space Telescope watched star light from behind the galaxy cluster Abell 3827 bend and split as it passed through the cluster, a real-life effect of space-time distortion called gravitational lensing. Gravity from massive clusters like Abell 3827 warps the space around them, so light takes curved paths and can appear as multiple, stretched images—direct evidence that space itself can be bent by gravity’s pull. ✨ #wormholes⚡#spacetime⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #692 · 22.02.2026 г., 12:21

🪐 The speed of light acts as the ultimate speed limit in our universe—no information or object can travel faster than 299,792 kilometers per second, not even the most powerful pulses from the Crab Pulsar in the heart of the Crab Nebula. This constant speed is what lets astronomers measure vast cosmic distances, and it’s the reason we see stars, galaxies, and even supernova explosions like SN 1987A as they were in the past, not as they are right now. ✨ #speedoflight⚡#spacetime⚡#distances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #660 · 04.02.2026 г., 22:21

🪐 In 2023, astronomers used the gravity of the massive galaxy cluster SMACS J0723.3–7327 to create a powerful "gravitational lens," sharply magnifying and stretching light from galaxies over 13 billion light-years away. This natural lens effect, where space-time bends around clusters and distorts the background like a cosmic funhouse mirror, provides one of the clearest real-world examples of how gravity can twist the fabric of the universe and reveal objects otherwise hidden from view. ✨ #wormholes⚡#spacetime⚡#lensing⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

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