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

Резултати

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

Търсене: #gambella

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

@addisstandardeng · Post #21176 · 24.01.2026 г., 10:23

#Ethiopia: Shooting near #Gambella Grand Hotel leaves one dead, injures another; city administration imposes movement restrictions One person was killed and another injured in a shooting near the Gambella Grand Hotel on Thursday afternoon, disrupting daily life in the city and prompting the Gambella City Administration to impose temporary restrictions on movement and public services, according to a senior regional official and a local resident who spoke to Addis Standard. A senior regional official, who requested anonymity for security reasons, said the shooting occurred at around 1:05 p.m. while Tabots—sacred religious icons—were being escorted back to a local church following a religious ceremony. According to the official, most of the procession had already passed the area near the hotel when the incident took place, affecting only a few people at the back of the escort. “The target wasn’t the crowd,” the official said. “It appears the individual who.... Read more: https://addisstandard.com/?p=54727

Addis Standard

@addisstandardeng · Post #22165 · 02.05.2026 г., 12:41

News: Media Authority Board Chair praises new AI-driven integrated system’s role in enforcing accountability, oversight Speaking at the inauguration on 1st of May, Ambassador Redwan Hussein, Director General of the National Intelligence and Security Service (NISS) who is also Chairperson of the EMA Board, described the system as a decisive break from opaque and manual practices. Furthermore, the new platform will introduce full traceability of permits and compliance, he said. “We will know to whom we gave a permit and when it expires. Evidence will be generated upon expiry.” He highlighted its contribution to address cases including “someone who takes a permit to work in #Addis_Abeba will no longer be found working at the edge of #Gambella in the middle of the night, an issue we faced under the old system.” https://addisstandard.com/?p=56731

Addis Standard

@addisstandardeng · Post #21457 · 19.02.2026 г., 16:27

#Gambella Region authorities say measures taken against #security members following recent unrest Authorities in the Gambella Region say legal and administrative actions have been taken against police personnel following recent security crises in the region, including disciplinary measures, retraining programs, and court proceedings targeting alleged misconduct within the force. According to the Gambella Police Commission, regular police and riot control units were sent to the Dalol Central Command Training Center for training as part of broader reforms initiated after the recent security incidents. Police members who did not attend the training underwent physical evaluations and disciplinary review sessions that included internal assessments. Separate court rulings in Gambella city gave verdicts on cases involving civilians and former officers accused of wearing unauthorized police uniforms and concealing government weapons. https://addisstandard.com/?p=55245

Addis Standard

@addisstandardeng · Post #21412 · 16.02.2026 г., 08:20

News: Poor market functionality persists across #Ethiopia despite slight easing of household costs More than half of assessed #markets across Ethiopia showed poor functionality between late December 2025 and early January 2026, underscoring continued supply disruptions despite a slight decline in household expenditure costs, a recent Joint Market Monitoring Initiative factsheet indicates. According to the report, more than half (52%) of assessed markets across Ethiopia were found to have poor functionality, with the highest prevalence reported in #Gambella (100%), #Amhara (74%), #Afar (67%), and #Oromia (63%). The deterioration was largely linked to ongoing conflict, particularly in Gambella, Amhara, and Oromia, which disrupted trade routes and restricted trader movement. Additional pressure came from fuel shortages and rising transportation costs that constrained commodity supply and weakened market integration. Read more: https://addisstandard.com/?p=55200

Addis Standard

@addisstandardeng · Post #21917 · 02.04.2026 г., 14:02

News: #State_Department issues ‘Do Not Travel’ warning for five regions of #Ethiopia amid heightened security risks The U.S. Department of State has issued a Level 4 “Do Not Travel” warning for several regions in Ethiopia, citing escalating security threats including armed conflict, crime, and kidnapping. In its latest travel advisory update released on April 1, the department named #Tigray, #Afar, #Amhara, #Gambella, and #Benishangul Gumuz among areas facing heightened risks, urging U.S. citizens to avoid travel to these regions entirely. The advisory stated that these areas are affected by ongoing armed conflict, political and ethnic violence, and widespread insecurity, with conditions that can deteriorate rapidly without warning. Beyond the Level 4 regions, the State Department maintained Ethiopia under a Level 3 “Reconsider Travel” advisory overall, pointing to broader concerns including unrest, terrorism, landmines, and communication disruptions across Read more: https://addisstandard.com/?p=56258

Addis Standard

@addisstandardeng · Post #21287 · 03.02.2026 г., 07:48

#Ethiopia: MP Abebaw challenges peace talks with splinter armed groups Member of Parliament Dr. Abebaw Desalew of the National Movement of Amhara (#NaMA) has questioned Prime Minister #Abiy Ahmed over the federal government’s approach to peace negotiations and regional security, warning that talks with what he described as “splinter groups” have failed to bring tangible improvements on the ground. Dr. Abebaw raised the concerns during the 10th Regular Session of the 5th Year of the 6th Term of the House of Peoples’ Representatives (#HoPR), where MPs questioned the Prime Minister on the government’s six-month performance report. He said Ethiopia continues to face a pervasive lack of peace, particularly in conflict-affected regions including #Amhara, #Oromia, #Tigray, and #Gambella, while noting that serious human rights violations are also reported in regions without active armed conflict. “Even in areas not experiencing open conflict, members from the... Read more: https://addisstandard.com/?p=54927