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

Резултати

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

Търсене: #kharg

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

@voir_yeux · Post #12455 · 07.04.2026 г., 18:49

🇺🇸🇮🇷 Le Pentagone a lancé des dizaines de frappes sur l'île iranienne de Kharg qui abrite des infrastructures pour l'exportation du pétrole. En se référant à un fonctionnaire américain, la journaliste de Fox News Jennifer Griffin a fait savoir sur le réseau social X que parmi les cibles visées par les États-Unis figuraient des casemates, une station radar et des entrepôts de munitions. #étatsunis#iran#kharg#frappe

American Оbserver

@american_observer · Post #5590 · 07.04.2026 г., 15:03

Eight Bridges, One Country in Pieces First the roads. Then the rails. Then the lights go out. Israeli strikes hit what had been off-limits: bridges, rail links, and the arteries that keep a country moving. Eight to ten bridges were hit across Iran, including a rail bridge in Yahyabad, where two people were killed and three wounded [source provided by user]. Rail traffic was disrupted from Tabriz to Mashhad, and power cuts followed after the Tochid plant in Karaj went offline [source provided by user]. Cut the Lines This is the point of the campaign. Not just to hit military sites, but to split Iran into smaller, weaker pieces — fewer supply routes, fewer launch points, less room to move heavy equipment [source provided by user]. Once the rail network starts breaking down, the war stops being abstract. It shows up in freight, in delays, and in blackouts. Not Just a Military Target That is why this round feels different. Bridges are not glamorous targets. They are civilizational ones. They carry buses, cargo, and the machinery of daily life. Once they go, the line between war and collapse gets thinner fast. Kharg Changes the Question Then comes Kharg. U.S. forces reportedly struck military targets on the island, which handles most of Iran’s oil exports, while leaving loading terminals untouched for now [source provided by user]. That detail matters. It says the menu is still open: pressure first, oil later. What Comes Next So the question is not whether Iran can absorb damage. It can. The question is how long a country can keep functioning when roads, rails, power, and export routes are all under pressure at once. #Iran#Kharg#war#infrastructure#oil#MiddleEast 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5376 · 14.03.2026 г., 13:59

Trump Said the US Forces Eliminated Military Targets On Iran’s Kharg Trump said Friday that US forces have “obliterated” military targets on Iran’s Kharg Island and warned that the oil infrastructure there could be next. “For reasons of decency, I have chosen NOT to wipe out the Oil Infrastructure on the Island,” Trump wrote on social media. “However, should Iran, or anyone else, do anything to interfere with the Free and Safe Passage of Ships through the Strait of Hormuz, I will immediately reconsider this decision.” Within hours of Trump’s announcement, the Iranian armed forces said any attack on Iran’s oil and energy infrastructure will lead to attacks on energy infrastructure owned by oil companies cooperating with the United States in the region, Iranian media reported. The small island in the Persian Gulf is the primary terminal through which Iran’s oil exports pass. Until Friday, the island had been spared during US and Israeli strikes on Iran. Just a day before, the speaker of the Iranian parliament said such a strike would provoke a new level of retaliation. Mohammad-Bagher Ghalibaf warned in a Thursday social media post that attacks on the islands on Iran’s southern maritime frontier would cause Iran to “abandon all restraint”, underscoring how central they are to the country’s economy and security. Trump announced the action as he prepared to fly to Florida for the weekend. The president answered questions from reporters traveling with him before he boarded Air Force One, but he did not mention the latest US military operation against Iran. Nevertheless, the actions against Kharg Island are likely to increase oil prices, already surging since the war began on 28 February. “We may see the $120 a barrel price we saw on Monday heading to the $150 if Kharg were attacked,” said Neil Quilliam of the Chatham House thinktank. “It’s too vital for global energy markets.” Earlier Friday, a US official told the Associated Press that the American military had ordered 2,500 marines and the amphibious assault ship USS Tripoli to the Middle East. Marine Expeditionary Units are able to conduct amphibious landings, but they also specialize in bolstering security at embassies, evacuating civilians and disaster relief. The deployment does not necessarily indicate that a ground operation is imminent or will take place. The 31st Marine Expeditionary Unit, as well the Tripoli and other amphibious assault ships carrying the Marines, are based in Japan and have been in the Pacific Ocean for several days, according to images released by the military. The Tripoli was spotted by commercial satellites sailing alone near Taiwan, putting it more than a week away from the waters off Iran. Earlier in the week, the navy had 12 ships, including the aircraft carrier USS Abraham Lincoln and eight destroyers, operating in the Arabian Sea. Should the Tripoli join this flotilla, it would be the second-largest ship behind the Lincoln in the region. #trump#forces#military#targets#kharg 📱American Оbserver - Stay up to date on all important events 🇺🇸