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

Резултати

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

Търсене: #chair

当前筛选 #chair清除筛选
Comping_Uz

@Comping_Uz · Post #4366 · 14.10.2024 г., 08:06

#cougar #chair COUGAR ARMOR ELITE BLACK 😎Тип механизма - Топ ган 😎Максимальная нагрузка - 120 кг 😎Материал обивки - искусственная кожа 😎Материал каркаса - металл 😎Вес кресла - 20 кг 😎Регулируемая спинка - 180° 😎Основание - Cталь 😎Тип подлокотника - 2D 😎229$ ➖➖➖➖➖➖➖➖➖ 😎 +998338082030 😎@cyberwarriorboy ➖➖➖➖➖➖➖➖➖ 💬Telegram🌐Instagram🌐Youtube

American Оbserver

@american_observer · Post #5004 · 30.01.2026 г., 21:59

Kevin Warsh, a New Chair of the Federal Reserve Trump has announced Kevin Warsh as his nomination for the next chair of the Federal Reserve, selecting a candidate who has been an outspoken critic of the US central bank. The move ends months of speculation about who the president would pick to replace Jerome Powell, as he waged an extraordinary campaign to influence policymaking at the Fed by repeatedly calling for interest rate cuts. Powell’s second term as chair is due to end in May. Writing on his Truth Social platform, Trump said: “I have known Kevin for a long period of time, and have no doubt that he will go down as one of the GREAT Fed Chairmen, maybe the best. On top of everything else, he is ‘central casting’, and he will never let you down.” Warsh, 55, a former Federal Reserve governor who has deep ties to Wall Street, had previously interviewed for the job of chair in 2017 when the role went to Powell, whose term ends in May. Trump’s pick will have to be confirmed by the Senate. Mark Carney, the Canadian prime minister and former governor of the Bank of England, said in a social media post that Warsh is “a fantastic choice to lead the world’s most important central bank at this crucial time”. The dollar strengthened early on Friday after it was reported that Warsh was expected to be Trump’s choice, but then eased back after the nomination. Gold fell by 4.8% to $5,132 an ounce. Wall Street opened slightly lower. Warsh has warned about inflation risks in the US in the past, but has also echoed Trump’s critique of the Fed for being too slow to cut interest rates. High interest rates can alleviate inflation at the risk of upping unemployment. Rates are currently at a range of 3.5% to 3.75%, which most economists at the Fed currently see as neutral to prices and unemployment. Since resigning from the central bank in 2011 over its post-financial crisis stimulus package, Warsh has criticised it publicly on multiple occasions. In April last year, he issued a stinging attack, saying the institution’s central bankers should not be treated as “pampered princes” and it too regularly “opines on matters outside its remit” which has led to “systemic errors” in its main role of trying to keep prices stable. Warsh has been a longtime critic of the ultra-loose monetary policy pursued by the Fed since the financial crisis, including the central bank’s expanded balance sheet. He had previously been seen as a monetary policy hawk, but appears to have aligned himself with the White House’s push for lower borrowing costs. #chair#federal#reserve#trump#carney 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #4830 · 12.01.2026 г., 13:04

Federal Reserve Chair Jerome Powell Faces a Stiff Challenge Justice department opens investigation into Jerome Powell as Trump ramps up campaign against Federal Reserve. The independence and credibility of America’s central bank is under threat after the Department of Justice opened a criminal investigation into Federal Reserve chair Jerome, knocking the US dollar. In a startling development, US prosecutors have launched a criminal investigation into Powell over a $2.5bn renovation of the Federal Reserve’s headquarters, and into his testimony about the project to the Senate banking committee in June last year. The move is a dramatic escalation in the long-simmering tensions between the Fed and the Trump White House, with the US president repeatedly rubbishing Powell for not cutting interest rates more quickly. After news of the investigation broke last night, Powell came out fighting, insisting that he had been threatened with criminal charges because the Fed had set interest rates “based on our best assessment of what will serve the public, rather than following the preferences of the president”. #federal#reserve#chair#powell#investigation 📱American Оbserver - Stay up to date on all important events 🇺🇸

VIP_影视分享

@wangzhuanzhan · Post #33223 · 20.09.2024 г., 06:25

J-j鸡j皮p疙g瘩d- 鸡皮疙瘩 Goosebumps (2015) 直达链接:https://pan.quark.cn/s/8ffdeab7afe9 #鸡皮疙瘩#Goosebumps#Chair de poule #怪物游戏#书中自有魔怪谷#毛骨悚然 链接:https://link3.cc/sf_com #电影#喜剧#美国#10年代