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

Резултати

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

Търсене: #guelleh

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

@addisstandardeng · Post #22003 · 11.04.2026 г., 06:52

News: #Djibouti President Ismaïl Omar Guelleh re-elected for sixth term after victory in latest vote Djibouti's President Ismail Omar #Guelleh on Saturday claimed a landslide victory in an election that secured his sixth straight term at the helm of the strategically placed Horn of Africa nation. Guelleh won Friday's presidential election with 97.8 percent of the vote, according to official results. He beat his sole opponent Mohamed Farah Samatar, little known by the general public, who secured just 2.2 percent of the vote, according to interior ministry figures. "Re-elected", the 78-year-old declared in a social media post ahead of the official results, after early results gave him a huge lead. Guelleh has ruled the tiny nation of one million people for 27 years with an iron grip. He has made his name leveraging Djibouti's key location to turn it into an international military ....... https://www.facebook.com/AddisstandardEng/posts/pfbid02cuqZZnyp5EcLHnw4yaoE6G6tQWm3xJDZVgu5ERGMHCrJDoKr8gDmbM5xPnAebEG4l

Addis Standard

@addisstandardeng · Post #21039 · 11.01.2026 г., 14:24

News: #PM_Abiy visits #Djibouti, tours Doraleh Port weeks after #Egypt signs port and energy deals Prime Minister Abiy Ahmed arrived in Djibouti today for talks with President Ismaïl Omar #Guelleh and a tour of the Port of #Doraleh, weeks after Egypt signed cooperation agreements with Djibouti on port development, logistics, and renewable energy. In a statement shared following his arrival, Abiy said discussions with President Guelleh focused on “geopolitical dynamics, regional peace and security, and strengthening bilateral cooperation,” particularly in trade, logistics, and development, reaffirming a shared commitment to stability, economic integration, and mutual prosperity. The Prime Minister also toured the Doraleh port complex, Ethiopia’s principal maritime gateway. The visit comes amid heightened regional attention to Red Sea logistics. On 27 December, 2025, Egypt and Djibouti signed three cooperation agreements during an official visit by Kamel.... Read more: https://addisstandard.com/?p=54486

Addis Standard

@addisstandardeng · Post #21688 · 12.03.2026 г., 08:44

News: Leaders of #Djibouti, #Ethiopia, #Somalia hold tripartite talks on regional peace, security Ismaïl Omar #Guelleh hosted a tripartite meeting with #Abiy_Ahmed Ali and #Hassan_Sheikh Mohamud in Djibouti on Wednesday, with discussions focusing on peace and security in the Horn of Africa and broader regional cooperation. According to a statement from the Djiboutian presidency, the leaders met at the private residence of President Guelleh in Haramous during an Iftar dinner, where they held consultations aimed at strengthening coordination and collective responses to shared regional challenges. The discussions covered peace and security in the region, the progress of economic integration among countries in the subregion, and issues of common interest affecting the three nations. The leaders also exchanged views on the prevailing political and security situation in the Horn of Africa. The meeting further addressed the ongoing conflict in the Middle East ..... Read more: https://addisstandard.com/?p=55774

Addis Standard

@addisstandardeng · Post #21606 · 04.03.2026 г., 09:55

Four children killed in #Djibouti 'drone strike' explosion: official, NGO Four children were killed in southern Djibouti in an explosion, authorities said late Tuesday, with a human rights group saying it was a drone strike. The children died in an explosion in the #Dhikil region in #Afar, public prosecutor Hassan Mohamed Hassan said in a statement, calling it a tragic event. Afar's community feels marginalised by President Ismail Omar #Guelleh, a member of the majority Issa community, who has ruled the country with an iron fist since 1999. "Two children, aged six and seven (a girl and a boy), were killed at the scene, and on Tuesday two others succumbed to their injuries due to a lack of evacuation and medical care," the Djiboutian League for Human Rights (#LDDH) said in a press release. The LDDH said the children were tending livestock when the incident took place and that.... https://web.facebook.com/AddisstandardEng/posts/pfbid037tZUcL1PYTnwEdFMBf2aLFw9oqiCJtFEgDvXKgddZQQa2CBTDdSTm1p2pcNcTkj9l

Addis Standard

@addisstandardeng · Post #21562 · 28.02.2026 г., 10:58

#Djibouti leader wary of #Israel’s presence in #Somaliland Djibouti President Ismail Omar #Guelleh on Friday warned that the establishment of an Israeli military base in the strategic port city of #Berbera in Somaliland will pose a direct threat to regional stability. Speaking to a local media, Guelleh accused Israel of exploiting Somaliland’s decades-long quest for statehood to secure a foothold in the Horn of Africa. He expressed deep concern that the authorities in #Hargeisa might agree to any geopolitical concession in exchange for formal recognition. The veteran leader also leveled uncharacteristically blunt criticism at the United Arab Emirates, describing the Gulf nation as Israel’s primary “gateway” into the region. Guelleh pointed out that the #UAE is driving strategic shifts in the Horn of Africa and the #Red_Sea that exacerbate existing conflicts. He further alleged.... https://web.facebook.com/AddisstandardEng/posts/pfbid02eCjUg8BmbcGMNdTaybhh1dcaRUKUG8Gt8batRZvmsGemat4LxFLfoWLCD8eVbcdUl