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

Резултати

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

Търсене: #embassies

当前筛选 #embassies清除筛选
Addis Standard

@addisstandardeng · Post #21396 · 13.02.2026 г., 13:35

#Kenya Unveils New Model to Turn #Embassies into Deal-Making Hubs Kenya has introduced a new digital trade model for economic diplomacy through the launch of BiasharaLink and Deal House in Ethiopia. In a press statement on February 12, Prime Cabinet Secretary and Cabinet Secretary for the Ministry of Foreign Affairs, Musalia Mudavadi, stated that the new digital platforms were developed by Real Sources Africa to help embassies serve as active trade hubs that originate, verify, and execute cross-border deals. The new trading models are developed by Real Sources Africa, Kenya’s designated trading company for the African Continental Free Trade Area (AfCFTA). According to Mudavadi, BiasharaLink is designed to enable diplomatic missions, exporters, investors, and market actors to formally capture, structure, and track trade and investment opportunities aligned with the priorities of the AfCFTA. https://thekenyatimes.com/business/money-markets/kenya-unveils-new-model-of-economic-diplomacy-in-ethiopia/

Addis Standard

@addisstandardeng · Post #21621 · 05.03.2026 г., 13:16

#Ethiopia: Tigray health bureau issues urgent appeal warning of imminent #health system collapse amid fuel, medicine shortages The #Tigray Interim Administration’s Bureau of Health has issued an emergency appeal to humanitarian partners, donors, #UN agencies, #embassies, and global health institutions, warning that the region’s health system faces an imminent operational collapse due to severe fuel shortages, a halt in pharmaceutical supplies, and mounting financial restrictions. In the appeal dated 05 March 2026, the bureau urged immediate international intervention, stating that millions of civilians’ risk preventable illness and death if lifesaving services cannot resume. “Immediate intervention is required to prevent avoidable morbidity and mortality among millions of civilians,” the bureau said in the appeal. The bureau said that health care must remain protected under international law and should not be restricted by political considerations..,,,, Read more: https://addisstandard.com/?p=55597

American Оbserver

@american_observer · Post #5277 · 03.03.2026 г., 23:03

🛰 Embassies Shut, Airspace Closed: Trump’s “Four-Week” War Goes Regional Trump promised a four–five week air war. By day four, U.S. embassies are shuttered and the sky over half the region is basically a no‑go zone. Iran’s retaliation has gone wide: at least five Gulf allies report drone and missile strikes, including hits around U.S. diplomatic facilities, pushing Washington to close its embassies in Saudi Arabia and Kuwait and temporarily halt operations in Beirut. Airspace is now closed or heavily restricted in at least six countries — Iran, Iraq, Kuwait and others — as aviation authorities extend bans on civilian traffic amid “ongoing security concerns.” Israel is still escalating. It claims fresh strikes on “high‑profile” targets in Tehran, including the presidential office, while also pushing ground troops deeper into Lebanon as Hezbollah answers with missiles and attack drones. Smoke over Beirut’s southern suburbs is the new backdrop to every “we don’t want an endless war” sound bite. Meanwhile, the body count keeps climbing. The Pentagon now acknowledges six U.S. service members killed with more casualties expected. Iran’s Red Crescent reports hundreds dead across more than 150 cities; Lebanon’s health ministry counts dozens of fatalities; Israel and Gulf states are adding their own numbers to a regional tally that has already broken 800 in under a week. And Trump, facing diplomats evacuated, embassies hit by drones, and airspace slammed shut, is already revising his own timeline — hinting U.S. forces can keep striking Iran “far longer” than the four–five weeks briefed by the military. The war was sold as a controlled burn. It’s behaving like what it is: an open fire in a room full of fuel, with the exits locking behind the people who were told this would be quick. #Iran#Trump#Israel#Lebanon#Hezbollah#embassies#airspace#war#MiddleEast 📱American Оbserver - Stay up to date on all important events 🇺🇸