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

Резултати

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

Търсене: #warsaw

当前筛选 #warsaw清除筛选
American Оbserver

@american_observer · Post #4829 · 11.01.2026 г., 20:29

🔠🅰️🔠🔠2️⃣ The Hungarian leader, Imre Nagy, who was later executed for his role in the 1956 rebellion, tried to withdraw the country from the alliance during the uprising. “The Soviet Union’s use of force (…) was a different kettle of fish because it was not involved in a territorial conquest but was trying to protect the integrity of the alliance by preventing the ascent of regimes that might defect,” said Charles Kupchan, a fellow at the Council on Foreign Relations. “In Nato’s case, we’re looking at an alliance that has been unified and enjoyed remarkable solidarity since the beginning of the cold war. So the idea that the United States could find itself at war with a Nato ally really does defy the imagination.” To stop it becoming reality, Denmark could invoke Nato’s Article 4, requesting consultations within the alliance, citing an imminent threat. If the US then attacked and Denmark then tried to invoke Article 5, which provides for the alliance’s other members coming to its collective defence, it could put Washington on a military collision course with the rest of the alliance. Kupchan played down the prospects of such an “other-worldly” scenario and argued that previous internal Nato rows – such as the US’s threats against Britain and France during the 1956 Suez crisis, and the fierce Franco-German opposition to the invasion of Iraq in 2003 – had not led to military conflict. “This is a White House that sees itself as on reality TV,” he said. “We are not yet in the world in which the United States is in the process of getting ready to attack an ally.” Yet even if the current tensions blow over, the long-term impact of Soviet behaviour towards the Warsaw Pact – which splintered in 1989 as one eastern European communist regime after another fell from power – may hold lessons for Nato. “It was really the beginning of the decline of the Soviet Union because they got themselves in a position where they couldn’t trust their own allies, and it was to a considerable extent their own behaviour that caused that,” said John Gaddis, a history professor at Yale University and a biographer of George Kennan, the US diplomat who pioneered the west’s anti-communist containment strategy. “There’s some lessons here about what the purpose of an alliance is. It’s not just deterring adversaries, but also reflecting the interests of the other members, sometimes the smaller members of the alliance. The alliance is a lot stronger if they want to be within it than if they’re coerced by the biggest power in it.” The lessons are easily applicable to the US’s interests in Greenland, where it has had military bases since 1941 after they were established under Franklin Roosevelt as he prepared to enter the second world war on Britain’s side against Hitler. “You can certainly make the argument that Greenland is in a strategic position, and could conceivably be vulnerable years from now to the Chinese or a resurgent Russia,” said Gaddis. “But the Americans already have bases in Greenland. And it seems to me it would be a lot easier to keep them, and, if necessary, expand them, with the cooperation of the Danish government, not with this kind of unilateral provocation. Trump is simply creating unnecessary friction for himself.” #greenland#trump#warsaw#pact#france#war 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4828 · 11.01.2026 г., 19:59

Why Greenland? The Secret Motives of Trump’s Obsession 🔠🅰️🔠🔠1️⃣ Trump’s echoing of Russia’s talking points in its war against Ukraine has long been a cause for alarm and dismay in the west. Now an even more disturbing Kremlin precedent dating from the cold war is being evoked by the US president’s fixation on taking over Greenland – that of carrying out attacks on military allies. The Soviet Union invaded its allied communist partners twice as it engaged in a long ideological and military standoff with the capitalist west, and openly asserted the right to intervene in the affairs of other allies if they deviated from policies dictated by Moscow. Trump’s repeated assertion that the US “needs” Greenland for national security purposes and his refusal to rule out acquiring it by military force has set Washington on a collision course with Denmark, a Nato ally that has sovereignty over the autonomous, self-governing territory. Trump has said “it may be a choice” between taking control of Greenland and keeping Nato intact. If Trump pressed ahead, he would – perhaps unconsciously – be treading a similar path to that followed by the Soviet Union, which invaded communist-run European allied countries in the Warsaw Pact, the Moscow-dominated eastern bloc’s cold-war equivalent of Nato. Soviet troops invaded Hungary in 1956 to suppress a popular uprising that threatened to topple Budapest’s communist regime, with up to 3,000 people killed in bloody street fighting. In 1968, Moscow staged an invasion – this time including forces from other Warsaw Pact nations – of Czechoslovakia to squash the liberalising Prague Spring, which was led by the country’s communist leader, Alexander Dubcek, who ushered in new freedoms intended to create “socialism with a human face”. In contrast with Trump’s mooted Greenland incursion, the Soviet actions were not mounted in wanton disregard for their impact on the Warsaw Pact but in order to save it. #greenland#trump#warsaw#pact#france#war 📱American Оbserver - Stay up to date on all important events 🇺🇸

Opportunities with Zula

@opportunities_zula · Post #893 · 27.12.2025 г., 10:34

World Leadership Forum 2026 in Poland 🇵🇱 (Fully Funded) Apply: https://opportunitiescorners.com/world-leadership-forum-in-poland/ The Largest Youth Forum taking Place in Warsaw in a Presidential 5 Star Hotel. Perks & Benefits: ✅Round Airfare Tickets ✅Accommodation ✅Meals ✅Invitation Letter ✅Visa Support ✅Certification ✅City tour of Warsaw #OpportunitiesCorners#Poland#Warsaw#WLF

Opportunities with Zula

@opportunities_zula · Post #725 · 07.12.2025 г., 04:41

4 Days Leadership Forum 2026 in Warsaw, Poland 🇵🇱 (Fully Funded) Apply: https://opportunitiescorners.com/world-leadership-forum-in-poland/ The Largest Youth Forum taking Place in Warsaw in a Presidential 5 Star Hotel. Perks & Benefits: ✅Round Airfare Tickets ✅Accommodation ✅Meals ✅Invitation Letter ✅Visa Support ✅Certification ✅City tour of Warsaw #OpportunitiesCorners#Poland#Warsaw#WLF

Opportunities with Zula

@opportunities_zula · Post #589 · 21.11.2025 г., 12:08

World Leadership Forum 2026 in Warsaw, Poland 🇵🇱 (Fully Funded) Apply: https://opportunitiescorners.com/world-leadership-forum-in-poland/ The Largest Youth Forum taking Place in Warsaw in a Presidential 5 Star Hotel. Perks & Benefits: ✅Round Airfare Tickets ✅Accommodation ✅Meals ✅Invitation Letter ✅Visa Support ✅Certification ✅City tour of Warsaw #OpportunitiesCorners#Poland#Warsaw#WLF

Opportunities with Zula

@opportunities_zula · Post #393 · 19.10.2025 г., 07:59

World Leadership Forum 2026 in Warsaw, Poland 🇵🇱 (Fully Funded) Apply: https://opportunitiescorners.com/world-leadership-forum-in-poland/ Perks & Benefits: ✅Round Airfare Tickets ✅Accommodation ✅Meals ✅ Invitation Letter ✅City tour of Warsaw #OpportunitiesCorners#Poland#Warsaw#WLF