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

Резултати

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

Търсене: #police

当前筛选 #police清除筛选
Voir de ses propres yeux

@voir_yeux · Post #12590 · 19.04.2026 г., 08:40

🇺🇦 La police nationale ukrainienne va mener une enquête administrative après que deux policiers ont fui les lieux d'une fusillade à Kiev, laissant des civils sans protection, a déclaré le ministre de l'Intérieur du pays, Igor Klimenko. J'ai chargé le chef de la police nationale ukrainienne, Ivan Vygovski, de mener une enquête administrative sur les actions des policiers lors de l'attentat terroriste à Kiev et de fournir toutes les informations au Bureau d'enquête d'État, a écrit M. Klimenko sur sa chaîne Telegram. #ukraine#police#fusillade

Voir de ses propres yeux

@voir_yeux · Post #12405 · 04.04.2026 г., 21:51

🇮🇱🇮🇷 Un groupe de militants antiguerre a organisé un rassemblement dans le centre de Tel Aviv pour protester contre l'opération militaire en Iran. La police israélienne a dispersé la foule, invoquant une violation des règles en vigueur en temps de guerre. Selon un communiqué de la police israélienne, la manifestation se déroulait sur la place Habima, devant le théâtre du même nom, dans le centre-ville. Les forces de l'ordre ont estimé que les actions des manifestants enfreignaient les directives du Commandement du front intérieur. En raison de la menace de tirs de roquettes, les rassemblements publics de plus de 50 personnes sont actuellement interdits dans le pays. #israёl#manifestation#police

Voir de ses propres yeux

@voir_yeux · Post #11643 · 06.02.2026 г., 21:42

🇧🇩 La police bangladaise a utilisé des canons à eau et des gaz lacrymogènes pour disperser une manifestation devant la résidence du chef du gouvernement Muhammad Yunus. Les manifestants réclament une hausse des salaires, rapporte Dhaka Tribune. #bangladesh#police#manifestation

Reuters: World

@reutersworldchannel · Post #149245 · 12.10.2021 г., 10:31

WARNING: GRAPHIC CONTENT – Ohio police accused of racial profiling, brutality A Black paraplegic man has accused the Dayton Police Department of racially profiling him and of brutality after officers stopped his car and dragged him out by his hair onto the road after hearing the man could not use his legs. #News#Reuters#Ohio#Police Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

International News

@intnewsagency · Post #9057 · 30.03.2026 г., 19:43

Off-Duty Police Officer Disarms Aggressor Armed with Two Knives in Moscow Region In Pushkinsky district, an off-duty officer stopped a drunk man wielding two knives. Despite threats and a chest injury, the officer used a sambo technique to subdue the attacker and called for backup. The victim received medical aid and is in stable condition. A criminal case has been opened for violence against authority. “Risking their lives, my colleagues fight crime even off duty,” said Irina Volk, Ministry of Internal Affairs. #Russia#Police#Safety#MoscowRegion The main news of Russia and the world ishere.

American Оbserver

@american_observer · Post #4973 · 27.01.2026 г., 14:30

