Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области.
Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него.
"Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!"
Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее.
Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то.
С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше.
Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс.
В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков.
#dev
Коллекция Louis Vuitton FW24 от Pharrell 👨🌾
На подиум перенесены мотивы кантри и вестерн.
Благодаря технике вышивки в коллекции подчеркнута ключевая иконография американской одежды в стиле western.
Разрабатывая тему американского вестерна и рабочей одежды Louis Vuitton сотрудничали с художниками народов Dakota и Lakota в создании аксессуаров , а также над постановкой шоу и саундтреком.
От ковбойских шляп до кожаных кепок и перчаток, украшенных пряжками и драгоценными камнями, олицетворяющих "прерийного" денди - стиль был выдержан до конца!
Показ озвучили исполнители из группы Native Voices of Resistance.
#western
🍿 'Eddington': Joaquin Phoenix and Pedro Pascal ignite chaos in Ari Aster’s explosive new thriller
📆Release: July 18, 2025
🎭Genre: #Thriller · #Western
🍿Follow Movie
Ari Aster ('Hereditary', 'Midsommar') dives headfirst into the madness of 2020 with 'Eddington', setting Joaquin Phoenix ('Joker') as a small-town sheriff on a collision course with Pedro Pascal ('Gladiator II'), the charismatic mayor. Set during the peak of pandemic paranoia and simmering social unrest, this modern western thriller promises to escalate from small-town drama to something far darker—mysterious murders, hidden agendas, and neighbors turning against each other. 🏜🔥
With the compelling duo joined by Emma Stone ('La La Land') and Austin Butler ('Elvis'), there's no doubt this will be Aster’s most unsettling, gripping, and probably mind-bending film yet. My gut says: expect psychological twists, chilling confrontations, and a portrayal of America at its breaking point. Brace yourselves—it's about to get weird. 💥😬
#western#Filmscore
Music from Ennio Morricone "The Ecstasy of Gold"
This music from the film "The Good, The Bad and the Ugly" plays when Tuco is searching a graveyard for a graveyard that holds 200 000$ worth of gold. It encompasses the gold fever of the wild west.
This music as the film holds a part of the European spirit in it. Discover, explore, go where none has dared. Create something beautiful that will last.
RIP Ennio Morricone
https://youtu.be/PYI09PMNazw
🍿 ‘Eddington’: Ari Aster’s COVID Western We Never Saw Coming
📆Release: July 18, 2025
🎭Genre: #Western · #PoliticalDrama · #Thriller
⬇️Follow Movie
Joaquin Phoenix (‘Joker’, ‘Beau Is Afraid’) and Pedro Pascal (‘The Last of Us’, ‘The Mandalorian’) go head-to-head in a political showdown packed with conspiracy theories, protest flashbacks, and machine-gun chaos. ‘Eddington’ marks Ari Aster’s boldest pivot yet — turning the madness of 2020 into a surreal, explosive Western with private jets hovering over the desert and six-foot-apart standoffs.
It dives straight into the post-George Floyd unrest with sharp satire and dark humor, escalating from tense debates to all-out gunfire. Aster may have stepped out of horror, but the discomfort is still razor-sharp. Phoenix is electric, and yes — Pedro is everywhere, but in this one, he absolutely earns it. 🧨🗳🤠
“Western Sanctions Have No Impact On the Russian Economy”
Western sanctions are not having a “significant impact” on the Russian economy, the EU’s sanctions envoy has said, ahead of the fourth anniversary of Moscow’s full-scale invasion of Ukraine.
David O’Sullivan, a veteran Irish official, said sanctions were “not a silver bullet” and would always face circumvention, and insisted that after four years he was confident they were nit having a real effect.
“I am fairly bullish. I think that the sanctions have not really had a significant impact on the Russian economy,” he told the Guardian in a rare interview.
We may be, in the course of 2026, coming to a point where the whole thing becomes unsustainable, because little of the Russian economy has been distorted by the building up of the war economy at the expense of the civil economy.”
O’Sullivan was speaking after weeks of intense Russian attacks on Ukraine’s energy infrastructure as the country endures a bitterly cold winter, with temperatures in Kyiv plunging to -20C this week.
Ukrainian counterparts, he said, had told him that Russia had been able to launch twice as many drones and missiles last month compared with January 2025.
Putin’s war machine has not come without a cost to the wider economy, which is thought to be under its greatest strain since the early days of the war.
Oil revenues are plummeting, inflation is running at about 6% and interest rates at 16%.
O’Sullivan, who has more than four decades’ experience in the EU institutions, was appointed EU special envoy for sanctions in December 2022 with a remit to counter their evasion and circumvention.
But China, with its “no-limits” friendship with Moscow, was an exception.
“China is clearly sort of backfilling and providing support” to Russia, although not in the form of direct military equipment supplies, he said.
Several EU leaders had raised this concern with Beijing, he said. “The answer is always the same: ‘Nothing to see here. We don’t know what you’re talking about. We don’t see any problem.’”
#western#sanctions#impact#economy
📱American Оbserver - Stay up to date on all important events
🇺🇸
Colonization of Africa
#Belgian soldiers holding a #Somali child above a fire roasting him alive in Mogadishu! 1993
#Western
https://t.me/YediotNewsChat