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

Резултати

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

Търсене: #giantplanets

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

@cosmomyst · Post #297 · 19.09.2025 г., 16:11

🪐 The giant planet WASP-96b, discovered about 1,150 light-years from Earth, made headlines when the James Webb Space Telescope detected a clear signature of water vapor in its scorching atmosphere. Unlike planets in our solar system, WASP-96b has no clouds and its skies allow starlight to pass straight through, giving scientists an unusually direct view of a giant planet's steamy, alien air. ✨ #giantplanets⚡#exoplanets⚡#atmosphere⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #135 · 15.08.2025 г., 03:11

🪐 The giant exoplanet HD 209458b, located about 150 light-years from Earth in the constellation Pegasus, is known as "Osiris" and was the first planet beyond our solar system found to have an atmosphere. As it orbits extremely close to its star, its atmosphere is heated and blown away by stellar radiation, creating a long tail of escaping gas much like a comet streaking through space. ✨ #giantplanets⚡#exoplanets⚡#atmosphere⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #150 · 18.08.2025 г., 03:11

🪐 Exoplanet HAT-P-7b, a giant planet about 1,040 light-years away in the constellation Cygnus, experiences wild weather that causes its thick clouds to constantly switch sides. Powerful winds, driven by the planet’s close orbit to its star, move clouds of vaporized minerals from one hemisphere to the other—a phenomenon never seen anywhere else in the universe. ✨ #giantplanets⚡#exoplanets⚡#weather⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #521 · 26.11.2025 г., 12:21

🪐 The giant planet HD 189733b, located about 64 light-years away in the constellation Vulpecula, is famous for having blue clouds made of molten glass that whip through its atmosphere at wind speeds over 7,000 kilometers per hour. Unlike Earth's gentle blue sky, the blue color of HD 189733b comes from silicate particles that scatter blue light, creating a world where glass rain falls sideways in scorching, stormy gales. ✨ #exoplanets⚡#giantplanets⚡#atmospheres⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #435 · 16.10.2025 г., 22:21

🪐 Some of the most mysterious worlds in our galaxy are rogue planets like CFBDSIR J214947.2-040308.9, a giant planet drifting alone in interstellar space without a star to orbit. Detected about 130 light-years from Earth, this lonely world glows with leftover heat from its birth and is studied in infrared light, revealing that even without a sun, planets can wander the dark, silent stretches between stars. ✨ #rogueplanets⚡#interstellar⚡#giantplanets⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #180 · 24.08.2025 г., 00:11

🪐 Exoplanet WASP-12b, about 1,400 light-years away in the constellation Auriga, is a giant planet so close to its star that its atmosphere is being stripped away, creating a glowing, comet-like tail. This tidal distortion makes WASP-12b egg-shaped rather than round, showing how extreme gravity can reshape giant planets when they orbit near their stars. ✨ #giantplanets⚡#exoplanet⚡#gravity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #448 · 23.10.2025 г., 18:21

🪐 The giant exoplanet HAT-P-32b, about 950 light-years away in the constellation Andromeda, is so puffed up that it's nearly twice the diameter of Jupiter but only a fraction as dense—almost like a balloon made of hot gas. Its incredibly low density means a bathtub big enough for HAT-P-32b would float it, revealing how giant planets can take on bizarre, bloated forms far beyond the familiar giants of our own solar system. ✨ #exoplanets⚡#giantplanets⚡#hatp32b⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #397 · 09.10.2025 г., 15:21

🪐 The enormous exoplanet HD 100546 b, located about 320 light-years away in the constellation Musca, is one of the youngest giant planets ever observed—less than 10 million years old. Still surrounded by a swirling disk of gas and dust, this massive world is so new that scientists have caught it in the act of forming, offering a rare glimpse at how giant planets grow while carving out gaps in their birth disks. ✨ #giantplanets⚡#exoplanets⚡#planetformation⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #664 · 06.02.2026 г., 22:21

🪐 Saturn is so massive and spins so quickly—completing a rotation in just over 10 hours—that its fast spin causes the planet to flatten at the poles and bulge at the equator. This makes Saturn wider across the middle than from top to bottom, giving it a distinct squashed-ball appearance unlike most other planets in the solar system. ✨ #Saturn⚡#giantplanets⚡#rotation⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #314 · 22.09.2025 г., 20:21

🪐 Jupiter’s Great Red Spot is the largest storm in the solar system—a swirling oval bigger than Earth itself that has raged for at least 350 years. This ancient storm sits high in Jupiter’s atmosphere and its swirling winds reach speeds of over 430 kilometers per hour, offering a glimpse into the extreme weather that can brew on giant planets. ✨ #Jupiter⚡#storms⚡#giantplanets⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #340 · 27.09.2025 г., 22:21

🪐 Neptune’s internal heat keeps this giant planet surprisingly active, releasing more than twice as much energy as it receives from the Sun. This extra energy drives Neptune’s fierce storms and the fastest winds in the solar system, revealing that giant planets can be turbulent worlds even in the freezing dark far from their star. ✨ #Neptune⚡#giantplanets⚡#storms⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #166 · 21.08.2025 г., 13:11

🪐 The giant planet Neptune, about 17 times heavier than Earth, has the fastest winds in the solar system, reaching speeds over 2,000 kilometers per hour. These icy, supersonic winds zip through Neptune's blue methane clouds, creating enormous, swirling storms that can dwarf our entire planet. ✨ #Neptune⚡#giantplanets⚡#storms⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

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