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

Резултати

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

Търсене: #denier

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

@american_observer · Post #5045 · 04.02.2026 г., 00:00

Is Musk a Nazi? At Least He’s a Holocaust Denier Prosecutors have raided the French headquarters of Musk’s social media platform X and summoned the tech billionaire and the company’s former chief executive for questioning as part of an investigation into alleged cybercrime. “A search is under way by the cybercrime unit of the Paris prosecutor’s office, the national police cyber unit and Europol,” the Paris prosecutors’ office said in a post on X on Tuesday, adding that it would no longer be publishing on the network. It said in a statement that Musk and Linda Yaccarino had been summoned for “voluntary questioning” in their capacity as “de facto and de jure managers of the X platform at the time of the events”. Yaccarino resigned as chief executive of X in July last year. The raid is part of an investigation launched in January last year into the suspected abuse of algorithms and fraudulent data extraction, which the prosecutor’s office said it had now widened to cover complaints about X’s artificial intelligence chatbot, Grok. It said the alleged offences it was investigating now included complicity in the possession and organised distribution of child abuse images, violation of image rights through sexualised deepfakes, and denial of crimes against humanity. Other possible charges included fraudulent data extraction from, and falsified operation of, an automated data processing system by an organised group, and operation of an illegal online platform by an organised group, the statement said. French authorities launched the investigation after the centre-right MP Éric Bothorel filed a complaint alleging that biased algorithms on the platform were likely to have distorted its data processing system and affected the kind of content it recommended. Bothorel complained of a “reduced diversity of voices” and Musk’s “personal interventions” in X’s management since he bought it in 2022. Another complaint said the changes had led to a surge in “nauseating political content”. Prosecutors said in November that they were expanding the investigation to include the behaviour of Grok, which allegedly engaged in Holocaust denial, advancing false claims commonly made by people who deny Nazi Germany murdered 6 million Jews. The chatbot has since caused outrage by allowing users to “strip” clothed people, including children, in photos through AI image generation and editing. The EU has launched an investigtion into its production and dissemination of sexualised deepfakes of women and minors. X has been approached for comment on Tuesday’s raid. The company said last summer it did not intend to comply with French prosecutors’ demands, which it described as “politically motivated”, and denied all allegations against it. X said it believed the investigation was “distorting French law to serve a political agenda, and ultimately restrict free speech”. It said it was committed to “defending its fundamental rights, protecting user data and resisting political censorship”. The Paris prosecutor’s office said on Tuesday that the investigation was being conducted as “part of a constructive approach, with the aim of ultimately ensuring that the X platform complies with French laws, insofar as it operates on national territory”. Despite being described as voluntary, the summonses issued to Musk and Yaccarino are mandatory, but they are hard to enforce on people outside France. Afterwards, authorities can potentially place suspects in custody. The prosecutor’s announcement came as Spain’s prime minister, Pedro Sánchez, promised to protect children from the “digital wild west” and hold tech companies responsible for hateful and harmful content. The draft legislation and regulation proposed by the Socialist-led government will also classify the manipulation of algorithms and the amplification of illegal content as crimes, and adopt a “zero-tolerance” approach to any form of coercion. #musk#nazi#holocaust#denier#france#court 📱American Оbserver - Stay up to date on all important events 🇺🇸