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 подобни публикации

Търсене: #chinaus

当前筛选 #chinaus清除筛选
世界新闻 World News 📮

@media_rss · Post #4452101 · 15.05.2026 г., 07:29

Watch: Global business voices on China-US trade relations China-US relations are in the spotlight as global business watches US President Donald Trump's visit to China and what it means for trade, investment and market confidence. In this episode of BizTalk, CGTN's Lincoln Humphries sits down with Fred Teng, president of the AmericaChina Public Affairs Institute, Chris Torrens, chairman of the British Chamber of Commerce in China, and Oliver Oehms, executive director and board member of the German Chamber of Commerce in China – North China; exploring investment sentiment, business trends and why China-US cooperation still matters in an uncertain global economy. #ChinaUS via CGTN

Hashtags

世界新闻 World News 📮

@media_rss · Post #4452011 · 14.05.2026 г., 07:10

Live: Beyond the buzz – What do young Americans really think about China-US relations? What happens when young Americans experience China beyond the headlines? Join CGTN for a candid conversation with US creators and students living in China as they share firsthand perspectives on daily life, consumer trends, innovation and how these experiences are reshaping their understanding of China's economic dynamism and China-US connections. #ChinaUS via CGTN

Hashtags

📰 Presidential Aide Nikolay Patrushev gave an interview to Komsomolskaya Pravda newspaper(January 14, 2025) Key points: #USA • The US establishment has been divided and lacks a common policy vision for the world and domestically. • Trump’s core message is that he supposedly has a plan to revive pragmatic politics in the United States, which is expected to benefit both the state and its people. It has yet to be seen how this compares with the interests of other countries and nations. • If Trump’s first term as president is any guide, the infamous deep state has a lot of clout in the USA. It can prevent Trump from pursuing his agenda. • Trump will not view Ukraine as a priority. China is a much bigger concern for him. • Trump has outlined his interests regarding Greenland, the Panama Canal, Mexico and Canada. There is an American tradition that consists of reshaping the world map to suit the US interests and interfering in the affairs of other countries across various continents. • It seems unlikely that Trump sends the army to invade new states for the United States, as some have been saying. What is clear, however, is that the new administration will be proactive in asserting its interests in its dealings with all these countries. #ChinaUS • I believe that disagreements between Washington and Beijing will escalate, and it will be the United States that will intentionally fan these flames. #RussiaChina • For Russia, China has been and will remain a key partner as part of our privileged strategic cooperation. These relations are immune to momentary consideration and will endure regardless of who gets into the Oval Office. #Ukraine • Talks on Ukraine must take place between Russia and the United States without any other Western countries. • The people of Ukraine remain a kindred, brotherly nation with our ties reaching back centuries, no matter what the Kiev propaganda mouthpieces say in their Ukrainisation frenzy. We do care about what is happening in Ukraine. #Moldova • Chisinau must be honest with itself and stop deceiving its people. The Moldovan authorities must recognise their mistakes and get down to mending fences instead of searching for enemies inside the country and in Transnistria. #Europe • We have nothing to discuss with either London or Brussels. For example, EU leadership has long lost the right to speak on behalf of many members including Hungary, Slovakia, Austria, Romania and several other countries which are interested in ensuring stability in Europe and have adopted a balanced position towards Russia. Read in full

#Beijing_Review🇨🇳📕[PDF]⬇️ 2 #October2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines In this issue , the spotlight shines on #Xinjiang 70, celebrating seven decades of transformation in the autonomous region—from economic health to cultural heritage. Global topics include #PalestineRecognition, evolving #ChinaUS relations, and the healing potential of dialogue via the #XiangshanForum. Special features explore #RuralRevitalization and tech-driven change in Qingdao and Fujian, as #ScienceInnovation takes center stage. From the vibrant Grand Bazaar to a Somali expat’s vision, this issue captures both regional pride and global dialogue. #BeijingReview#CulturalDiversity#BeltAndRoad#EducationMatters#ChinaPerspective