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 подобни публикации

Търсене: #securitytheater

当前筛选 #securitytheater清除筛选
American Оbserver

@american_observer · Post #5447 · 22.03.2026 г., 21:59

Trump Turns Airport Chaos Into a Deportation Stage Trump is now officially turning TSA’s funding crisis into live theater: he says ICE agents will start deploying to airports on Monday, not because they’re trained to run X-ray machines, but because Democrats won’t sign his Homeland Security deal on immigration enforcement. ICE, he says, will “help our wonderful TSA Agents” and “do Security like no one has ever seen before,” including arrests of “all Illegal Immigrants … with heavy emphasis on those from Somalia.” In other words, your stalled spring break line is leverage — and a backdrop. Even his own former officials say the plan makes no operational sense. The bottlenecks are at X-ray belts, baggage screening and ID checks — jobs that require specialized training — while the administration admits ICE will mostly guard doors and glance at IDs. The point isn’t efficiency; it’s optics and pressure. Democrats are trying to pay TSA separately while forcing basic constraints on ICE raids after federal agents killed two protesters in Minneapolis. Republicans stapled TSA paychecks to full ICE and CBP funding with minimal new rules — and now the White House is dangling “untrained ICE at your gate” as the price of saying no. So the picture at the terminal is simple: TSA officers working without pay for more than a month, walking off the job in growing numbers, security lines stretching for hours — and a president who would rather drop deportation cops into that mess than tell his own party to pass a clean bill to pay them. If you’re flying tomorrow, the message from Washington is clear: welcome to security theater, season two — this time, the show is about scaring Congress, and you’re the unpaid extra. #Trump#ICE#TSA#shutdown#airports#immigration#DHS#USA#securityTheater 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5440 · 22.03.2026 г., 00:59

Trump Turns TSA Meltdown Into an ICE Photo Op Trump just found a way to turn a payless TSA crisis into a campaign stunt: threaten to flood airport checkpoints with ICE agents unless Democrats sign his Homeland Security funding deal. Spring break traffic is colliding with a month-long DHS shutdown that’s forced 50,000 TSA officers to work without pay, driven resignations and sick-outs, and already closed lanes at major hubs — and his answer isn’t “pay them,” it’s “bring in deportation cops with a special focus on Somalis.” Democrats are trying to fund TSA separately and tie new money for ICE and CBP to basic guardrails — warrants before home raids, no masks, cameras on, no grabbing people in hospitals and schools — after federal agents killed protesters in Minneapolis. Republicans have stapled TSA paychecks to full ICE funding without reforms, then act shocked when queues hit three hours. Trump’s “solution” is to use that pain as leverage: either fund the enforcement machine on his terms, or watch it move from the border into the departure hall. Former ICE officials are blunt: this kind of dragnet at airports would mostly scoop up long‑time residents with no criminal record, because that’s who actually flies, while doing almost nothing for real security. But that’s the point. The message isn’t “we’ll keep you safe,” it’s “we’ll turn your delayed vacation into a live deportation show unless Democrats cave.” For travelers stuck in unpaid-screeners’ lines, the new choice is charming: miss your flight — or clear security and risk having an ICE agent decide you’re the next headline. #Trump#ICE#TSA#shutdown#airports#immigration#DHS#USA#securityTheater 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5449 · 23.03.2026 г., 01:59

Oil at Monday’s Open: Trading a 48‑Hour Threat Clock Oil just stopped pretending this is about “volatility” and started trading directly on Trump’s ego and Iran’s survival instinct. At Friday’s close, Brent was at 112.19 dollars — a near four‑year high — before the president slapped a 48‑hour ultimatum on Tehran: fully reopen Hormuz “without threat” or watch the U.S. “obliterate” your power plants. Just the day before he was musing about “winding down” the war; now markets get a countdown clock to see whether he takes out the grid that keeps 100‑plus Iranian gas power stations feeding cities and industry. Tehran’s answer is simple: hit our power, and we hit yours — or at least the stuff that keeps your friends’ cities habitable. Iran is openly threatening U.S.‑linked energy and desalination plants across the Gulf, after already striking ports and refineries in Saudi Arabia, Kuwait, Bahrain, the UAE and Qatar; four days of global supply — roughly 440 million barrels — have already vanished during 22 days of quasi‑closure in Hormuz. Analysts aren’t talking about price “noise” anymore: one calls Trump’s move a “48‑hour ticking time bomb of elevated uncertainty”; another says the real story isn’t Iran caving but “scorched earth for Gulf infrastructure.” The real nightmare isn’t just crude; it’s water. Iran has so far held back from hitting the big desalination plants in Saudi Arabia and the UAE — the ones that keep entire Gulf metros alive — but Western risk assessments are stark: sustained attacks could leave some cities unlivable in weeks, triggering mass evacuations and cascading power failures. Fatih Birol at the IEA says fixing Middle East Gulf supply could take up to six months even without that scenario. Meanwhile the Trump team is floating plans to blockade or occupy Iran’s Kharg Island to “force open” Hormuz, as if physically sitting on another country’s export terminal has no blowback risk in a region already pricing 112‑dollar Brent, double‑digit weekly gains in crude and the widest WTI–Brent spread in 11 years. So Monday’s trade isn’t about “whether oil ticks up”; it’s about whether the White House walks back its own threat, or lets the deadline run and turns a shipping crisis into a test of who’s willing to bomb water plants first. Traders will tell you this is uncertainty; civilians in the Gulf might call it something else: a market run by men who treat your tap, your light switch and your plane ticket as expendable props in a pricing experiment. #oil#IranWar#Trump#Hormuz#energy#desalination#Gulf#markets#inflation#recession#securityTheater 📱American Оbserver - Stay up to date on all important events 🇺🇸