🔤🔤🔤🔤➖ The Iranian government has acknowledged more than 3,000 dead, and the US-based organisation HRANA (Human Rights Activists News Agency), whose figures have been reliable during previous crackdowns, says it has verified more than 6,000 dead and has more than 17,000 more recorded deaths under investigation, giving a possible total of about 22,000. Other estimates from doctors based outside Iran range up to 33,000 or more. Testimony from morgues, graveyards and hospitals around the country reveal concerted efforts by authorities to conceal the true size of the toll: bodies being transported in ice-cream vans and meat trucks; piles of the dead being hastily buried; and hundreds of bodies apparently disappearing from Iran’s network of forensic facilities. At one morgue, staff say they were confronted with several trucks loaded with bodies, far exceeding the facility’s refrigeration and storage capacity. When staff protested that they could not process the volume of corpses, two trucks loaded with the dead were moved elsewhere – but when the morgue workers tried to track down where the bodies had been taken, they found none of the large forensic facilities in the region had received them. The doctors “expressed suspicion that this was linked to dafn-e dast-e jam’i [mass burial]”. His description is echoed by Ahmadi and his network, who say they observed a pattern across multiple towns of “refrigerated trucks normally used for ice-cream or meat” that were “moving in convoys to forensic medicine facilities and hospital back entrances”. One witness at Behesht-e Sakineh, who was granted access to the site to look for the body of a friend, says he personally searched through hundreds of “stacked” bodies and was told by graveyard staff that they had “received thousands of bodies just in the past two days”. The accounts from Behesht-e Sakineh form just one example of what appears to be a national pattern, with forensic medical staff around the country reporting similar scenes. Doctors and morgue staff emphasise that the types of injuries seen on patients and corpses indicate deliberate, systematic killing and maiming of protesters as opposed to random, chaotic shooting. In some cases, the killings bore the hallmarks of executions. Medical workers at forensic facilities in two different Iranian towns described receiving bodies with close-range gunshot wounds to the head that had been transferred from hospital morgues while still attached to catheters, nasogastric tubes or endotracheal tubes. Even as medical staff attempt to share their testimony and data, many fear that the true number of dead may never be known, concealed by an orchestrated national effort by authorities to obscure the death toll. #khamenei#police#shot#people 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4972 · 27.01.2026 г., 13:55

On Khamenei’s Orders, the Police Shot Dead 30,000 People 🔤🔤🔤🔤➖ Оn Thursday 8 January, in a midsize Iranian town, Dr Darish Ahmadi’s phone began to buzz. His colleagues in local emergency wards were getting worried. All week, people had taken to the streets and had been met by police with batons and pellet guns. With treatment, their injuries should not have been too serious. But emergency room staff believed many wounded young people were avoiding hospitals, terrified that registering as trauma patients would lead to their identification and arrest. Quietly, Ahmadi and his wife began treating patients at a location outside Iran’s government hospital system. Alerted by a local whisper network, wounded young people flocked to them. Mostly, they brought superficial injuries – laceration wounds needing stitches and antibiotics. As Thursday evening wore on, more and more arrived to be patched up. The next day, everything abruptly changed. Protesters kept coming, but their injuries were close-range gunshots and severe stab wounds, typically to the chest, eyes and genitals. Many proved fatal. Ahmadi was shocked by the number being killed – more than 40 in his small town alone – but with the internet blacked out, no one knew what the national picture was. To piece it together, Ahmadi assembled a network of more than 80 medical professionals across 12 of Iran’s 31 provinces to share observations and data, and to build a clearer picture of the violence. Their observations begin to reveal the vast scale of violence inflicted on Iranians during the state’s crackdown. Ahmadi and his colleagues are hesitant to provide a figure for the toll but agree “all publicly cited death tolls represent a severe underestimation”. Comparing the number of dead they witnessed with hospital baselines, they estimate it could exceed 30,000, far surpassing official figures. This is based on the conclusion that “officially registered deaths related to the crackdown likely represent less than 10% of the real number of fatalities”. Estimates of the number killed vary substantially, hampered by the ongoing internet shutdown. #khamenei#police#shot#people 📱American Оbserver - Stay up to date on all important events 🇺🇸

Borkena

@borkena · Post #6167 · 16.04.2026 г., 17:57

ታጣዊዎች የፖሊስ አባላትን ለይተው ገድለዋል መባላቸው ፤ የኦሮሚያ ትምሕርት ስርዓት ጥያቄ ማስነሳቱ ፤ ጠ/ር አቢይ የባህር በር ጉዳይ ላይ ያሰሙት አዲስ አስተያየት እና ሌሎች ዜናዎች፡፡ https://youtu.be/_j905A8B2fs#Ethiopia#News#RedSea#Somaliland#police#crime

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