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

Резултати

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

Търсене: #pakistan

当前筛选 #pakistan清除筛选
POPULAR FRONT

@popularxfront · Post #6224 · 12.05.2026 г., 07:27

🇵🇰#Pakistan: At least seven people, including two policemen, were killed and more than 20 others injured in an explosion targeting a police vehicle in the Serai Naurang area of Lakki Marwat district, Khyber Pakhtunkhwa province. According to local authorities, the blast occurred in a crowded market area during a routine police patrol, causing multiple civilian casualties and extensive damage to nearby shops and vehicles. The exact nature of the explosion remains under investigation. However, the attack follows a recurring pattern in the region of TTP (Tehrik-i-Taliban Pakistan) militants specifically targeting police and security force vehicles. Meanwhile, roughly 30 km away, TTP militants blew up the Lora Fateh Khel bridge in Bannu district, effectively isolating multiple nearby areas. Just days earlier, another police checkpoint in the region was targeted in a suicide attack. (via @TKCkhyber on X)

Hashtags

POPULAR FRONT

@popularxfront · Post #6182 · 07.05.2026 г., 06:55

🇵🇰#Pakistan: Footage showing the Pakistani armed group Ittihad-ul-Mujahideen ambushing an armoured police vehicle in the Bannu District. After firing several magazines and rpg rounds in the armoured vehicle, the police officer inside is still alive. The militants, after attempting to smash the window of the vehicle, force the person inside to open the door, shooting him point blank with a pistol. (via @war_noir)

Hashtags

POPULAR FRONT

@popularxfront · Post #6030 · 25.04.2026 г., 19:29

🇵🇰#Pakistan: A Tehrik-i-Taliban Pakistan (TTP) sniper records the moment when a police checkpoint gets blown up by militants in the Kamal Sar market area of Bajaur. The second part of the video also shows the aftermath of the explosion.

Hashtags

POPULAR FRONT

@popularxfront · Post #5986 · 22.04.2026 г., 16:45

🇵🇰#Pakistan: Footage released today by Baloch Liberation Army's media showing their militants attacking a Pakistani Army camp in the Kech region. The attack was recorded on March 29th of this year. The militants used RPG rocket launchers and small arms fire to suppress and destroy the military outpost.

Hashtags

POPULAR FRONT

@popularxfront · Post #5954 · 19.04.2026 г., 09:18

🇵🇰#Pakistan: Footage showing a militant from Tehrik-i-Taliban Pakistan ambushing a Pakistani Army convoy in Khyber Pakhtunkhwa using an SVD. (via @war_noir)

Hashtags

POPULAR FRONT

@popularxfront · Post #5934 · 17.04.2026 г., 19:12

🇵🇰#Pakistan: Helmet cam footage showing a Tehrik-i-Taliban Pakistan (TTP) militant firing an RPG towards Pakistani forces in Khyber Pakhtunkhwa. (via @war_noir)

Hashtags

POPULAR FRONT

@popularxfront · Post #5888 · 14.04.2026 г., 08:20

🇵🇰#Pakistan: The Balochistan Liberation Army has released footage of its attack on a Pakistani military boat in the waters of Jiwani, Gwadar, where three soldiers were killed.

Hashtags

POPULAR FRONT

@popularxfront · Post #5870 · 12.04.2026 г., 12:08

🇵🇰#Pakistan: Balochistan Liberation Army (BLA) militants have ambushed a Pakistani Coast Guard (PCG) patrol boat off the coast of Jiwani, Gwadar, killing three troops who were on board. This would mark the first time that Pakistani forces have been targeted at sea within Balochistan. No footage of the attack has emerged yet, but BLA media outlets have published a statement claiming responsibility. The attack was also confirmed by the Pakistani side.

Hashtags

POPULAR FRONT

@popularxfront · Post #5849 · 10.04.2026 г., 08:16

🇵🇰#Pakistan: Footage released by BLA (Balochistan Liberation Front) showing it's militants ambushing Pakistani soldiers in Quetta, Balochistan. (via @war_noir)

Hashtags

POPULAR FRONT

@popularxfront · Post #5804 · 07.04.2026 г., 13:07

🇵🇰#Pakistan: A police vehicle was blown up by an IED (improvised explosive device) in Lakki Marwat, in the Khyber Pakhtunkhwa province of Pakistan. The explosion injured four police officers who were inside the vehicle at the time. No group has claimed responsibility for the attack so far, although the area has been an active region for attacks by TTP (Tehreek-e-Taliban Pakistan) militants. (📸 via @pakafghanmatter on X)

Hashtags

ASIANOMICS

@asianomics · Post #5750 · 22.03.2026 г., 17:58

🇵🇰Pakistan arrests activists at Women's Day march More than 30 people, including women, men and children, were detained during an International Women's Day march in Islamabad on March 8. Among those held was sociologist Mavra Bari, who described being kept in a cramped cell and said detainees were beaten. An AFP journalist observed those released bearing signs of physical ill-treatment. Amnesty International and Human Rights Watch have documented a pattern of arbitrary detention, enforced disappearances and legal harassment of activists, lawyers and journalists in Pakistan. Human rights lawyer Imaan Mazari and her husband are serving lengthy jail terms for social media posts deemed anti-state, while digital journalist Sohrab Barkat has been held without trial since late 2025. The Committee to Protect Journalists reported at least seven journalists killed in Pakistan in 2024, with others facing harassment. The Human Rights Commission of Pakistan's secretary general described new media laws as draconian, while press freedom group Reporters Without Borders has pointed to increasing state pressure on independent outlets. #Pakistan @asianomics

Hashtags

POPULAR FRONT

@popularxfront · Post #5480 · 17.03.2026 г., 16:21

🇵🇰#Pakistan: The Balochistan Liberation Army (BLA) has launched a coordinated attack on a Pakistani Coast Guard post, killing three troops stationed there. From the footage, it seems that the soldiers were not armed during the attack. The militants were allegedly "disguised" (possibly dressed as civilians or friendly troops). They passed through a Pakistani checkpoint on motorbikes before opening fire. The footage was dated as March 15th and was posted on BLA telegram channels.

Hashtags

123•••10•••1920
ПредишнаСтр. 1 от 20Следваща