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

Резултати

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

Търсене: #mexico

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

@popularxfront · Post #5984 · 22.04.2026 г., 10:30

🇲🇽#Mexico: Footage shows clashes between CDS MF sicarios and CDS Chapitos cartel members during a firefight somewhere in Sinaloa. At the beginning of the footage, a CDS MF sicario can be seen lighting the fuse of an improvised grenade before throwing it toward rival members. (via @ProjectOSCT)

Hashtags

POPULAR FRONT

@popularxfront · Post #5968 · 21.04.2026 г., 08:54

🇲🇽#Mexico: A shooting attack has occurred at the ancient pyramids of Teotihuacan earlier today, where a gunman opened fire randomly on nearby people with a revolver. A Canadian tourist was killed in the attack, and several others were injured. The shooter later took his own life. (via @war_noir)

Hashtags

POPULAR FRONT

@popularxfront · Post #5599 · 24.03.2026 г., 21:15

🇲🇽#Mexico: A school shooting occurred earlier this morning local time in Lázaro Cárdenas, at the Anton Makarenko high school campus on Francisco Villa Street, just a few hours ago in Mexico. Initial reports indicate that the shooter, a 15-year-old student, attempted to enter the school armed with a rifle. He was confronted by two teachers who tried to stop him, but he opened fire, killing both at the scene. Municipal Police responded quickly, and footage circulating online shows the moment officers detained the suspect at the scene. The last videos show some of the content that the shooter has posted on his Instagram story shortly before the attack. These include footage of him brandishing a rifle, as well as content associated with “incel” ideology, including edits referencing a school shooting and Charles Manson.

Hashtags

POPULAR FRONT

@popularxfront · Post #5538 · 21.03.2026 г., 11:05

🇲🇽#Mexico: Aerial footage showing a drone operated by the Sinaloa Cartel (Mayo Faction) dropping an explosive payload on a vehicle belonging to a rival cartel in Sinaloa. (via @war_noir)

Hashtags

POPULAR FRONT

@popularxfront · Post #5516 · 19.03.2026 г., 19:15

🇲🇽#Mexico: Chest-rig footage shows a firefight between SEDENA Mexican special forces and a group of sicarios in Guadalupe y Calvo municipality, in the mountainous region of Chihuahua, three days ago. During a surveillance operation on a road connecting El Ocote and Atascaderos, the troops discovered a position held by 15 sicarios. Upon spotting the security forces, the gunmen opened fire. In the exchange of gunfire, two sicarios were killed on the spot, while three others were captured. No casualties were reported among the security forces, although one officer was injured by what was described as shrapnel from a grenade. (via @blogdelnarcomex on X)

Hashtags

POPULAR FRONT

@popularxfront · Post #5472 · 16.03.2026 г., 18:20

🇲🇽#Mexico: Helmet cam footage from a Mexican soldier, part of the SEDENA Special Forces, during surveillance and reconnaissance operations in Nayarit State. What is notable in this footage is the use of anti-drone equipment designed to jam drones operated by the cartels. (via @overview.mexsof on IG)

Hashtags

International Geographic

@internationalgeographic · Post #5465 · 02.03.2025 г., 09:32

Kabo-san-Lukas, #Mexico🇲🇽 The southern Mexican resort on the Pacific coast is the Kabo-San-Lucas resort. Kabo-san-Lukas is a relatively young resort. It was founded about a hundred years ago. Its story begins with a small fishing village. Fishing brought a good income, and the village gradually grew. There are amazingly beautiful beaches, fishing, walks on a yacht along the coast and a meeting with whales, surfing and immersion. From January to March, whales swim close to the coastline. You can take a tour and go to the open sea to better see these huge mammals.

Hashtags

POPULAR FRONT

@popularxfront · Post #5428 · 14.03.2026 г., 20:08

🇲🇽#Mexico: Reports are emerging of drone attacks in the town of Arroyo Grande, part of the municipality of Sanalona. Drones carrying explosive payloads, reportedly operated by cartels, caused damage and civilian casualties in the area. Footage shows an injured civilian walking towards the street allegedly asking for help after being wounded. One vehicle was completely burned, and one person was killed in the attack. (via @ZuluCanal)

Hashtags

POPULAR FRONT

@popularxfront · Post #5297 · 07.03.2026 г., 16:05

🇲🇽#Mexico: Recently posted footage showing a firefight between Los Chapitos sicarios and a rival cartel in Sinaloa. (via @MexicanNarcos)

Hashtags

POPULAR FRONT

@popularxfront · Post #5119 · 24.02.2026 г., 06:09

🇲🇽#Mexico: A group of armed men, allegedly loyal to the CJNG cartel, have opened fire on the Municipal Presidency building in Jiquilpan, Michoacan. (📹 via @belikmexican)

Hashtags

POPULAR FRONT

@popularxfront · Post #5110 · 23.02.2026 г., 07:12

🇲🇽#Mexico: Footage from yesterday showing CJNG sicarios in a firefight with the National Guard somewhere in Jalisco. (📹 via @MexicanNarcos)

Hashtags

POPULAR FRONT

@popularxfront · Post #5108 · 23.02.2026 г., 06:12

🇲🇽#Mexico: Clashes and arson attacks have continued into the night. CJNG sicarios have stormed the state-owned "Banco del Bienestar" and attacked federal forces in the town of Ojuelos, Jalisco. Other clashes were reported in multiple parts of Mexico, with CJNG sicarios targeting Mexican army troops.

Hashtags

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