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

Резултати

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

Търсене: #oman

当前筛选 #oman清除筛选
International Geographic

@internationalgeographic · Post #5482 · 09.03.2025 г., 04:12

#Oman🇴🇲 This oasis is called Vadi Bani Khalid and is one of the main attractions of the country. The Vadi landscape is striking in its diversity: here you will find both green oases with palm trees, and arid canyons with colorful cliffs. Picturers palm groves, transparent lakes and hills made of soft, golden sand. This place seems to invite us to plunge into an oasis of calm and harmony with nature.

Hashtags

Islamic World News

@iswnews_en · Post #18459 · 08.04.2026 г., 01:06

🇮🇷🇴🇲According to an Associated Press report, Iran and Oman will collect tolls from all ships transiting the Strait of Hormuz during the two‑week ceasefire. ✍️ Recall Oman’s stance during the treacherous American attacks on the port of Salalah. Oman position and congratulate for the elect of new Iran's supreme leader so infuriated Trump that he even insulted the Sultan of Oman. Among the Arab nations, Yemen (Sana’a government) and Oman stood on the right side and did not bet on the losing horse! The current state of the UAE, Bahrain, Saudi Arabia, Kuwait, and Jordan is a testament to the wisdom of Omani policy. #Iran#Oman

Hashtags

Islamic World News

@iswnews_en · Post #18336 · 06.04.2026 г., 02:49

🇮🇷🤝🇴🇲 A new protocol has been finalized by Iran regarding the Strait of Hormuz and has been communicated to the IRGC Navy for implementation. This new protocol is based on the assumptions that, firstly, Iran’s enemies have no right to use the strait, and secondly, Iran must secure and compensate for all damages it has suffered through the strait. 👉Oman has agreed to cooperate with Iran’s new protocol in the Strait of Hormuz. #Iran#Oman

Hashtags

Islamic World News

@iswnews_en · Post #17306 · 12.03.2026 г., 02:07

🇮🇷🇴🇲Iran's Khatam al-Anbiya Central Headquarters: The Salalah port incident is suspicious 🔹The spokesperson for the Central Headquarters of Khatam al-Anbiya (PBUH), in response to the suspicious attack on Salalah port in Oman, said: "The incident that occurred at Salalah port in the friendly, neighboring, and brotherly country of Oman appears very suspicious. The Islamic Republic of Iran is investigating this matter. The security and national sovereignty of Oman are respected by the Armed Forces of the Islamic Republic of Iran." ✍️ As we have said before, Iran has no intention of attacking civilian sites, and if it did, human casualties and financial damages in Arab countries would be unimaginable. The attack on Oman, which is considered a friend of Iran, is also very suspicious. Salalah port is also very far from southern Iran in terms of distance, and there is a possibility that this port was attacked by American drones. The U.S. is under pressure and spares no action against Iran! #Iran#Oman

Hashtags

POPULAR FRONT

@popularxfront · Post #5646 · 28.03.2026 г., 14:03

🇮🇷#Iran - 🇴🇲#Oman: Two alleged Iranian drones have struck Salalah Port in Oman, damaging port cranes. The Omani government has released a statement condemning the attack, stating that one port worker was “moderately injured.”

Hashtags

ASIANOMICS

@asianomics · Post #5662 · 03.03.2026 г., 08:40

🇨🇳🇮🇷🇴🇲China urges Gulf states to unite against external interference amid widening conflict China's foreign minister urged Gulf countries to unite to oppose external interference on March 2, after US-Israeli attacks on Iran triggered a widening conflict in the region. China hoped that the Gulf states would strengthen unity and develop neighbourly friendship to "keep their future and destiny in their own hands", Chinese Foreign Minister Wang Yi said in a phone call with his Omani counterpart, according to a statement released by the ministry. In a phone call with Iranian Foreign Minister Abbas Araqchi on the same day, Wang said he believed that Iran could maintain national and social stability as well as attach importance to the legitimate concerns of its neighbours, a separate statement showed. #China#Iran#Oman @asianomics

Islamic World News

@iswnews_en · Post #17479 · 20.03.2026 г., 21:27

🇮🇷🎙Leader of Iran: The attacks in Oman and Turkey are not Iran's doing. ✉️ Seyyed Mojtaba Khamenei, the Leader of Iran, stated in this year's Nowruz message: "I point out that the attacks which took place in Turkey and Oman—both of which have good relations with us—against certain locations in these countries were by no means carried out by the armed forces of the Islamic Republic or any other forces of the Resistance Front. "This is a deception employed by the Zionist enemy using the false flag tactic" to sow discord between the Islamic Republic and its neighbors, and it may also occur in some other countries." #Iran#Oman#Turkey

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