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

Резултати

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

Търсене: #ring

当前筛选 #ring清除筛选
Libreware

@libreware · Post #1541 · 10.02.2026 г., 21:04

Super Bowl Ad TRICKING You Into Welcoming Surveillance State! During the Super Bowl, you may have seen a commercial for #Amazon’s #Ring “Search Party” feature, which uses an emotional lost-dog story to encourage adoption of participation in what amounts to a widespread neighborhood #surveillance net. Jimmy points out that the ad masks #privacy risks tied to AI-driven #cameras, data sharing, and Amazon’s broader surveillance ecosystem, including concerns about opt-out defaults and government access. He and Americans’ Comedian Kurt Metzger expand the discussion into a broader critique of social media and smart devices as tools of self-surveillance, suggesting public safety and convenience are being used to justify constant monitoring. Ultimately, it frames the commercial as emblematic of a growing surveillance state presented as benevolent technology. https://www.youtube.com/watch?v=5AJtRDjoXN4 #why

#Victory80 🌟 February 2, 1943, one of the most brutal battles of #WWII and all of history — the Battle of Stalingrad — concluded. For 2️⃣0️⃣0️⃣ days and nights the Battle of Stalingrad raged on the banks of the Don and the Volga rivers, and in the city proper, or rather what was left of it following merciless Nazi bombardments and stubborn defender fighting for every street, alley and house. The battle itself surpassed in scope and intensity all prior battles of #WWII. During that battle, more than 2.1 million people fought on both sides. By the end of June 1942, the Nazis concentrated in the strip of land from Kursk to Taganrog on the front of 600-650 kilometers up to 35% of infantry, over 50% of armour and motorized divisions of the total number of Wehrmacht troops deployed on the Soviet-German front. During the planning of the Stalingrad operation, the enemy had several objectives: to gain a foothold on the Volga River and thus deprive the #SovietUnion of control over one of the most important transportation arteries of the country. The capture of #Stalingrad, according to the assessment of the Nazi military command, would open the way for the Wehrmacht to the Caucasus, where the Germans hoped to obtain the most important resource for making the war machine continue — oil fields. Traditionally, according to the historians, the Battle was divided into two stages: • Defensive phase: from July 17 to November 18, 1942; • Offensive phase: from November 19, 1942 to February 2, 1943. During the first stage, July 17 - November 18, 1942, the Red Army had to conduct defensive operations and engaged the enemy in fierce street battles directly in the city. The forces of the 62nd and 64th Soviet armies, led by Vassily Chuikov, commander of the 62nd Army, engaged the troops of the 6th Army of the Wehrmacht under the command of Lieutenant General Paulus. By mid-November 1942, as a result of stubborn resistance and the deployment of the Red Army reserves favorable conditions were created for launching the counteroffensive. The plan for the operation code-named#Uranus was developed under the leadership of Army General Georgy Zhukov and Colonel General Alexander Vasilevsky. During the large-scale counteroffensive at Stalingrad (November 19, 1942 — February 2, 1943), Soviet forces conducted the operation #Ring, during which the Red Army managed to drive Paulus's 6th Army into a “cauldron” between the Don and Volga rivers. Realizing the futility of further action, by the end of January the Nazi units began to surrender en masse. On January, 31, General Paulus (promoted by Hitler to to General-Field Marshal), together with other German generals and officers at Stalingrad finally surrendered. OnFebruary 2, the last pockets of Nazi resistance were eliminated. The #BattleOfStalingrad ended with a complete victory of the Red Army. For the first time ever the all-consuming Nazi war machine was weighed, measured and found wanting. This marked a turning point not only in the the Great Patriotic War, but that of the entire #WWII. In Stalingrad, Wehrmacht and its auxiliary forces from the Axis lost 1/4 of all troops deployed by the Reich on the Eastern front. Total enemy losses amount to ~1.5 million soldiers and officers. From that moment forward thestrategic initiative was on the side of the Red Army. The Victory in Stalingrad created favourable conditions for further full-scale counteroffensive of Soviet forces to expel the enemy from the Nazi-occupied territory of the USSR. 🌐 The defeat of the bulk of the enemy troops not only shocked the world and significantly raised the international prestige of the Soviet Union and its Armed Forces, but also contributed to the strengthening and tightening of the anti-Hitler coalition. 🎖 Victory in the Battle of Stalingrad was in large achieved through superior strategy and tactics, but also due to mass heroism of Soviet soldiers, officers and hard work of all those on the home front. 112 participants of the Battle were awarded the title of the Hero of the Soviet Union. #WeRemember