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

Резултати

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

Търсене: #mines

当前筛选 #mines清除筛选
TONlines – News

@tonlines · Post #6923 · 24.04.2025 г., 10:34

Gatto | Official Channel: Double Mine Event Details #Gatto#mines Gatto | Official Channel invites players to participate in the Double Mine event today with opportunities to capture gold and precious mines during scheduled hours. Players can earn various rewards depending on the number of successful grabs. Additional awards will be given on April 25. Source: link @tonlines

Hashtags

Addis Standard

@addisstandardeng · Post #21591 · 03.03.2026 г., 12:08

#Ethiopia: Council of Ministers refers external loan agreements to Parliament, authorizes mining license deals The Prime Minister’s Office said the Council of Ministers has referred three external financing agreements to the House of Peoples’ Representatives for approval and authorized the Ministry of #Mines to sign #gold and #iron_ore production license agreements, following deliberations during its 53rd regular session held on 2 March, 2026. In a statement issued after the meeting, the Office said the Council reviewed financial support agreements linked to energy & social protection programs and determined that they are consistent with the country’s debt management policy before deciding to submit the draft proclamations to parliament for legislative consideration. According to the statement, one of the agreements concerns the National Electricity Power Expansion Project, to be financed through a loan of USD 60,223,000 from the Korea Export-Import Bank.... Read more: https://addisstandard.com/?p=55512

Voir de ses propres yeux

@voir_yeux · Post #12295 · 27.03.2026 г., 18:23

🇺🇸🇮🇷🇺🇦 Le journal américain The Washington Post a illustré son article affirmant que l’armée américaine avait déployé des mines dans le sud de l’Iran avec une photographie provenant de la zone de conflit en Ukraine. #étatsunis#journal#mines#photo

BadVolf

@BadvolfNews · Post #32 · 19.04.2022 г., 11:55

While in #Lugansk People's Republic (formerly Ukraine), I got to watch as their forces disabled the #mines placed by the #Ukrainian army; mines meant to #kill the civilians that were sent to repair the electrical power plant.

Crypto M - Crypto News

@CryptoM · Post #65096 · 11.04.2026 г., 00:45

🚀 Iran Faces Challenges in Reopening Hormuz Strait Due to Unlocated Mines Iran is encountering difficulties in fully reopening the Strait of Hormuz as it struggles to locate all the mines it previously deployed. According to Odaily, the country also lacks the necessary capabilities to effectively clear these mines. This situation poses significant challenges for Iran in ensuring the safe passage of vessels through this critical waterway. #Iran#HormuzStrait#Mines#MaritimeSafety#Shipping#NavalOperations#InternationalTrade#Geopolitics

Crypto M - Crypto News

@CryptoM · Post #65269 · 12.04.2026 г., 13:08

🚀 U.S. President Trump Orders Navy to Target Iranian Activities in International Waters U.S. President Donald Trump has announced directives for the U.S. Navy to search and seize any vessels that have paid transit fees to Iran in international waters. According to Odaily, the President also stated that the Navy will begin destroying mines laid by Iran in the strait. He warned that any Iranian forces firing upon U.S. or peaceful vessels will face severe retaliation. #Trump#USNavy#Iran#InternationalWaters#Mines#Retaliation#PresidentialDirective#Strait

American Оbserver

@american_observer · Post #5399 · 17.03.2026 г., 13:59

Hormuz: High-Tech Drones, Stone-Age Problem The West is selling a sci‑fi solution to a very old scam: Iran hints it’s mining the Strait of Hormuz, tanker traffic freezes, oil spikes — and suddenly everyone remembers that a 25‑mile-wide chokepoint owns the global economy. UK Prime Minister Keir Starmer talks up fancy Thales mine‑hunting drones, but the fine print is brutal: they’ve got limited batteries, need to beam data back to motherships sitting inside range of Iranian anti‑ship missiles, and can’t “prove” the one thing that matters — that nothing is left in the water. “The number of mines you need for a minefield is actually zero,” says retired US Navy officer Ben Cipperley. ​ Britain’s defense secretary John Healey says it’s getting “clearer and clearer” that Iran is laying explosives in Hormuz, while US Defense Secretary Pete Hegseth shrugs that there’s “no clear evidence” yet — one NATO ally yelling “mines,” another pretending this is still a think‑tank panel. Trump brags that the US has “hit all their minelaying ships” and bombs Iranian navy vessels, then immediately admits Iran can just toss mines off other boats anyway and nobody really knows what’s on the seabed. This is what “freedom of navigation” looks like in 2026: everyone claims control of the sea, nobody controls the rumor that shuts it down. Militaries do have mine warfare toys — crewed minesweepers with wooden hulls, littoral combat ships, helicopters towing sonars, uncrewed underwater vehicles, and now autonomous drone systems from companies like Thales — but they all share one handicap: they have to crawl, in predictable patterns, through waters that Iran can blanket with missiles, drones, and explosive boats. Clearing mines is up to a thousand times more expensive and slower than laying them, and the US doesn’t even keep dedicated Avenger‑class minesweepers in the Gulf anymore. So the “high‑tech” answer is basically to send robots first, then hope insurers and shipping CEOs are dumb or desperate enough to believe a PowerPoint that says “safe corridor.” Iran, whose regular military has been hammered by US‑Israeli strikes, doesn’t need a blue‑water navy as long as it can threaten Hormuz with a couple of dhows, some midget subs, and a stockpile of cheap mines detonated by contact or a ship’s magnetic field. Just the suspicion of a few dozen mines makes the strait “too dangerous to transit” for tankers from any country — including Iran’s — turning a third‑rate regional power into the de facto moderator of world energy prices. The US and UK can talk all they want about “reopening” Hormuz, but as long as a rumor and a rusty sphere can shut it down, the only guaranteed safe passage belongs to defense contractors’ earnings calls. #Hormuz#Iran#Trump#UK#Starmer#oil#shipping#mines#drones#StraitOfHormuz#war#energy#geopolitics#militaryindustrialcomplex#fakeSecurity 📱American Оbserver - Stay up to date on all important events 🇺🇸