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

Резултати

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

Търсене: #explosions

当前筛选 #explosions清除筛选
Voir de ses propres yeux

@voir_yeux · Post #11928 · 28.02.2026 г., 08:51

🇮🇷🇮🇱 Le nombre de villes iraniennes où des explosions ont été entendues s'élève désormais à six. Outre Téhéran, Ispahan, Qom, Karadj et Kermanchah, Tabriz, dans le nord-ouest du pays, a également été touchée. C'est ce que rapporte l'agence de presse Tasnim. Selon l'agence, des explosions ont également été entendues dans la province de Lorestan, dans l'ouest du pays. #iran#israël#attaque#explosions

Voir de ses propres yeux

@voir_yeux · Post #11926 · 28.02.2026 г., 07:38

🇮🇷🇮🇱 Trois explosions ont retenti dans le centre de la capitale iranienne, rapporte la radio-télévision publique iranienne. Il n’y a pas encore d’informations sur d'éventuelles victimes. Selon le service de presse de la diplomatie israélienne, l'État hébreu a lancé une frappe préventive contre l'Iran afin d'éliminer la menace. Le ministre israélien de la Défense, Israël Katz, a décrété l'état d'urgence sur l'ensemble du territoire du pays. Comme l'affirme Al Jazeera citant un responsable américain, les États-Unis participent à l'attaque d'Israël contre l'Iran. #iran#israël#attaque#explosions

Interesting Planet 🌍

@interesting_planet_facts · Post #1120 · 11.12.2025 г., 18:11

🌎 Every summer in Siberia, mysterious craters known as "Yamal holes" appear in the Arctic tundra. These giant pits, sometimes 20 meters wide, form when underground methane gas builds pressure and violently explodes through permafrost. Scientists have identified at least 17 such craters since 2014, linking them to warming temperatures and melting ice. ✨ #permafrost⚡#methane⚡#explosions 👉subscribe Interesting Planet 👉more Channels ​

Voir de ses propres yeux

@voir_yeux · Post #12363 · 31.03.2026 г., 22:58

🇧🇮 Les explosions survenues dans la capitale économique du Burundi, Bujumbura, ont été causées par un incendie dans un dépôt de munitions, a rapporté l’Agence France-Presse, citant le porte-parole de l’armée. Un grave accident électrique dans le magasin des munitions de la FDNB [Force de défense nationale du Burundi] basé à Musaga est à l'origine des explosions entendues en ce moment dans la capitale économique Bujumbura, a commenté le porte-parole de l'armée burundaise Gaspard Baratuza. #burundi#explosions#accident

International News

@intnewsagency · Post #9315 · 08.04.2026 г., 11:37

Explosions at Iranian Oil Refineries in the Persian Gulf Several explosions occurred at oil refineries on Lavan and Sirri islands in southern Iran, key oil export terminals, according to Mehr agency. The cause of the blasts remains unknown. Details and potential impacts are yet to be confirmed. #Iran#PersianGulf#Oil#Explosions#Energy The main news of Russia and the world ishere.

Universe Mysteries 🪐

@cosmomyst · Post #354 · 30.09.2025 г., 20:21

🪐 In 2017, astronomers observed supernova SN 2016aps in the galaxy PGC 067159, a record-breaker for being one of the most energetic stellar explosions ever seen. This supernova, likely the result of two massive stars merging before detonating, released more than twice the energy of a typical supernova, offering clues to how giant stars live and die in the universe’s most powerful blasts. ✨ #supernovae⚡#galaxies⚡#explosions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #715 · 18.03.2026 г., 22:21

🪐 In 1997, the BeppoSAX satellite pinpointed the source of a gamma-ray burst—GRB 970228—to a faint galaxy about 8 billion light-years away, confirming that gamma-ray bursts can originate far beyond our own Milky Way. This discovery revealed that these bursts are not just local events but are among the most powerful explosions in the universe, releasing in seconds as much energy as the Sun will emit over its entire lifetime. ✨ #gamma-ray-bursts ⚡#explosions⚡#distant-universe ⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #267 · 13.09.2025 г., 20:11

🪐 In the constellation Sculptor, astronomers detected a record-breaking gamma-ray burst named GRB 221009A in October 2022—so powerful that it traveled over 2 billion light-years and was nicknamed the "BOAT" (Brightest Of All Time). This extraordinary explosion released more energy in a few seconds than the Sun will produce over its entire 10-billion-year lifetime, making it one of the most energetic events ever observed in the universe. ✨ #gamma-ray-bursts ⚡#explosions⚡#Sculptor⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #755 · 29.04.2026 г., 22:21

🪐 In the host galaxy of GRB 111209A, astronomers witnessed one of the longest-lasting gamma-ray bursts ever recorded—this explosion in the constellation Fornax blazed for over seven hours, far longer than most GRBs that usually last seconds to minutes. Scientists believe this extraordinary outburst came from the collapse of a rare, massive blue supergiant star, making GRB 111209A a record-breaker among cosmic fireworks. ✨ #gamma-rays ⚡#supergiants⚡#explosions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #307 · 21.09.2025 г., 15:21

🪐 In the constellation Carina, the galaxy ESO 580-49 was the site of an unusually long gamma-ray burst in 2013—lasting over 7 hours, far exceeding the typical seconds-long flashes seen in most bursts. Gamma-ray bursts are colossal explosions from massive stars collapsing or merging, sending out jets of the most energetic light in the universe, and the event in ESO 580-49 shows just how varied and powerful these cosmic blasts can be. ✨ #gamma⚡#ESO58049⚡#explosions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #202 · 31.08.2025 г., 20:11

🪐 In the spiral galaxy Messier 74, astronomers have observed a rare "ultra-long" gamma-ray burst—an intense flash of high-energy light caused when a massive star collapses into a black hole, emitting jets that travel for billions of light-years. Gamma-ray bursts like this one are the brightest explosions since the Big Bang, and just a single burst can release more energy in seconds than our Sun will produce in its entire lifetime. ✨ #gamma-rays ⚡#explosions⚡#Messier74⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

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