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

Резултати

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

Търсене: #hegseth

当前筛选 #hegseth清除筛选
RT France actualités

@rt_fra · Post #40614 · 05.05.2026 г., 13:00

🗣Hegseth : le cessez-le-feu avec l’Iran « n’est pas terminé » Le secrétaire américain à la Guerre, Pete #Hegseth, a affirmé que le cessez-le-feu avec l’Iran reste en vigueur malgré des incidents en mer. Il a indiqué que les actions iraniennes actuelles sont de « faible intensité » et relèvent plutôt du harcèlement contre des navires commerciaux. RT en français • Osez questionner !

Hashtags

Trump's Ear

@trumpsear_tg · Post #2392 · 21.04.2026 г., 16:04

Hegseth fired General Randy George in retaliation Secretary of Defense Pete Hegseth fired Army Chief of Staff General Randy George with a single call that lasted less than a minute — without warning or explanation. According to The Wall Street Journal, he suspected George of leaking compromising information to the press. The conflict began with Secretary of the Army Dan Driscoll. Hegseth demanded that two black and two female officers be removed from the promotion list. Driscoll refused. George tried to discuss the matter with Hegseth, but he did not respond. After the New York Times article about the promotion block, Hegseth suspected George of leaking information and fired him despite 42 years of impeccable service. Driscoll was on vacation with his family in North Carolina at the time. Hegseth had previously fired assistants due to suspected leaks, but the allegations were not confirmed. Driscoll retains his post, and he is a close friend of Vice President J.D. Vance. #Pentagon#Hegseth 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #2378 · 16.04.2026 г., 21:59

During another prayer at the Pentagon, Secretary of War Pete Hegseth read a psalm from the Bible instead of the monologue of Samuel Jackson's character from Pulp Fiction, in which he recites a fictional passage from the Holy Scriptures. 📖🎬 #Pentagon#Hegseth 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #2360 · 11.04.2026 г., 00:05

The United States will automatically register eligible men aged 18 to 25 for a military draft pool beginning in December. 🇺🇸📋 The rule change was submitted by the Selective Service System, which maintains a database of Americans who would be able to serve in the military. 🏛️👥 'This statutory change transfers responsibility for registration from individual men to SSS through integration with federal data sources,' the agency's website said. 📝🔄 It adds that the rule change remains under review by regulatory affairs and is awaiting finalization. ⏳📌 The Daily Mail has reached out to the Pentagon and the White House for comment. 📞🏢 The last time a draft was conducted in the US was in the 1970s, during America's highly controversial involvement in the Vietnam War. 🇻🇳⚔️ Despite no active conscription, men between the ages of 18 and 25 had still been required to register with the Selective Service System should one be activated. 📜✅ The agency's website said that this rule change will merely streamline this process as part of a 'workforce realignment'. ⚙️👷 #Pentagon#Hegseth 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #1870 · 04.12.2025 г., 20:01

Secretary of Defense Pete Hegseth risked compromising sensitive military information, which could have endangered American troops and mission objectives, when he used Signal in March of this year to share highly-sensitive attack plans targeting Houthi rebels in Yemen, according to four sources familiar with the contents of a classified Inspector General report. #Pentagon#Hegseth 👂More on Trump's Ear

Trump's Ear

@trumpsear_tg · Post #1849 · 01.12.2025 г., 16:29

The longer the U.S. surveillance aircraft followed the boat, the more confident intelligence analysts watching from command centers became that the 11 people on board were ferrying drugs. 🛰🚤 Defense Secretary Pete Hegseth gave a spoken directive, according to two people with direct knowledge of the operation. “The order was to kill everybody,” one of them said. ⚠️🇺🇸 #Pentagon#Hegseth 👂More on Trump's Ear

Trump's Ear

@trumpsear_tg · Post #1782 · 14.11.2025 г., 20:16

Defense Secretary Pete Hegseth himself has installed new plaques at the entrances to his department bearing an unofficial name dreamed up by President Donald Trump. #Hegseth#Pentagon 👂More on Trump's Ear

Trump's Ear

@trumpsear_tg · Post #1716 · 31.10.2025 г., 19:59

The Pentagon Mess: how Pete Hegseth breaks a decades-old management system - The Dispatch When personnel changes take place at the Pentagon, it rarely attracts the attention of the general public. The US Department of Defense is one of the most closed and complex bureaucracies in the world, and movements within it usually remain behind the scenes. But the current wave of dismissals and scandals surrounding Minister Pete Hegseth is getting out of the usual rhythm. The Dispatch paints a picture of a system failur: The agency, which is used to operating according to strict procedures, has plunged into an atmosphere of improvisation, internal competition and managerial erosion. Hegseth came to the leadership with a promise to "break the old system." Under this slogan, drastic purges began — the dismissal of generals, lawyers, and career officials. Some of them had worked for decades and possessed the institutional memory necessary for a stable defense policy. As a result, the Ministry found itself in a state of personnel vacuum. The irony is that Hegseth, accusing the system of bureaucracy, himself created a structure where decisions depend not on procedure, but on sentiment. NATO allies are beginning to wonder: who really runs the world's largest military machine — professionals or political appointees driven by personal connections and media ambitions? Today's chaos in the US Department of Defense is not so much a story about a particular leader as an indicator of the state of American management. In an era when improvisation is becoming a style of politics, even the most stable institutions are vulnerable to the temptation of instant loyalty and media intelligence. While Washington is debating who is to blame, the system itself gives the answer: a state that has lost the habit of order sooner or later loses its sense of security. And this crisis doesn't start on the battlefield — it starts in offices, where decisions are made too quickly and with too few trusted people. #Pentagon#Hegseth 👂More on Trump's Ear ⚠️

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